Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'xtensa-next-20121018' of git://github.com/czankel/xtensa-linux

Pull Xtensa patchset from Chris Zankel:
"These are all limited to the xtensa subtree and include some important
changes (adding long missing system calls for newer libc versions and
other fixes) and the UAPI changes"

* tag 'xtensa-next-20121018' of git://github.com/czankel/xtensa-linux:
xtensa: add missing system calls to the syscall table
xtensa: minor compiler warning fix
xtensa: Use Kbuild infrastructure to handle asm-generic headers
UAPI: (Scripted) Disintegrate arch/xtensa/include/asm
xtensa: fix unaligned usermode access
xtensa: reorganize SR referencing
xtensa: fix boot parameters parsing
xtensa: fix missing return in do_page_fault for SIGBUS case
xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
xtensa: fix memmove(), bcopy(), and memcpy().
xtensa: ISS: fix rs_put_char
xtensa: ISS: fix specific simcalls

+1677 -1620
+4 -4
arch/xtensa/boot/boot-redboot/bootstrap.S
··· 51 51 /* 'reset' window registers */ 52 52 53 53 movi a4, 1 54 - wsr a4, PS 54 + wsr a4, ps 55 55 rsync 56 56 57 - rsr a5, WINDOWBASE 57 + rsr a5, windowbase 58 58 ssl a5 59 59 sll a4, a4 60 - wsr a4, WINDOWSTART 60 + wsr a4, windowstart 61 61 rsync 62 62 63 63 movi a4, 0x00040000 64 - wsr a4, PS 64 + wsr a4, ps 65 65 rsync 66 66 67 67 /* copy the loader to its address
+26 -2
arch/xtensa/include/asm/Kbuild
··· 1 - include include/asm-generic/Kbuild.asm 2 - 1 + generic-y += bitsperlong.h 2 + generic-y += bug.h 3 3 generic-y += clkdev.h 4 + generic-y += cputime.h 5 + generic-y += device.h 6 + generic-y += div64.h 7 + generic-y += emergency-restart.h 8 + generic-y += errno.h 4 9 generic-y += exec.h 10 + generic-y += fcntl.h 11 + generic-y += futex.h 12 + generic-y += hardirq.h 13 + generic-y += ioctl.h 14 + generic-y += irq_regs.h 15 + generic-y += kdebug.h 16 + generic-y += kmap_types.h 17 + generic-y += kvm_para.h 18 + generic-y += local.h 19 + generic-y += local64.h 20 + generic-y += percpu.h 21 + generic-y += resource.h 22 + generic-y += scatterlist.h 23 + generic-y += sections.h 24 + generic-y += siginfo.h 25 + generic-y += statfs.h 26 + generic-y += termios.h 27 + generic-y += topology.h 28 + generic-y += xor.h
+6 -6
arch/xtensa/include/asm/atomic.h
··· 73 73 "l32i %0, %2, 0 \n\t" 74 74 "add %0, %0, %1 \n\t" 75 75 "s32i %0, %2, 0 \n\t" 76 - "wsr a15, "__stringify(PS)" \n\t" 76 + "wsr a15, ps \n\t" 77 77 "rsync \n" 78 78 : "=&a" (vval) 79 79 : "a" (i), "a" (v) ··· 97 97 "l32i %0, %2, 0 \n\t" 98 98 "sub %0, %0, %1 \n\t" 99 99 "s32i %0, %2, 0 \n\t" 100 - "wsr a15, "__stringify(PS)" \n\t" 100 + "wsr a15, ps \n\t" 101 101 "rsync \n" 102 102 : "=&a" (vval) 103 103 : "a" (i), "a" (v) ··· 118 118 "l32i %0, %2, 0 \n\t" 119 119 "add %0, %0, %1 \n\t" 120 120 "s32i %0, %2, 0 \n\t" 121 - "wsr a15, "__stringify(PS)" \n\t" 121 + "wsr a15, ps \n\t" 122 122 "rsync \n" 123 123 : "=&a" (vval) 124 124 : "a" (i), "a" (v) ··· 137 137 "l32i %0, %2, 0 \n\t" 138 138 "sub %0, %0, %1 \n\t" 139 139 "s32i %0, %2, 0 \n\t" 140 - "wsr a15, "__stringify(PS)" \n\t" 140 + "wsr a15, ps \n\t" 141 141 "rsync \n" 142 142 : "=&a" (vval) 143 143 : "a" (i), "a" (v) ··· 260 260 "xor %1, %4, %3 \n\t" 261 261 "and %0, %0, %4 \n\t" 262 262 "s32i %0, %2, 0 \n\t" 263 - "wsr a15, "__stringify(PS)" \n\t" 263 + "wsr a15, ps \n\t" 264 264 "rsync \n" 265 265 : "=&a" (vval), "=a" (mask) 266 266 : "a" (v), "a" (all_f), "1" (mask) ··· 277 277 "l32i %0, %2, 0 \n\t" 278 278 "or %0, %0, %1 \n\t" 279 279 "s32i %0, %2, 0 \n\t" 280 - "wsr a15, "__stringify(PS)" \n\t" 280 + "wsr a15, ps \n\t" 281 281 "rsync \n" 282 282 : "=&a" (vval) 283 283 : "a" (mask), "a" (v)
arch/xtensa/include/asm/auxvec.h arch/xtensa/include/uapi/asm/auxvec.h
-1
arch/xtensa/include/asm/bitsperlong.h
··· 1 - #include <asm-generic/bitsperlong.h>
-18
arch/xtensa/include/asm/bug.h
··· 1 - /* 2 - * include/asm-xtensa/bug.h 3 - * 4 - * Macros to cause a 'bug' message. 5 - * 6 - * This file is subject to the terms and conditions of the GNU General Public 7 - * License. See the file "COPYING" in the main directory of this archive 8 - * for more details. 9 - * 10 - * Copyright (C) 2001 - 2005 Tensilica Inc. 11 - */ 12 - 13 - #ifndef _XTENSA_BUG_H 14 - #define _XTENSA_BUG_H 15 - 16 - #include <asm-generic/bug.h> 17 - 18 - #endif /* _XTENSA_BUG_H */
arch/xtensa/include/asm/byteorder.h arch/xtensa/include/uapi/asm/byteorder.h
+1 -1
arch/xtensa/include/asm/cacheflush.h
··· 165 165 static inline u32 xtensa_get_cacheattr(void) 166 166 { 167 167 u32 r; 168 - asm volatile(" rsr %0, CACHEATTR" : "=a"(r)); 168 + asm volatile(" rsr %0, cacheattr" : "=a"(r)); 169 169 return r; 170 170 } 171 171
+2 -2
arch/xtensa/include/asm/cmpxchg.h
··· 27 27 "bne %0, %2, 1f \n\t" 28 28 "s32i %3, %1, 0 \n\t" 29 29 "1: \n\t" 30 - "wsr a15, "__stringify(PS)" \n\t" 30 + "wsr a15, ps \n\t" 31 31 "rsync \n\t" 32 32 : "=&a" (old) 33 33 : "a" (p), "a" (old), "r" (new) ··· 97 97 __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" 98 98 "l32i %0, %1, 0 \n\t" 99 99 "s32i %2, %1, 0 \n\t" 100 - "wsr a15, "__stringify(PS)" \n\t" 100 + "wsr a15, ps \n\t" 101 101 "rsync \n\t" 102 102 : "=&a" (tmp) 103 103 : "a" (m), "a" (val)
+2 -3
arch/xtensa/include/asm/coprocessor.h
··· 94 94 #if XCHAL_HAVE_CP 95 95 96 96 #define RSR_CPENABLE(x) do { \ 97 - __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \ 97 + __asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \ 98 98 } while(0); 99 99 #define WSR_CPENABLE(x) do { \ 100 - __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \ 101 - :: "a" (x)); \ 100 + __asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \ 102 101 } while(0); 103 102 104 103 #endif /* XCHAL_HAVE_CP */
-6
arch/xtensa/include/asm/cputime.h
··· 1 - #ifndef _XTENSA_CPUTIME_H 2 - #define _XTENSA_CPUTIME_H 3 - 4 - #include <asm-generic/cputime.h> 5 - 6 - #endif /* _XTENSA_CPUTIME_H */
+1 -1
arch/xtensa/include/asm/delay.h
··· 27 27 static __inline__ u32 xtensa_get_ccount(void) 28 28 { 29 29 u32 ccount; 30 - asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount)); 30 + asm volatile ("rsr %0, ccount\n" : "=r" (ccount)); 31 31 return ccount; 32 32 } 33 33
-7
arch/xtensa/include/asm/device.h
··· 1 - /* 2 - * Arch specific extensions to struct device 3 - * 4 - * This file is released under the GPLv2 5 - */ 6 - #include <asm-generic/device.h> 7 -
-16
arch/xtensa/include/asm/div64.h
··· 1 - /* 2 - * include/asm-xtensa/div64.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2007 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_DIV64_H 12 - #define _XTENSA_DIV64_H 13 - 14 - #include <asm-generic/div64.h> 15 - 16 - #endif /* _XTENSA_DIV64_H */
-6
arch/xtensa/include/asm/emergency-restart.h
··· 1 - #ifndef _ASM_EMERGENCY_RESTART_H 2 - #define _ASM_EMERGENCY_RESTART_H 3 - 4 - #include <asm-generic/emergency-restart.h> 5 - 6 - #endif /* _ASM_EMERGENCY_RESTART_H */
-16
arch/xtensa/include/asm/errno.h
··· 1 - /* 2 - * include/asm-xtensa/errno.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General 5 - * Public License. See the file "COPYING" in the main directory of 6 - * this archive for more details. 7 - * 8 - * Copyright (C) 2002 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_ERRNO_H 12 - #define _XTENSA_ERRNO_H 13 - 14 - #include <asm-generic/errno.h> 15 - 16 - #endif /* _XTENSA_ERRNO_H */
-1
arch/xtensa/include/asm/fcntl.h
··· 1 - #include <asm-generic/fcntl.h>
-1
arch/xtensa/include/asm/futex.h
··· 1 - #include <asm-generic/futex.h>
-16
arch/xtensa/include/asm/hardirq.h
··· 1 - /* 2 - * include/asm-xtensa/hardirq.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General 5 - * Public License. See the file "COPYING" in the main directory of 6 - * this archive for more details. 7 - * 8 - * Copyright (C) 2002 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_HARDIRQ_H 12 - #define _XTENSA_HARDIRQ_H 13 - 14 - #include <asm-generic/hardirq.h> 15 - 16 - #endif /* _XTENSA_HARDIRQ_H */
-1
arch/xtensa/include/asm/ioctl.h
··· 1 - #include <asm-generic/ioctl.h>
arch/xtensa/include/asm/ioctls.h arch/xtensa/include/uapi/asm/ioctls.h
arch/xtensa/include/asm/ipcbuf.h arch/xtensa/include/uapi/asm/ipcbuf.h
-1
arch/xtensa/include/asm/irq_regs.h
··· 1 - #include <asm-generic/irq_regs.h>
+2 -2
arch/xtensa/include/asm/irqflags.h
··· 16 16 static inline unsigned long arch_local_save_flags(void) 17 17 { 18 18 unsigned long flags; 19 - asm volatile("rsr %0,"__stringify(PS) : "=a" (flags)); 19 + asm volatile("rsr %0, ps" : "=a" (flags)); 20 20 return flags; 21 21 } 22 22 ··· 41 41 42 42 static inline void arch_local_irq_restore(unsigned long flags) 43 43 { 44 - asm volatile("wsr %0, "__stringify(PS)" ; rsync" 44 + asm volatile("wsr %0, ps; rsync" 45 45 :: "a" (flags) : "memory"); 46 46 } 47 47
-1
arch/xtensa/include/asm/kdebug.h
··· 1 - #include <asm-generic/kdebug.h>
-6
arch/xtensa/include/asm/kmap_types.h
··· 1 - #ifndef _XTENSA_KMAP_TYPES_H 2 - #define _XTENSA_KMAP_TYPES_H 3 - 4 - #include <asm-generic/kmap_types.h> 5 - 6 - #endif /* _XTENSA_KMAP_TYPES_H */
-1
arch/xtensa/include/asm/kvm_para.h
··· 1 - #include <asm-generic/kvm_para.h>
-16
arch/xtensa/include/asm/local.h
··· 1 - /* 2 - * include/asm-xtensa/local.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_LOCAL_H 12 - #define _XTENSA_LOCAL_H 13 - 14 - #include <asm-generic/local.h> 15 - 16 - #endif /* _XTENSA_LOCAL_H */
-1
arch/xtensa/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
arch/xtensa/include/asm/mman.h arch/xtensa/include/uapi/asm/mman.h
+2 -2
arch/xtensa/include/asm/mmu_context.h
··· 51 51 52 52 static inline void set_rasid_register (unsigned long val) 53 53 { 54 - __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" 54 + __asm__ __volatile__ (" wsr %0, rasid\n\t" 55 55 " isync\n" : : "a" (val)); 56 56 } 57 57 58 58 static inline unsigned long get_rasid_register (void) 59 59 { 60 60 unsigned long tmp; 61 - __asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp)); 61 + __asm__ __volatile__ (" rsr %0, rasid\n\t" : "=a" (tmp)); 62 62 return tmp; 63 63 } 64 64
arch/xtensa/include/asm/msgbuf.h arch/xtensa/include/uapi/asm/msgbuf.h
+2 -18
arch/xtensa/include/asm/param.h
··· 7 7 * 8 8 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 9 */ 10 - 11 10 #ifndef _XTENSA_PARAM_H 12 11 #define _XTENSA_PARAM_H 13 12 14 - #ifdef __KERNEL__ 13 + #include <uapi/asm/param.h> 14 + 15 15 # define HZ CONFIG_HZ /* internal timer frequency */ 16 16 # define USER_HZ 100 /* for user interfaces in "ticks" */ 17 17 # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ 18 - #else 19 - # define HZ 100 20 - #endif 21 - 22 - #define EXEC_PAGESIZE 4096 23 - 24 - #ifndef NGROUPS 25 - #define NGROUPS 32 26 - #endif 27 - 28 - #ifndef NOGROUP 29 - #define NOGROUP (-1) 30 - #endif 31 - 32 - #define MAXHOSTNAMELEN 64 /* max length of hostname */ 33 - 34 18 #endif /* _XTENSA_PARAM_H */
-16
arch/xtensa/include/asm/percpu.h
··· 1 - /* 2 - * linux/include/asm-xtensa/percpu.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_PERCPU__ 12 - #define _XTENSA_PERCPU__ 13 - 14 - #include <asm-generic/percpu.h> 15 - 16 - #endif /* _XTENSA_PERCPU__ */
arch/xtensa/include/asm/poll.h arch/xtensa/include/uapi/asm/poll.h
arch/xtensa/include/asm/posix_types.h arch/xtensa/include/uapi/asm/posix_types.h
+1 -65
arch/xtensa/include/asm/ptrace.h
··· 7 7 * 8 8 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 9 */ 10 - 11 10 #ifndef _XTENSA_PTRACE_H 12 11 #define _XTENSA_PTRACE_H 13 12 14 - /* 15 - * Kernel stack 16 - * 17 - * +-----------------------+ -------- STACK_SIZE 18 - * | register file | | 19 - * +-----------------------+ | 20 - * | struct pt_regs | | 21 - * +-----------------------+ | ------ PT_REGS_OFFSET 22 - * double : 16 bytes spill area : | ^ 23 - * excetion :- - - - - - - - - - - -: | | 24 - * frame : struct pt_regs : | | 25 - * :- - - - - - - - - - - -: | | 26 - * | | | | 27 - * | memory stack | | | 28 - * | | | | 29 - * ~ ~ ~ ~ 30 - * ~ ~ ~ ~ 31 - * | | | | 32 - * | | | | 33 - * +-----------------------+ | | --- STACK_BIAS 34 - * | struct task_struct | | | ^ 35 - * current --> +-----------------------+ | | | 36 - * | struct thread_info | | | | 37 - * +-----------------------+ -------- 38 - */ 13 + #include <uapi/asm/ptrace.h> 39 14 40 - #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) 41 - 42 - /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ 43 - 44 - #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ 45 - #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ 46 - #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ 47 - #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ 48 - #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ 49 - #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ 50 - #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ 51 - #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ 52 - #define EXC_TABLE_SIZE 0x400 53 - 54 - /* Registers used by strace */ 55 - 56 - #define REG_A_BASE 0x0000 57 - #define REG_AR_BASE 0x0100 58 - #define REG_PC 0x0020 59 - #define REG_PS 0x02e6 60 - #define REG_WB 0x0248 61 - #define REG_WS 0x0249 62 - #define REG_LBEG 0x0200 63 - #define REG_LEND 0x0201 64 - #define REG_LCOUNT 0x0202 65 - #define REG_SAR 0x0203 66 - 67 - #define SYSCALL_NR 0x00ff 68 - 69 - /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ 70 - 71 - #define PTRACE_GETREGS 12 72 - #define PTRACE_SETREGS 13 73 - #define PTRACE_GETXTREGS 18 74 - #define PTRACE_SETXTREGS 19 75 - 76 - #ifdef __KERNEL__ 77 15 78 16 #ifndef __ASSEMBLY__ 79 17 ··· 69 131 #define PT_REGS_OFFSET (KERNEL_STACK_SIZE - PT_USER_SIZE) 70 132 71 133 #endif /* !__ASSEMBLY__ */ 72 - 73 - #endif /* __KERNEL__ */ 74 134 75 135 #endif /* _XTENSA_PTRACE_H */
+9 -46
arch/xtensa/include/asm/regs.h
··· 27 27 28 28 /* Special registers. */ 29 29 30 - #define LBEG 0 31 - #define LEND 1 32 - #define LCOUNT 2 33 - #define SAR 3 34 - #define BR 4 35 - #define SCOMPARE1 12 36 - #define ACCHI 16 37 - #define ACCLO 17 38 - #define MR 32 39 - #define WINDOWBASE 72 40 - #define WINDOWSTART 73 41 - #define PTEVADDR 83 42 - #define RASID 90 43 - #define ITLBCFG 91 44 - #define DTLBCFG 92 45 - #define IBREAKENABLE 96 46 - #define DDR 104 47 - #define IBREAKA 128 48 - #define DBREAKA 144 49 - #define DBREAKC 160 50 - #define EPC 176 51 - #define EPC_1 177 52 - #define DEPC 192 53 - #define EPS 192 54 - #define EPS_1 193 55 - #define EXCSAVE 208 56 - #define EXCSAVE_1 209 57 - #define INTERRUPT 226 58 - #define INTENABLE 228 59 - #define PS 230 60 - #define THREADPTR 231 61 - #define EXCCAUSE 232 62 - #define DEBUGCAUSE 233 63 - #define CCOUNT 234 64 - #define PRID 235 65 - #define ICOUNT 236 66 - #define ICOUNTLEVEL 237 67 - #define EXCVADDR 238 68 - #define CCOMPARE 240 69 - #define MISC_SR 244 70 - 71 - /* Special names for read-only and write-only interrupt registers. */ 72 - 73 - #define INTREAD 226 74 - #define INTSET 226 75 - #define INTCLEAR 227 30 + #define SREG_MR 32 31 + #define SREG_IBREAKA 128 32 + #define SREG_DBREAKA 144 33 + #define SREG_DBREAKC 160 34 + #define SREG_EPC 176 35 + #define SREG_EPS 192 36 + #define SREG_EXCSAVE 208 37 + #define SREG_CCOMPARE 240 38 + #define SREG_MISC 244 76 39 77 40 /* EXCCAUSE register fields */ 78 41
-16
arch/xtensa/include/asm/resource.h
··· 1 - /* 2 - * include/asm-xtensa/resource.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_RESOURCE_H 12 - #define _XTENSA_RESOURCE_H 13 - 14 - #include <asm-generic/resource.h> 15 - 16 - #endif /* _XTENSA_RESOURCE_H */
-16
arch/xtensa/include/asm/scatterlist.h
··· 1 - /* 2 - * include/asm-xtensa/scatterlist.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_SCATTERLIST_H 12 - #define _XTENSA_SCATTERLIST_H 13 - 14 - #include <asm-generic/scatterlist.h> 15 - 16 - #endif /* _XTENSA_SCATTERLIST_H */
-16
arch/xtensa/include/asm/sections.h
··· 1 - /* 2 - * include/asm-xtensa/sections.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_SECTIONS_H 12 - #define _XTENSA_SECTIONS_H 13 - 14 - #include <asm-generic/sections.h> 15 - 16 - #endif /* _XTENSA_SECTIONS_H */
arch/xtensa/include/asm/sembuf.h arch/xtensa/include/uapi/asm/sembuf.h
arch/xtensa/include/asm/setup.h arch/xtensa/include/uapi/asm/setup.h
arch/xtensa/include/asm/shmbuf.h arch/xtensa/include/uapi/asm/shmbuf.h
arch/xtensa/include/asm/sigcontext.h arch/xtensa/include/uapi/asm/sigcontext.h
-16
arch/xtensa/include/asm/siginfo.h
··· 1 - /* 2 - * include/asm-xtensa/siginfo.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_SIGINFO_H 12 - #define _XTENSA_SIGINFO_H 13 - 14 - #include <asm-generic/siginfo.h> 15 - 16 - #endif /* _XTENSA_SIGINFO_H */
+1 -133
arch/xtensa/include/asm/signal.h
··· 9 9 * 10 10 * Copyright (C) 2001 - 2005 Tensilica Inc. 11 11 */ 12 - 13 12 #ifndef _XTENSA_SIGNAL_H 14 13 #define _XTENSA_SIGNAL_H 15 14 16 - 17 - #define _NSIG 64 18 - #define _NSIG_BPW 32 19 - #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 15 + #include <uapi/asm/signal.h> 20 16 21 17 #ifndef __ASSEMBLY__ 22 - 23 - #include <linux/types.h> 24 - 25 - /* Avoid too many header ordering problems. */ 26 - struct siginfo; 27 - typedef unsigned long old_sigset_t; /* at least 32 bits */ 28 - typedef struct { 29 - unsigned long sig[_NSIG_WORDS]; 30 - } sigset_t; 31 - 32 - #endif 33 - 34 - #define SIGHUP 1 35 - #define SIGINT 2 36 - #define SIGQUIT 3 37 - #define SIGILL 4 38 - #define SIGTRAP 5 39 - #define SIGABRT 6 40 - #define SIGIOT 6 41 - #define SIGBUS 7 42 - #define SIGFPE 8 43 - #define SIGKILL 9 44 - #define SIGUSR1 10 45 - #define SIGSEGV 11 46 - #define SIGUSR2 12 47 - #define SIGPIPE 13 48 - #define SIGALRM 14 49 - #define SIGTERM 15 50 - #define SIGSTKFLT 16 51 - #define SIGCHLD 17 52 - #define SIGCONT 18 53 - #define SIGSTOP 19 54 - #define SIGTSTP 20 55 - #define SIGTTIN 21 56 - #define SIGTTOU 22 57 - #define SIGURG 23 58 - #define SIGXCPU 24 59 - #define SIGXFSZ 25 60 - #define SIGVTALRM 26 61 - #define SIGPROF 27 62 - #define SIGWINCH 28 63 - #define SIGIO 29 64 - #define SIGPOLL SIGIO 65 - /* #define SIGLOST 29 */ 66 - #define SIGPWR 30 67 - #define SIGSYS 31 68 - #define SIGUNUSED 31 69 - 70 - /* These should not be considered constants from userland. */ 71 - #define SIGRTMIN 32 72 - #define SIGRTMAX (_NSIG-1) 73 - 74 - /* 75 - * SA_FLAGS values: 76 - * 77 - * SA_ONSTACK indicates that a registered stack_t will be used. 78 - * SA_RESTART flag to get restarting signals (which were the default long ago) 79 - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 80 - * SA_RESETHAND clears the handler when the signal is delivered. 81 - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 82 - * SA_NODEFER prevents the current signal from being masked in the handler. 83 - * 84 - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 85 - * Unix names RESETHAND and NODEFER respectively. 86 - */ 87 - #define SA_NOCLDSTOP 0x00000001 88 - #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ 89 - #define SA_SIGINFO 0x00000004 90 - #define SA_ONSTACK 0x08000000 91 - #define SA_RESTART 0x10000000 92 - #define SA_NODEFER 0x40000000 93 - #define SA_RESETHAND 0x80000000 94 - 95 - #define SA_NOMASK SA_NODEFER 96 - #define SA_ONESHOT SA_RESETHAND 97 - 98 - #define SA_RESTORER 0x04000000 99 - 100 - /* 101 - * sigaltstack controls 102 - */ 103 - #define SS_ONSTACK 1 104 - #define SS_DISABLE 2 105 - 106 - #define MINSIGSTKSZ 2048 107 - #define SIGSTKSZ 8192 108 - 109 - #ifndef __ASSEMBLY__ 110 - 111 - #define SIG_BLOCK 0 /* for blocking signals */ 112 - #define SIG_UNBLOCK 1 /* for unblocking signals */ 113 - #define SIG_SETMASK 2 /* for setting the signal mask */ 114 - 115 - /* Type of a signal handler. */ 116 - typedef void (*__sighandler_t)(int); 117 - 118 - #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ 119 - #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ 120 - #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ 121 - 122 - #ifdef __KERNEL__ 123 18 struct sigaction { 124 19 __sighandler_t sa_handler; 125 20 unsigned long sa_flags; ··· 26 131 struct sigaction sa; 27 132 }; 28 133 29 - #else 30 - 31 - /* Here we must cater to libcs that poke about in kernel headers. */ 32 - 33 - struct sigaction { 34 - union { 35 - __sighandler_t _sa_handler; 36 - void (*_sa_sigaction)(int, struct siginfo *, void *); 37 - } _u; 38 - sigset_t sa_mask; 39 - unsigned long sa_flags; 40 - void (*sa_restorer)(void); 41 - }; 42 - 43 - #define sa_handler _u._sa_handler 44 - #define sa_sigaction _u._sa_sigaction 45 - 46 - #endif /* __KERNEL__ */ 47 - 48 - typedef struct sigaltstack { 49 - void *ss_sp; 50 - int ss_flags; 51 - size_t ss_size; 52 - } stack_t; 53 - 54 - #ifdef __KERNEL__ 55 134 #include <asm/sigcontext.h> 56 135 #define ptrace_signal_deliver(regs, cookie) do { } while (0) 57 136 58 - #endif /* __KERNEL__ */ 59 137 #endif /* __ASSEMBLY__ */ 60 138 #endif /* _XTENSA_SIGNAL_H */
arch/xtensa/include/asm/socket.h arch/xtensa/include/uapi/asm/socket.h
arch/xtensa/include/asm/sockios.h arch/xtensa/include/uapi/asm/sockios.h
arch/xtensa/include/asm/stat.h arch/xtensa/include/uapi/asm/stat.h
-17
arch/xtensa/include/asm/statfs.h
··· 1 - /* 2 - * include/asm-xtensa/statfs.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_STATFS_H 12 - #define _XTENSA_STATFS_H 13 - 14 - #include <asm-generic/statfs.h> 15 - 16 - #endif /* _XTENSA_STATFS_H */ 17 -
arch/xtensa/include/asm/swab.h arch/xtensa/include/uapi/asm/swab.h
arch/xtensa/include/asm/termbits.h arch/xtensa/include/uapi/asm/termbits.h
-105
arch/xtensa/include/asm/termios.h
··· 1 - /* 2 - * include/asm-xtensa/termios.h 3 - * 4 - * Copied from SH. 5 - * 6 - * This file is subject to the terms and conditions of the GNU General Public 7 - * License. See the file "COPYING" in the main directory of this archive 8 - * for more details. 9 - * 10 - * Copyright (C) 2001 - 2005 Tensilica Inc. 11 - */ 12 - 13 - #ifndef _XTENSA_TERMIOS_H 14 - #define _XTENSA_TERMIOS_H 15 - 16 - #include <asm/termbits.h> 17 - #include <asm/ioctls.h> 18 - 19 - struct winsize { 20 - unsigned short ws_row; 21 - unsigned short ws_col; 22 - unsigned short ws_xpixel; 23 - unsigned short ws_ypixel; 24 - }; 25 - 26 - #define NCC 8 27 - struct termio { 28 - unsigned short c_iflag; /* input mode flags */ 29 - unsigned short c_oflag; /* output mode flags */ 30 - unsigned short c_cflag; /* control mode flags */ 31 - unsigned short c_lflag; /* local mode flags */ 32 - unsigned char c_line; /* line discipline */ 33 - unsigned char c_cc[NCC]; /* control characters */ 34 - }; 35 - 36 - /* Modem lines */ 37 - 38 - #define TIOCM_LE 0x001 39 - #define TIOCM_DTR 0x002 40 - #define TIOCM_RTS 0x004 41 - #define TIOCM_ST 0x008 42 - #define TIOCM_SR 0x010 43 - #define TIOCM_CTS 0x020 44 - #define TIOCM_CAR 0x040 45 - #define TIOCM_RNG 0x080 46 - #define TIOCM_DSR 0x100 47 - #define TIOCM_CD TIOCM_CAR 48 - #define TIOCM_RI TIOCM_RNG 49 - #define TIOCM_OUT1 0x2000 50 - #define TIOCM_OUT2 0x4000 51 - #define TIOCM_LOOP 0x8000 52 - 53 - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 54 - 55 - #ifdef __KERNEL__ 56 - 57 - /* intr=^C quit=^\ erase=del kill=^U 58 - eof=^D vtime=\0 vmin=\1 sxtc=\0 59 - start=^Q stop=^S susp=^Z eol=\0 60 - reprint=^R discard=^U werase=^W lnext=^V 61 - eol2=\0 62 - */ 63 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 64 - 65 - /* 66 - * Translate a "termio" structure into a "termios". Ugh. 67 - */ 68 - 69 - #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ 70 - unsigned short __tmp; \ 71 - get_user(__tmp,&(termio)->x); \ 72 - *(unsigned short *) &(termios)->x = __tmp; \ 73 - } 74 - 75 - #define user_termio_to_kernel_termios(termios, termio) \ 76 - ({ \ 77 - SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ 78 - SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ 79 - SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ 80 - SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ 81 - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ 82 - }) 83 - 84 - /* 85 - * Translate a "termios" structure into a "termio". Ugh. 86 - */ 87 - 88 - #define kernel_termios_to_user_termio(termio, termios) \ 89 - ({ \ 90 - put_user((termios)->c_iflag, &(termio)->c_iflag); \ 91 - put_user((termios)->c_oflag, &(termio)->c_oflag); \ 92 - put_user((termios)->c_cflag, &(termio)->c_cflag); \ 93 - put_user((termios)->c_lflag, &(termio)->c_lflag); \ 94 - put_user((termios)->c_line, &(termio)->c_line); \ 95 - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 96 - }) 97 - 98 - #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) 99 - #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) 100 - #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) 101 - #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) 102 - 103 - #endif /* __KERNEL__ */ 104 - 105 - #endif /* _XTENSA_TERMIOS_H */
+4 -4
arch/xtensa/include/asm/timex.h
··· 63 63 * Register access. 64 64 */ 65 65 66 - #define WSR_CCOUNT(r) asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r)) 67 - #define RSR_CCOUNT(r) asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r)) 68 - #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) 69 - #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) 66 + #define WSR_CCOUNT(r) asm volatile ("wsr %0, ccount" :: "a" (r)) 67 + #define RSR_CCOUNT(r) asm volatile ("rsr %0, ccount" : "=a" (r)) 68 + #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) :: "a"(r)) 69 + #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) : "=a"(r)) 70 70 71 71 static inline unsigned long get_ccount (void) 72 72 {
+4 -4
arch/xtensa/include/asm/tlbflush.h
··· 86 86 87 87 static inline void set_itlbcfg_register (unsigned long val) 88 88 { 89 - __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" 89 + __asm__ __volatile__("wsr %0, itlbcfg\n\t" "isync\n\t" 90 90 : : "a" (val)); 91 91 } 92 92 93 93 static inline void set_dtlbcfg_register (unsigned long val) 94 94 { 95 - __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" 95 + __asm__ __volatile__("wsr %0, dtlbcfg; dsync\n\t" 96 96 : : "a" (val)); 97 97 } 98 98 99 99 static inline void set_ptevaddr_register (unsigned long val) 100 100 { 101 - __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" 101 + __asm__ __volatile__(" wsr %0, ptevaddr; isync\n" 102 102 : : "a" (val)); 103 103 } 104 104 105 105 static inline unsigned long read_ptevaddr_register (void) 106 106 { 107 107 unsigned long tmp; 108 - __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); 108 + __asm__ __volatile__("rsr %0, ptevaddr\n\t" : "=a" (tmp)); 109 109 return tmp; 110 110 } 111 111
-16
arch/xtensa/include/asm/topology.h
··· 1 - /* 2 - * include/asm-xtensa/topology.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_TOPOLOGY_H 12 - #define _XTENSA_TOPOLOGY_H 13 - 14 - #include <asm-generic/topology.h> 15 - 16 - #endif /* _XTENSA_TOPOLOGY_H */
+1 -14
arch/xtensa/include/asm/types.h
··· 7 7 * 8 8 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 9 */ 10 - 11 10 #ifndef _XTENSA_TYPES_H 12 11 #define _XTENSA_TYPES_H 13 12 14 - #include <asm-generic/int-ll64.h> 15 - 16 - #ifdef __ASSEMBLY__ 17 - # define __XTENSA_UL(x) (x) 18 - # define __XTENSA_UL_CONST(x) x 19 - #else 20 - # define __XTENSA_UL(x) ((unsigned long)(x)) 21 - # define __XTENSA_UL_CONST(x) x##UL 22 - #endif 13 + #include <uapi/asm/types.h> 23 14 24 15 #ifndef __ASSEMBLY__ 25 - 26 16 /* 27 17 * These aren't exported outside the kernel to avoid name space clashes 28 18 */ 29 - #ifdef __KERNEL__ 30 19 31 20 #define BITS_PER_LONG 32 32 21 33 - #endif /* __KERNEL__ */ 34 22 #endif 35 - 36 23 #endif /* _XTENSA_TYPES_H */
+1 -701
arch/xtensa/include/asm/unistd.h
··· 8 8 * Copyright (C) 2001 - 2005 Tensilica Inc. 9 9 */ 10 10 11 - #ifndef _XTENSA_UNISTD_H 12 - #define _XTENSA_UNISTD_H 11 + #include <uapi/asm/unistd.h> 13 12 14 - #ifndef __SYSCALL 15 - # define __SYSCALL(nr,func,nargs) 16 - #endif 17 - 18 - #define __NR_spill 0 19 - __SYSCALL( 0, sys_ni_syscall, 0) 20 - #define __NR_xtensa 1 21 - __SYSCALL( 1, sys_ni_syscall, 0) 22 - #define __NR_available4 2 23 - __SYSCALL( 2, sys_ni_syscall, 0) 24 - #define __NR_available5 3 25 - __SYSCALL( 3, sys_ni_syscall, 0) 26 - #define __NR_available6 4 27 - __SYSCALL( 4, sys_ni_syscall, 0) 28 - #define __NR_available7 5 29 - __SYSCALL( 5, sys_ni_syscall, 0) 30 - #define __NR_available8 6 31 - __SYSCALL( 6, sys_ni_syscall, 0) 32 - #define __NR_available9 7 33 - __SYSCALL( 7, sys_ni_syscall, 0) 34 - 35 - /* File Operations */ 36 - 37 - #define __NR_open 8 38 - __SYSCALL( 8, sys_open, 3) 39 - #define __NR_close 9 40 - __SYSCALL( 9, sys_close, 1) 41 - #define __NR_dup 10 42 - __SYSCALL( 10, sys_dup, 1) 43 - #define __NR_dup2 11 44 - __SYSCALL( 11, sys_dup2, 2) 45 - #define __NR_read 12 46 - __SYSCALL( 12, sys_read, 3) 47 - #define __NR_write 13 48 - __SYSCALL( 13, sys_write, 3) 49 - #define __NR_select 14 50 - __SYSCALL( 14, sys_select, 5) 51 - #define __NR_lseek 15 52 - __SYSCALL( 15, sys_lseek, 3) 53 - #define __NR_poll 16 54 - __SYSCALL( 16, sys_poll, 3) 55 - #define __NR__llseek 17 56 - __SYSCALL( 17, sys_llseek, 5) 57 - #define __NR_epoll_wait 18 58 - __SYSCALL( 18, sys_epoll_wait, 4) 59 - #define __NR_epoll_ctl 19 60 - __SYSCALL( 19, sys_epoll_ctl, 4) 61 - #define __NR_epoll_create 20 62 - __SYSCALL( 20, sys_epoll_create, 1) 63 - #define __NR_creat 21 64 - __SYSCALL( 21, sys_creat, 2) 65 - #define __NR_truncate 22 66 - __SYSCALL( 22, sys_truncate, 2) 67 - #define __NR_ftruncate 23 68 - __SYSCALL( 23, sys_ftruncate, 2) 69 - #define __NR_readv 24 70 - __SYSCALL( 24, sys_readv, 3) 71 - #define __NR_writev 25 72 - __SYSCALL( 25, sys_writev, 3) 73 - #define __NR_fsync 26 74 - __SYSCALL( 26, sys_fsync, 1) 75 - #define __NR_fdatasync 27 76 - __SYSCALL( 27, sys_fdatasync, 1) 77 - #define __NR_truncate64 28 78 - __SYSCALL( 28, sys_truncate64, 2) 79 - #define __NR_ftruncate64 29 80 - __SYSCALL( 29, sys_ftruncate64, 2) 81 - #define __NR_pread64 30 82 - __SYSCALL( 30, sys_pread64, 6) 83 - #define __NR_pwrite64 31 84 - __SYSCALL( 31, sys_pwrite64, 6) 85 - 86 - #define __NR_link 32 87 - __SYSCALL( 32, sys_link, 2) 88 - #define __NR_rename 33 89 - __SYSCALL( 33, sys_rename, 2) 90 - #define __NR_symlink 34 91 - __SYSCALL( 34, sys_symlink, 2) 92 - #define __NR_readlink 35 93 - __SYSCALL( 35, sys_readlink, 3) 94 - #define __NR_mknod 36 95 - __SYSCALL( 36, sys_mknod, 3) 96 - #define __NR_pipe 37 97 - __SYSCALL( 37, sys_pipe, 1) 98 - #define __NR_unlink 38 99 - __SYSCALL( 38, sys_unlink, 1) 100 - #define __NR_rmdir 39 101 - __SYSCALL( 39, sys_rmdir, 1) 102 - 103 - #define __NR_mkdir 40 104 - __SYSCALL( 40, sys_mkdir, 2) 105 - #define __NR_chdir 41 106 - __SYSCALL( 41, sys_chdir, 1) 107 - #define __NR_fchdir 42 108 - __SYSCALL( 42, sys_fchdir, 1) 109 - #define __NR_getcwd 43 110 - __SYSCALL( 43, sys_getcwd, 2) 111 - 112 - #define __NR_chmod 44 113 - __SYSCALL( 44, sys_chmod, 2) 114 - #define __NR_chown 45 115 - __SYSCALL( 45, sys_chown, 3) 116 - #define __NR_stat 46 117 - __SYSCALL( 46, sys_newstat, 2) 118 - #define __NR_stat64 47 119 - __SYSCALL( 47, sys_stat64, 2) 120 - 121 - #define __NR_lchown 48 122 - __SYSCALL( 48, sys_lchown, 3) 123 - #define __NR_lstat 49 124 - __SYSCALL( 49, sys_newlstat, 2) 125 - #define __NR_lstat64 50 126 - __SYSCALL( 50, sys_lstat64, 2) 127 - #define __NR_available51 51 128 - __SYSCALL( 51, sys_ni_syscall, 0) 129 - 130 - #define __NR_fchmod 52 131 - __SYSCALL( 52, sys_fchmod, 2) 132 - #define __NR_fchown 53 133 - __SYSCALL( 53, sys_fchown, 3) 134 - #define __NR_fstat 54 135 - __SYSCALL( 54, sys_newfstat, 2) 136 - #define __NR_fstat64 55 137 - __SYSCALL( 55, sys_fstat64, 2) 138 - 139 - #define __NR_flock 56 140 - __SYSCALL( 56, sys_flock, 2) 141 - #define __NR_access 57 142 - __SYSCALL( 57, sys_access, 2) 143 - #define __NR_umask 58 144 - __SYSCALL( 58, sys_umask, 1) 145 - #define __NR_getdents 59 146 - __SYSCALL( 59, sys_getdents, 3) 147 - #define __NR_getdents64 60 148 - __SYSCALL( 60, sys_getdents64, 3) 149 - #define __NR_fcntl64 61 150 - __SYSCALL( 61, sys_fcntl64, 3) 151 - #define __NR_available62 62 152 - __SYSCALL( 62, sys_ni_syscall, 0) 153 - #define __NR_fadvise64_64 63 154 - __SYSCALL( 63, xtensa_fadvise64_64, 6) 155 - #define __NR_utime 64 /* glibc 2.3.3 ?? */ 156 - __SYSCALL( 64, sys_utime, 2) 157 - #define __NR_utimes 65 158 - __SYSCALL( 65, sys_utimes, 2) 159 - #define __NR_ioctl 66 160 - __SYSCALL( 66, sys_ioctl, 3) 161 - #define __NR_fcntl 67 162 - __SYSCALL( 67, sys_fcntl, 3) 163 - 164 - #define __NR_setxattr 68 165 - __SYSCALL( 68, sys_setxattr, 5) 166 - #define __NR_getxattr 69 167 - __SYSCALL( 69, sys_getxattr, 4) 168 - #define __NR_listxattr 70 169 - __SYSCALL( 70, sys_listxattr, 3) 170 - #define __NR_removexattr 71 171 - __SYSCALL( 71, sys_removexattr, 2) 172 - #define __NR_lsetxattr 72 173 - __SYSCALL( 72, sys_lsetxattr, 5) 174 - #define __NR_lgetxattr 73 175 - __SYSCALL( 73, sys_lgetxattr, 4) 176 - #define __NR_llistxattr 74 177 - __SYSCALL( 74, sys_llistxattr, 3) 178 - #define __NR_lremovexattr 75 179 - __SYSCALL( 75, sys_lremovexattr, 2) 180 - #define __NR_fsetxattr 76 181 - __SYSCALL( 76, sys_fsetxattr, 5) 182 - #define __NR_fgetxattr 77 183 - __SYSCALL( 77, sys_fgetxattr, 4) 184 - #define __NR_flistxattr 78 185 - __SYSCALL( 78, sys_flistxattr, 3) 186 - #define __NR_fremovexattr 79 187 - __SYSCALL( 79, sys_fremovexattr, 2) 188 - 189 - /* File Map / Shared Memory Operations */ 190 - 191 - #define __NR_mmap2 80 192 - __SYSCALL( 80, sys_mmap_pgoff, 6) 193 - #define __NR_munmap 81 194 - __SYSCALL( 81, sys_munmap, 2) 195 - #define __NR_mprotect 82 196 - __SYSCALL( 82, sys_mprotect, 3) 197 - #define __NR_brk 83 198 - __SYSCALL( 83, sys_brk, 1) 199 - #define __NR_mlock 84 200 - __SYSCALL( 84, sys_mlock, 2) 201 - #define __NR_munlock 85 202 - __SYSCALL( 85, sys_munlock, 2) 203 - #define __NR_mlockall 86 204 - __SYSCALL( 86, sys_mlockall, 1) 205 - #define __NR_munlockall 87 206 - __SYSCALL( 87, sys_munlockall, 0) 207 - #define __NR_mremap 88 208 - __SYSCALL( 88, sys_mremap, 4) 209 - #define __NR_msync 89 210 - __SYSCALL( 89, sys_msync, 3) 211 - #define __NR_mincore 90 212 - __SYSCALL( 90, sys_mincore, 3) 213 - #define __NR_madvise 91 214 - __SYSCALL( 91, sys_madvise, 3) 215 - #define __NR_shmget 92 216 - __SYSCALL( 92, sys_shmget, 4) 217 - #define __NR_shmat 93 218 - __SYSCALL( 93, xtensa_shmat, 4) 219 - #define __NR_shmctl 94 220 - __SYSCALL( 94, sys_shmctl, 4) 221 - #define __NR_shmdt 95 222 - __SYSCALL( 95, sys_shmdt, 4) 223 - 224 - /* Socket Operations */ 225 - 226 - #define __NR_socket 96 227 - __SYSCALL( 96, sys_socket, 3) 228 - #define __NR_setsockopt 97 229 - __SYSCALL( 97, sys_setsockopt, 5) 230 - #define __NR_getsockopt 98 231 - __SYSCALL( 98, sys_getsockopt, 5) 232 - #define __NR_shutdown 99 233 - __SYSCALL( 99, sys_shutdown, 2) 234 - 235 - #define __NR_bind 100 236 - __SYSCALL(100, sys_bind, 3) 237 - #define __NR_connect 101 238 - __SYSCALL(101, sys_connect, 3) 239 - #define __NR_listen 102 240 - __SYSCALL(102, sys_listen, 2) 241 - #define __NR_accept 103 242 - __SYSCALL(103, sys_accept, 3) 243 - 244 - #define __NR_getsockname 104 245 - __SYSCALL(104, sys_getsockname, 3) 246 - #define __NR_getpeername 105 247 - __SYSCALL(105, sys_getpeername, 3) 248 - #define __NR_sendmsg 106 249 - __SYSCALL(106, sys_sendmsg, 3) 250 - #define __NR_recvmsg 107 251 - __SYSCALL(107, sys_recvmsg, 3) 252 - #define __NR_send 108 253 - __SYSCALL(108, sys_send, 4) 254 - #define __NR_recv 109 255 - __SYSCALL(109, sys_recv, 4) 256 - #define __NR_sendto 110 257 - __SYSCALL(110, sys_sendto, 6) 258 - #define __NR_recvfrom 111 259 - __SYSCALL(111, sys_recvfrom, 6) 260 - 261 - #define __NR_socketpair 112 262 - __SYSCALL(112, sys_socketpair, 4) 263 - #define __NR_sendfile 113 264 - __SYSCALL(113, sys_sendfile, 4) 265 - #define __NR_sendfile64 114 266 - __SYSCALL(114, sys_sendfile64, 4) 267 - #define __NR_available115 115 268 - __SYSCALL(115, sys_ni_syscall, 0) 269 - 270 - /* Process Operations */ 271 - 272 - #define __NR_clone 116 273 - __SYSCALL(116, xtensa_clone, 5) 274 - #define __NR_execve 117 275 - __SYSCALL(117, xtensa_execve, 3) 276 - #define __NR_exit 118 277 - __SYSCALL(118, sys_exit, 1) 278 - #define __NR_exit_group 119 279 - __SYSCALL(119, sys_exit_group, 1) 280 - #define __NR_getpid 120 281 - __SYSCALL(120, sys_getpid, 0) 282 - #define __NR_wait4 121 283 - __SYSCALL(121, sys_wait4, 4) 284 - #define __NR_waitid 122 285 - __SYSCALL(122, sys_waitid, 5) 286 - #define __NR_kill 123 287 - __SYSCALL(123, sys_kill, 2) 288 - #define __NR_tkill 124 289 - __SYSCALL(124, sys_tkill, 2) 290 - #define __NR_tgkill 125 291 - __SYSCALL(125, sys_tgkill, 3) 292 - #define __NR_set_tid_address 126 293 - __SYSCALL(126, sys_set_tid_address, 1) 294 - #define __NR_gettid 127 295 - __SYSCALL(127, sys_gettid, 0) 296 - #define __NR_setsid 128 297 - __SYSCALL(128, sys_setsid, 0) 298 - #define __NR_getsid 129 299 - __SYSCALL(129, sys_getsid, 1) 300 - #define __NR_prctl 130 301 - __SYSCALL(130, sys_prctl, 5) 302 - #define __NR_personality 131 303 - __SYSCALL(131, sys_personality, 1) 304 - #define __NR_getpriority 132 305 - __SYSCALL(132, sys_getpriority, 2) 306 - #define __NR_setpriority 133 307 - __SYSCALL(133, sys_setpriority, 3) 308 - #define __NR_setitimer 134 309 - __SYSCALL(134, sys_setitimer, 3) 310 - #define __NR_getitimer 135 311 - __SYSCALL(135, sys_getitimer, 2) 312 - #define __NR_setuid 136 313 - __SYSCALL(136, sys_setuid, 1) 314 - #define __NR_getuid 137 315 - __SYSCALL(137, sys_getuid, 0) 316 - #define __NR_setgid 138 317 - __SYSCALL(138, sys_setgid, 1) 318 - #define __NR_getgid 139 319 - __SYSCALL(139, sys_getgid, 0) 320 - #define __NR_geteuid 140 321 - __SYSCALL(140, sys_geteuid, 0) 322 - #define __NR_getegid 141 323 - __SYSCALL(141, sys_getegid, 0) 324 - #define __NR_setreuid 142 325 - __SYSCALL(142, sys_setreuid, 2) 326 - #define __NR_setregid 143 327 - __SYSCALL(143, sys_setregid, 2) 328 - #define __NR_setresuid 144 329 - __SYSCALL(144, sys_setresuid, 3) 330 - #define __NR_getresuid 145 331 - __SYSCALL(145, sys_getresuid, 3) 332 - #define __NR_setresgid 146 333 - __SYSCALL(146, sys_setresgid, 3) 334 - #define __NR_getresgid 147 335 - __SYSCALL(147, sys_getresgid, 3) 336 - #define __NR_setpgid 148 337 - __SYSCALL(148, sys_setpgid, 2) 338 - #define __NR_getpgid 149 339 - __SYSCALL(149, sys_getpgid, 1) 340 - #define __NR_getppid 150 341 - __SYSCALL(150, sys_getppid, 0) 342 - #define __NR_getpgrp 151 343 - __SYSCALL(151, sys_getpgrp, 0) 344 - 345 - #define __NR_reserved152 152 /* set_thread_area */ 346 - __SYSCALL(152, sys_ni_syscall, 0) 347 - #define __NR_reserved153 153 /* get_thread_area */ 348 - __SYSCALL(153, sys_ni_syscall, 0) 349 - #define __NR_times 154 350 - __SYSCALL(154, sys_times, 1) 351 - #define __NR_acct 155 352 - __SYSCALL(155, sys_acct, 1) 353 - #define __NR_sched_setaffinity 156 354 - __SYSCALL(156, sys_sched_setaffinity, 3) 355 - #define __NR_sched_getaffinity 157 356 - __SYSCALL(157, sys_sched_getaffinity, 3) 357 - #define __NR_capget 158 358 - __SYSCALL(158, sys_capget, 2) 359 - #define __NR_capset 159 360 - __SYSCALL(159, sys_capset, 2) 361 - #define __NR_ptrace 160 362 - __SYSCALL(160, sys_ptrace, 4) 363 - #define __NR_semtimedop 161 364 - __SYSCALL(161, sys_semtimedop, 5) 365 - #define __NR_semget 162 366 - __SYSCALL(162, sys_semget, 4) 367 - #define __NR_semop 163 368 - __SYSCALL(163, sys_semop, 4) 369 - #define __NR_semctl 164 370 - __SYSCALL(164, sys_semctl, 4) 371 - #define __NR_available165 165 372 - __SYSCALL(165, sys_ni_syscall, 0) 373 - #define __NR_msgget 166 374 - __SYSCALL(166, sys_msgget, 4) 375 - #define __NR_msgsnd 167 376 - __SYSCALL(167, sys_msgsnd, 4) 377 - #define __NR_msgrcv 168 378 - __SYSCALL(168, sys_msgrcv, 4) 379 - #define __NR_msgctl 169 380 - __SYSCALL(169, sys_msgctl, 4) 381 - #define __NR_available170 170 382 - __SYSCALL(170, sys_ni_syscall, 0) 383 - #define __NR_available171 171 384 - __SYSCALL(171, sys_ni_syscall, 0) 385 - 386 - /* File System */ 387 - 388 - #define __NR_mount 172 389 - __SYSCALL(172, sys_mount, 5) 390 - #define __NR_swapon 173 391 - __SYSCALL(173, sys_swapon, 2) 392 - #define __NR_chroot 174 393 - __SYSCALL(174, sys_chroot, 1) 394 - #define __NR_pivot_root 175 395 - __SYSCALL(175, sys_pivot_root, 2) 396 - #define __NR_umount 176 397 - __SYSCALL(176, sys_umount, 2) 398 - #define __NR_swapoff 177 399 - __SYSCALL(177, sys_swapoff, 1) 400 - #define __NR_sync 178 401 - __SYSCALL(178, sys_sync, 0) 402 - #define __NR_available179 179 403 - __SYSCALL(179, sys_ni_syscall, 0) 404 - #define __NR_setfsuid 180 405 - __SYSCALL(180, sys_setfsuid, 1) 406 - #define __NR_setfsgid 181 407 - __SYSCALL(181, sys_setfsgid, 1) 408 - #define __NR_sysfs 182 409 - __SYSCALL(182, sys_sysfs, 3) 410 - #define __NR_ustat 183 411 - __SYSCALL(183, sys_ustat, 2) 412 - #define __NR_statfs 184 413 - __SYSCALL(184, sys_statfs, 2) 414 - #define __NR_fstatfs 185 415 - __SYSCALL(185, sys_fstatfs, 2) 416 - #define __NR_statfs64 186 417 - __SYSCALL(186, sys_statfs64, 3) 418 - #define __NR_fstatfs64 187 419 - __SYSCALL(187, sys_fstatfs64, 3) 420 - 421 - /* System */ 422 - 423 - #define __NR_setrlimit 188 424 - __SYSCALL(188, sys_setrlimit, 2) 425 - #define __NR_getrlimit 189 426 - __SYSCALL(189, sys_getrlimit, 2) 427 - #define __NR_getrusage 190 428 - __SYSCALL(190, sys_getrusage, 2) 429 - #define __NR_futex 191 430 - __SYSCALL(191, sys_futex, 5) 431 - #define __NR_gettimeofday 192 432 - __SYSCALL(192, sys_gettimeofday, 2) 433 - #define __NR_settimeofday 193 434 - __SYSCALL(193, sys_settimeofday, 2) 435 - #define __NR_adjtimex 194 436 - __SYSCALL(194, sys_adjtimex, 1) 437 - #define __NR_nanosleep 195 438 - __SYSCALL(195, sys_nanosleep, 2) 439 - #define __NR_getgroups 196 440 - __SYSCALL(196, sys_getgroups, 2) 441 - #define __NR_setgroups 197 442 - __SYSCALL(197, sys_setgroups, 2) 443 - #define __NR_sethostname 198 444 - __SYSCALL(198, sys_sethostname, 2) 445 - #define __NR_setdomainname 199 446 - __SYSCALL(199, sys_setdomainname, 2) 447 - #define __NR_syslog 200 448 - __SYSCALL(200, sys_syslog, 3) 449 - #define __NR_vhangup 201 450 - __SYSCALL(201, sys_vhangup, 0) 451 - #define __NR_uselib 202 452 - __SYSCALL(202, sys_uselib, 1) 453 - #define __NR_reboot 203 454 - __SYSCALL(203, sys_reboot, 3) 455 - #define __NR_quotactl 204 456 - __SYSCALL(204, sys_quotactl, 4) 457 - #define __NR_nfsservctl 205 458 - __SYSCALL(205, sys_ni_syscall, 0) 459 - #define __NR__sysctl 206 460 - __SYSCALL(206, sys_sysctl, 1) 461 - #define __NR_bdflush 207 462 - __SYSCALL(207, sys_bdflush, 2) 463 - #define __NR_uname 208 464 - __SYSCALL(208, sys_newuname, 1) 465 - #define __NR_sysinfo 209 466 - __SYSCALL(209, sys_sysinfo, 1) 467 - #define __NR_init_module 210 468 - __SYSCALL(210, sys_init_module, 2) 469 - #define __NR_delete_module 211 470 - __SYSCALL(211, sys_delete_module, 1) 471 - 472 - #define __NR_sched_setparam 212 473 - __SYSCALL(212, sys_sched_setparam, 2) 474 - #define __NR_sched_getparam 213 475 - __SYSCALL(213, sys_sched_getparam, 2) 476 - #define __NR_sched_setscheduler 214 477 - __SYSCALL(214, sys_sched_setscheduler, 3) 478 - #define __NR_sched_getscheduler 215 479 - __SYSCALL(215, sys_sched_getscheduler, 1) 480 - #define __NR_sched_get_priority_max 216 481 - __SYSCALL(216, sys_sched_get_priority_max, 1) 482 - #define __NR_sched_get_priority_min 217 483 - __SYSCALL(217, sys_sched_get_priority_min, 1) 484 - #define __NR_sched_rr_get_interval 218 485 - __SYSCALL(218, sys_sched_rr_get_interval, 2) 486 - #define __NR_sched_yield 219 487 - __SYSCALL(219, sys_sched_yield, 0) 488 - #define __NR_available222 222 489 - __SYSCALL(222, sys_ni_syscall, 0) 490 - 491 - /* Signal Handling */ 492 - 493 - #define __NR_restart_syscall 223 494 - __SYSCALL(223, sys_restart_syscall, 0) 495 - #define __NR_sigaltstack 224 496 - __SYSCALL(224, xtensa_sigaltstack, 2) 497 - #define __NR_rt_sigreturn 225 498 - __SYSCALL(225, xtensa_rt_sigreturn, 1) 499 - #define __NR_rt_sigaction 226 500 - __SYSCALL(226, sys_rt_sigaction, 4) 501 - #define __NR_rt_sigprocmask 227 502 - __SYSCALL(227, sys_rt_sigprocmask, 4) 503 - #define __NR_rt_sigpending 228 504 - __SYSCALL(228, sys_rt_sigpending, 2) 505 - #define __NR_rt_sigtimedwait 229 506 - __SYSCALL(229, sys_rt_sigtimedwait, 4) 507 - #define __NR_rt_sigqueueinfo 230 508 - __SYSCALL(230, sys_rt_sigqueueinfo, 3) 509 - #define __NR_rt_sigsuspend 231 510 - __SYSCALL(231, sys_rt_sigsuspend, 2) 511 - 512 - /* Message */ 513 - 514 - #define __NR_mq_open 232 515 - __SYSCALL(232, sys_mq_open, 4) 516 - #define __NR_mq_unlink 233 517 - __SYSCALL(233, sys_mq_unlink, 1) 518 - #define __NR_mq_timedsend 234 519 - __SYSCALL(234, sys_mq_timedsend, 5) 520 - #define __NR_mq_timedreceive 235 521 - __SYSCALL(235, sys_mq_timedreceive, 5) 522 - #define __NR_mq_notify 236 523 - __SYSCALL(236, sys_mq_notify, 2) 524 - #define __NR_mq_getsetattr 237 525 - __SYSCALL(237, sys_mq_getsetattr, 3) 526 - #define __NR_available238 238 527 - __SYSCALL(238, sys_ni_syscall, 0) 528 - 529 - /* IO */ 530 - 531 - #define __NR_io_setup 239 532 - __SYSCALL(239, sys_io_setup, 2) 533 - #define __NR_io_destroy 240 534 - __SYSCALL(240, sys_io_destroy, 1) 535 - #define __NR_io_submit 241 536 - __SYSCALL(241, sys_io_submit, 3) 537 - #define __NR_io_getevents 242 538 - __SYSCALL(242, sys_io_getevents, 5) 539 - #define __NR_io_cancel 243 540 - __SYSCALL(243, sys_io_cancel, 3) 541 - #define __NR_clock_settime 244 542 - __SYSCALL(244, sys_clock_settime, 2) 543 - #define __NR_clock_gettime 245 544 - __SYSCALL(245, sys_clock_gettime, 2) 545 - #define __NR_clock_getres 246 546 - __SYSCALL(246, sys_clock_getres, 2) 547 - #define __NR_clock_nanosleep 247 548 - __SYSCALL(247, sys_clock_nanosleep, 4) 549 - 550 - /* Timer */ 551 - 552 - #define __NR_timer_create 248 553 - __SYSCALL(248, sys_timer_create, 3) 554 - #define __NR_timer_delete 249 555 - __SYSCALL(249, sys_timer_delete, 1) 556 - #define __NR_timer_settime 250 557 - __SYSCALL(250, sys_timer_settime, 4) 558 - #define __NR_timer_gettime 251 559 - __SYSCALL(251, sys_timer_gettime, 2) 560 - #define __NR_timer_getoverrun 252 561 - __SYSCALL(252, sys_timer_getoverrun, 1) 562 - 563 - /* System */ 564 - 565 - #define __NR_reserved244 253 566 - __SYSCALL(253, sys_ni_syscall, 0) 567 - #define __NR_lookup_dcookie 254 568 - __SYSCALL(254, sys_lookup_dcookie, 4) 569 - #define __NR_available255 255 570 - __SYSCALL(255, sys_ni_syscall, 0) 571 - #define __NR_add_key 256 572 - __SYSCALL(256, sys_add_key, 5) 573 - #define __NR_request_key 257 574 - __SYSCALL(257, sys_request_key, 5) 575 - #define __NR_keyctl 258 576 - __SYSCALL(258, sys_keyctl, 5) 577 - #define __NR_available259 259 578 - __SYSCALL(259, sys_ni_syscall, 0) 579 - 580 - 581 - #define __NR_readahead 260 582 - __SYSCALL(260, sys_readahead, 5) 583 - #define __NR_remap_file_pages 261 584 - __SYSCALL(261, sys_remap_file_pages, 5) 585 - #define __NR_migrate_pages 262 586 - __SYSCALL(262, sys_migrate_pages, 0) 587 - #define __NR_mbind 263 588 - __SYSCALL(263, sys_mbind, 6) 589 - #define __NR_get_mempolicy 264 590 - __SYSCALL(264, sys_get_mempolicy, 5) 591 - #define __NR_set_mempolicy 265 592 - __SYSCALL(265, sys_set_mempolicy, 3) 593 - #define __NR_unshare 266 594 - __SYSCALL(266, sys_unshare, 1) 595 - #define __NR_move_pages 267 596 - __SYSCALL(267, sys_move_pages, 0) 597 - #define __NR_splice 268 598 - __SYSCALL(268, sys_splice, 0) 599 - #define __NR_tee 269 600 - __SYSCALL(269, sys_tee, 0) 601 - #define __NR_vmsplice 270 602 - __SYSCALL(270, sys_vmsplice, 0) 603 - #define __NR_available271 271 604 - __SYSCALL(271, sys_ni_syscall, 0) 605 - 606 - #define __NR_pselect6 272 607 - __SYSCALL(272, sys_pselect6, 0) 608 - #define __NR_ppoll 273 609 - __SYSCALL(273, sys_ppoll, 0) 610 - #define __NR_epoll_pwait 274 611 - __SYSCALL(274, sys_epoll_pwait, 0) 612 - #define __NR_available275 275 613 - __SYSCALL(275, sys_ni_syscall, 0) 614 - 615 - #define __NR_inotify_init 276 616 - __SYSCALL(276, sys_inotify_init, 0) 617 - #define __NR_inotify_add_watch 277 618 - __SYSCALL(277, sys_inotify_add_watch, 3) 619 - #define __NR_inotify_rm_watch 278 620 - __SYSCALL(278, sys_inotify_rm_watch, 2) 621 - #define __NR_available279 279 622 - __SYSCALL(279, sys_ni_syscall, 0) 623 - 624 - #define __NR_getcpu 280 625 - __SYSCALL(280, sys_getcpu, 0) 626 - #define __NR_kexec_load 281 627 - __SYSCALL(281, sys_ni_syscall, 0) 628 - 629 - #define __NR_ioprio_set 282 630 - __SYSCALL(282, sys_ioprio_set, 2) 631 - #define __NR_ioprio_get 283 632 - __SYSCALL(283, sys_ioprio_get, 3) 633 - 634 - #define __NR_set_robust_list 284 635 - __SYSCALL(284, sys_set_robust_list, 3) 636 - #define __NR_get_robust_list 285 637 - __SYSCALL(285, sys_get_robust_list, 3) 638 - #define __NR_reserved286 286 /* sync_file_rangeX */ 639 - __SYSCALL(286, sys_ni_syscall, 3) 640 - #define __NR_available287 287 641 - __SYSCALL(287, sys_faccessat, 0) 642 - 643 - /* Relative File Operations */ 644 - 645 - #define __NR_openat 288 646 - __SYSCALL(288, sys_openat, 4) 647 - #define __NR_mkdirat 289 648 - __SYSCALL(289, sys_mkdirat, 3) 649 - #define __NR_mknodat 290 650 - __SYSCALL(290, sys_mknodat, 4) 651 - #define __NR_unlinkat 291 652 - __SYSCALL(291, sys_unlinkat, 3) 653 - #define __NR_renameat 292 654 - __SYSCALL(292, sys_renameat, 4) 655 - #define __NR_linkat 293 656 - __SYSCALL(293, sys_linkat, 5) 657 - #define __NR_symlinkat 294 658 - __SYSCALL(294, sys_symlinkat, 3) 659 - #define __NR_readlinkat 295 660 - __SYSCALL(295, sys_readlinkat, 4) 661 - #define __NR_utimensat 296 662 - __SYSCALL(296, sys_utimensat, 0) 663 - #define __NR_fchownat 297 664 - __SYSCALL(297, sys_fchownat, 5) 665 - #define __NR_futimesat 298 666 - __SYSCALL(298, sys_futimesat, 4) 667 - #define __NR_fstatat64 299 668 - __SYSCALL(299, sys_fstatat64, 0) 669 - #define __NR_fchmodat 300 670 - __SYSCALL(300, sys_fchmodat, 4) 671 - #define __NR_faccessat 301 672 - __SYSCALL(301, sys_faccessat, 4) 673 - #define __NR_available302 302 674 - __SYSCALL(302, sys_ni_syscall, 0) 675 - #define __NR_available303 303 676 - __SYSCALL(303, sys_ni_syscall, 0) 677 - 678 - #define __NR_signalfd 304 679 - __SYSCALL(304, sys_signalfd, 3) 680 - /* 305 was __NR_timerfd */ 681 - __SYSCALL(305, sys_ni_syscall, 0) 682 - #define __NR_eventfd 306 683 - __SYSCALL(306, sys_eventfd, 1) 684 - #define __NR_recvmmsg 307 685 - __SYSCALL(307, sys_recvmmsg, 5) 686 - #define __NR_setns 308 687 - __SYSCALL(308, sys_setns, 2) 688 - 689 - #define __NR_syscall_count 309 690 - 691 - /* 692 - * sysxtensa syscall handler 693 - * 694 - * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); 695 - * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); 696 - * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); 697 - * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); 698 - * a2 a6 a3 a4 a5 699 - */ 700 - 701 - #define SYS_XTENSA_RESERVED 0 /* don't use this */ 702 - #define SYS_XTENSA_ATOMIC_SET 1 /* set variable */ 703 - #define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */ 704 - #define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */ 705 - #define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */ 706 - 707 - #define SYS_XTENSA_COUNT 5 /* count */ 708 - 709 - #ifdef __KERNEL__ 710 13 711 14 /* 712 15 * "Conditional" syscalls ··· 37 734 #define __IGNORE_mmap /* use mmap2 */ 38 735 #define __IGNORE_vfork /* use clone */ 39 736 #define __IGNORE_fadvise64 /* use fadvise64_64 */ 40 - 41 - #endif /* __KERNEL__ */ 42 - #endif /* _XTENSA_UNISTD_H */
-16
arch/xtensa/include/asm/xor.h
··· 1 - /* 2 - * include/asm-xtensa/xor.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_XOR_H 12 - #define _XTENSA_XOR_H 13 - 14 - #include <asm-generic/xor.h> 15 - 16 - #endif
+22
arch/xtensa/include/uapi/asm/Kbuild
··· 1 1 # UAPI Header export list 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 + header-y += auxvec.h 5 + header-y += byteorder.h 6 + header-y += ioctls.h 7 + header-y += ipcbuf.h 8 + header-y += mman.h 9 + header-y += msgbuf.h 10 + header-y += param.h 11 + header-y += poll.h 12 + header-y += posix_types.h 13 + header-y += ptrace.h 14 + header-y += sembuf.h 15 + header-y += setup.h 16 + header-y += shmbuf.h 17 + header-y += sigcontext.h 18 + header-y += signal.h 19 + header-y += socket.h 20 + header-y += sockios.h 21 + header-y += stat.h 22 + header-y += swab.h 23 + header-y += termbits.h 24 + header-y += types.h 25 + header-y += unistd.h
+30
arch/xtensa/include/uapi/asm/param.h
··· 1 + /* 2 + * include/asm-xtensa/param.h 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + * 8 + * Copyright (C) 2001 - 2005 Tensilica Inc. 9 + */ 10 + 11 + #ifndef _UAPI_XTENSA_PARAM_H 12 + #define _UAPI_XTENSA_PARAM_H 13 + 14 + #ifndef __KERNEL__ 15 + # define HZ 100 16 + #endif 17 + 18 + #define EXEC_PAGESIZE 4096 19 + 20 + #ifndef NGROUPS 21 + #define NGROUPS 32 22 + #endif 23 + 24 + #ifndef NOGROUP 25 + #define NOGROUP (-1) 26 + #endif 27 + 28 + #define MAXHOSTNAMELEN 64 /* max length of hostname */ 29 + 30 + #endif /* _UAPI_XTENSA_PARAM_H */
+77
arch/xtensa/include/uapi/asm/ptrace.h
··· 1 + /* 2 + * include/asm-xtensa/ptrace.h 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + * 8 + * Copyright (C) 2001 - 2005 Tensilica Inc. 9 + */ 10 + 11 + #ifndef _UAPI_XTENSA_PTRACE_H 12 + #define _UAPI_XTENSA_PTRACE_H 13 + 14 + /* 15 + * Kernel stack 16 + * 17 + * +-----------------------+ -------- STACK_SIZE 18 + * | register file | | 19 + * +-----------------------+ | 20 + * | struct pt_regs | | 21 + * +-----------------------+ | ------ PT_REGS_OFFSET 22 + * double : 16 bytes spill area : | ^ 23 + * excetion :- - - - - - - - - - - -: | | 24 + * frame : struct pt_regs : | | 25 + * :- - - - - - - - - - - -: | | 26 + * | | | | 27 + * | memory stack | | | 28 + * | | | | 29 + * ~ ~ ~ ~ 30 + * ~ ~ ~ ~ 31 + * | | | | 32 + * | | | | 33 + * +-----------------------+ | | --- STACK_BIAS 34 + * | struct task_struct | | | ^ 35 + * current --> +-----------------------+ | | | 36 + * | struct thread_info | | | | 37 + * +-----------------------+ -------- 38 + */ 39 + 40 + #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) 41 + 42 + /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ 43 + 44 + #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ 45 + #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ 46 + #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ 47 + #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ 48 + #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ 49 + #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ 50 + #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ 51 + #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ 52 + #define EXC_TABLE_SIZE 0x400 53 + 54 + /* Registers used by strace */ 55 + 56 + #define REG_A_BASE 0x0000 57 + #define REG_AR_BASE 0x0100 58 + #define REG_PC 0x0020 59 + #define REG_PS 0x02e6 60 + #define REG_WB 0x0248 61 + #define REG_WS 0x0249 62 + #define REG_LBEG 0x0200 63 + #define REG_LEND 0x0201 64 + #define REG_LCOUNT 0x0202 65 + #define REG_SAR 0x0203 66 + 67 + #define SYSCALL_NR 0x00ff 68 + 69 + /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ 70 + 71 + #define PTRACE_GETREGS 12 72 + #define PTRACE_SETREGS 13 73 + #define PTRACE_GETXTREGS 18 74 + #define PTRACE_SETXTREGS 19 75 + 76 + 77 + #endif /* _UAPI_XTENSA_PTRACE_H */
+148
arch/xtensa/include/uapi/asm/signal.h
··· 1 + /* 2 + * include/asm-xtensa/signal.h 3 + * 4 + * Swiped from SH. 5 + * 6 + * This file is subject to the terms and conditions of the GNU General Public 7 + * License. See the file "COPYING" in the main directory of this archive 8 + * for more details. 9 + * 10 + * Copyright (C) 2001 - 2005 Tensilica Inc. 11 + */ 12 + 13 + #ifndef _UAPI_XTENSA_SIGNAL_H 14 + #define _UAPI_XTENSA_SIGNAL_H 15 + 16 + 17 + #define _NSIG 64 18 + #define _NSIG_BPW 32 19 + #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 20 + 21 + #ifndef __ASSEMBLY__ 22 + 23 + #include <linux/types.h> 24 + 25 + /* Avoid too many header ordering problems. */ 26 + struct siginfo; 27 + typedef unsigned long old_sigset_t; /* at least 32 bits */ 28 + typedef struct { 29 + unsigned long sig[_NSIG_WORDS]; 30 + } sigset_t; 31 + 32 + #endif 33 + 34 + #define SIGHUP 1 35 + #define SIGINT 2 36 + #define SIGQUIT 3 37 + #define SIGILL 4 38 + #define SIGTRAP 5 39 + #define SIGABRT 6 40 + #define SIGIOT 6 41 + #define SIGBUS 7 42 + #define SIGFPE 8 43 + #define SIGKILL 9 44 + #define SIGUSR1 10 45 + #define SIGSEGV 11 46 + #define SIGUSR2 12 47 + #define SIGPIPE 13 48 + #define SIGALRM 14 49 + #define SIGTERM 15 50 + #define SIGSTKFLT 16 51 + #define SIGCHLD 17 52 + #define SIGCONT 18 53 + #define SIGSTOP 19 54 + #define SIGTSTP 20 55 + #define SIGTTIN 21 56 + #define SIGTTOU 22 57 + #define SIGURG 23 58 + #define SIGXCPU 24 59 + #define SIGXFSZ 25 60 + #define SIGVTALRM 26 61 + #define SIGPROF 27 62 + #define SIGWINCH 28 63 + #define SIGIO 29 64 + #define SIGPOLL SIGIO 65 + /* #define SIGLOST 29 */ 66 + #define SIGPWR 30 67 + #define SIGSYS 31 68 + #define SIGUNUSED 31 69 + 70 + /* These should not be considered constants from userland. */ 71 + #define SIGRTMIN 32 72 + #define SIGRTMAX (_NSIG-1) 73 + 74 + /* 75 + * SA_FLAGS values: 76 + * 77 + * SA_ONSTACK indicates that a registered stack_t will be used. 78 + * SA_RESTART flag to get restarting signals (which were the default long ago) 79 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 80 + * SA_RESETHAND clears the handler when the signal is delivered. 81 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 82 + * SA_NODEFER prevents the current signal from being masked in the handler. 83 + * 84 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 85 + * Unix names RESETHAND and NODEFER respectively. 86 + */ 87 + #define SA_NOCLDSTOP 0x00000001 88 + #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ 89 + #define SA_SIGINFO 0x00000004 90 + #define SA_ONSTACK 0x08000000 91 + #define SA_RESTART 0x10000000 92 + #define SA_NODEFER 0x40000000 93 + #define SA_RESETHAND 0x80000000 94 + 95 + #define SA_NOMASK SA_NODEFER 96 + #define SA_ONESHOT SA_RESETHAND 97 + 98 + #define SA_RESTORER 0x04000000 99 + 100 + /* 101 + * sigaltstack controls 102 + */ 103 + #define SS_ONSTACK 1 104 + #define SS_DISABLE 2 105 + 106 + #define MINSIGSTKSZ 2048 107 + #define SIGSTKSZ 8192 108 + 109 + #ifndef __ASSEMBLY__ 110 + 111 + #define SIG_BLOCK 0 /* for blocking signals */ 112 + #define SIG_UNBLOCK 1 /* for unblocking signals */ 113 + #define SIG_SETMASK 2 /* for setting the signal mask */ 114 + 115 + /* Type of a signal handler. */ 116 + typedef void (*__sighandler_t)(int); 117 + 118 + #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ 119 + #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ 120 + #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ 121 + 122 + #ifndef __KERNEL__ 123 + 124 + /* Here we must cater to libcs that poke about in kernel headers. */ 125 + 126 + struct sigaction { 127 + union { 128 + __sighandler_t _sa_handler; 129 + void (*_sa_sigaction)(int, struct siginfo *, void *); 130 + } _u; 131 + sigset_t sa_mask; 132 + unsigned long sa_flags; 133 + void (*sa_restorer)(void); 134 + }; 135 + 136 + #define sa_handler _u._sa_handler 137 + #define sa_sigaction _u._sa_sigaction 138 + 139 + #endif /* __KERNEL__ */ 140 + 141 + typedef struct sigaltstack { 142 + void *ss_sp; 143 + int ss_flags; 144 + size_t ss_size; 145 + } stack_t; 146 + 147 + #endif /* __ASSEMBLY__ */ 148 + #endif /* _UAPI_XTENSA_SIGNAL_H */
+28
arch/xtensa/include/uapi/asm/types.h
··· 1 + /* 2 + * include/asm-xtensa/types.h 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + * 8 + * Copyright (C) 2001 - 2005 Tensilica Inc. 9 + */ 10 + 11 + #ifndef _UAPI_XTENSA_TYPES_H 12 + #define _UAPI_XTENSA_TYPES_H 13 + 14 + #include <asm-generic/int-ll64.h> 15 + 16 + #ifdef __ASSEMBLY__ 17 + # define __XTENSA_UL(x) (x) 18 + # define __XTENSA_UL_CONST(x) x 19 + #else 20 + # define __XTENSA_UL(x) ((unsigned long)(x)) 21 + # define __XTENSA_UL_CONST(x) x##UL 22 + #endif 23 + 24 + #ifndef __ASSEMBLY__ 25 + 26 + #endif 27 + 28 + #endif /* _UAPI_XTENSA_TYPES_H */
+762
arch/xtensa/include/uapi/asm/unistd.h
··· 1 + /* 2 + * include/asm-xtensa/unistd.h 3 + * 4 + * This file is subject to the terms and conditions of the GNU General Public 5 + * License. See the file "COPYING" in the main directory of this archive 6 + * for more details. 7 + * 8 + * Copyright (C) 2001 - 2012 Tensilica Inc. 9 + */ 10 + 11 + #ifndef _UAPI_XTENSA_UNISTD_H 12 + #define _UAPI_XTENSA_UNISTD_H 13 + 14 + #ifndef __SYSCALL 15 + # define __SYSCALL(nr,func,nargs) 16 + #endif 17 + 18 + #define __NR_spill 0 19 + __SYSCALL( 0, sys_ni_syscall, 0) 20 + #define __NR_xtensa 1 21 + __SYSCALL( 1, sys_ni_syscall, 0) 22 + #define __NR_available4 2 23 + __SYSCALL( 2, sys_ni_syscall, 0) 24 + #define __NR_available5 3 25 + __SYSCALL( 3, sys_ni_syscall, 0) 26 + #define __NR_available6 4 27 + __SYSCALL( 4, sys_ni_syscall, 0) 28 + #define __NR_available7 5 29 + __SYSCALL( 5, sys_ni_syscall, 0) 30 + #define __NR_available8 6 31 + __SYSCALL( 6, sys_ni_syscall, 0) 32 + #define __NR_available9 7 33 + __SYSCALL( 7, sys_ni_syscall, 0) 34 + 35 + /* File Operations */ 36 + 37 + #define __NR_open 8 38 + __SYSCALL( 8, sys_open, 3) 39 + #define __NR_close 9 40 + __SYSCALL( 9, sys_close, 1) 41 + #define __NR_dup 10 42 + __SYSCALL( 10, sys_dup, 1) 43 + #define __NR_dup2 11 44 + __SYSCALL( 11, sys_dup2, 2) 45 + #define __NR_read 12 46 + __SYSCALL( 12, sys_read, 3) 47 + #define __NR_write 13 48 + __SYSCALL( 13, sys_write, 3) 49 + #define __NR_select 14 50 + __SYSCALL( 14, sys_select, 5) 51 + #define __NR_lseek 15 52 + __SYSCALL( 15, sys_lseek, 3) 53 + #define __NR_poll 16 54 + __SYSCALL( 16, sys_poll, 3) 55 + #define __NR__llseek 17 56 + __SYSCALL( 17, sys_llseek, 5) 57 + #define __NR_epoll_wait 18 58 + __SYSCALL( 18, sys_epoll_wait, 4) 59 + #define __NR_epoll_ctl 19 60 + __SYSCALL( 19, sys_epoll_ctl, 4) 61 + #define __NR_epoll_create 20 62 + __SYSCALL( 20, sys_epoll_create, 1) 63 + #define __NR_creat 21 64 + __SYSCALL( 21, sys_creat, 2) 65 + #define __NR_truncate 22 66 + __SYSCALL( 22, sys_truncate, 2) 67 + #define __NR_ftruncate 23 68 + __SYSCALL( 23, sys_ftruncate, 2) 69 + #define __NR_readv 24 70 + __SYSCALL( 24, sys_readv, 3) 71 + #define __NR_writev 25 72 + __SYSCALL( 25, sys_writev, 3) 73 + #define __NR_fsync 26 74 + __SYSCALL( 26, sys_fsync, 1) 75 + #define __NR_fdatasync 27 76 + __SYSCALL( 27, sys_fdatasync, 1) 77 + #define __NR_truncate64 28 78 + __SYSCALL( 28, sys_truncate64, 2) 79 + #define __NR_ftruncate64 29 80 + __SYSCALL( 29, sys_ftruncate64, 2) 81 + #define __NR_pread64 30 82 + __SYSCALL( 30, sys_pread64, 6) 83 + #define __NR_pwrite64 31 84 + __SYSCALL( 31, sys_pwrite64, 6) 85 + 86 + #define __NR_link 32 87 + __SYSCALL( 32, sys_link, 2) 88 + #define __NR_rename 33 89 + __SYSCALL( 33, sys_rename, 2) 90 + #define __NR_symlink 34 91 + __SYSCALL( 34, sys_symlink, 2) 92 + #define __NR_readlink 35 93 + __SYSCALL( 35, sys_readlink, 3) 94 + #define __NR_mknod 36 95 + __SYSCALL( 36, sys_mknod, 3) 96 + #define __NR_pipe 37 97 + __SYSCALL( 37, sys_pipe, 1) 98 + #define __NR_unlink 38 99 + __SYSCALL( 38, sys_unlink, 1) 100 + #define __NR_rmdir 39 101 + __SYSCALL( 39, sys_rmdir, 1) 102 + 103 + #define __NR_mkdir 40 104 + __SYSCALL( 40, sys_mkdir, 2) 105 + #define __NR_chdir 41 106 + __SYSCALL( 41, sys_chdir, 1) 107 + #define __NR_fchdir 42 108 + __SYSCALL( 42, sys_fchdir, 1) 109 + #define __NR_getcwd 43 110 + __SYSCALL( 43, sys_getcwd, 2) 111 + 112 + #define __NR_chmod 44 113 + __SYSCALL( 44, sys_chmod, 2) 114 + #define __NR_chown 45 115 + __SYSCALL( 45, sys_chown, 3) 116 + #define __NR_stat 46 117 + __SYSCALL( 46, sys_newstat, 2) 118 + #define __NR_stat64 47 119 + __SYSCALL( 47, sys_stat64, 2) 120 + 121 + #define __NR_lchown 48 122 + __SYSCALL( 48, sys_lchown, 3) 123 + #define __NR_lstat 49 124 + __SYSCALL( 49, sys_newlstat, 2) 125 + #define __NR_lstat64 50 126 + __SYSCALL( 50, sys_lstat64, 2) 127 + #define __NR_available51 51 128 + __SYSCALL( 51, sys_ni_syscall, 0) 129 + 130 + #define __NR_fchmod 52 131 + __SYSCALL( 52, sys_fchmod, 2) 132 + #define __NR_fchown 53 133 + __SYSCALL( 53, sys_fchown, 3) 134 + #define __NR_fstat 54 135 + __SYSCALL( 54, sys_newfstat, 2) 136 + #define __NR_fstat64 55 137 + __SYSCALL( 55, sys_fstat64, 2) 138 + 139 + #define __NR_flock 56 140 + __SYSCALL( 56, sys_flock, 2) 141 + #define __NR_access 57 142 + __SYSCALL( 57, sys_access, 2) 143 + #define __NR_umask 58 144 + __SYSCALL( 58, sys_umask, 1) 145 + #define __NR_getdents 59 146 + __SYSCALL( 59, sys_getdents, 3) 147 + #define __NR_getdents64 60 148 + __SYSCALL( 60, sys_getdents64, 3) 149 + #define __NR_fcntl64 61 150 + __SYSCALL( 61, sys_fcntl64, 3) 151 + #define __NR_fallocate 62 152 + __SYSCALL( 62, sys_fallocate, 6) 153 + #define __NR_fadvise64_64 63 154 + __SYSCALL( 63, xtensa_fadvise64_64, 6) 155 + #define __NR_utime 64 /* glibc 2.3.3 ?? */ 156 + __SYSCALL( 64, sys_utime, 2) 157 + #define __NR_utimes 65 158 + __SYSCALL( 65, sys_utimes, 2) 159 + #define __NR_ioctl 66 160 + __SYSCALL( 66, sys_ioctl, 3) 161 + #define __NR_fcntl 67 162 + __SYSCALL( 67, sys_fcntl, 3) 163 + 164 + #define __NR_setxattr 68 165 + __SYSCALL( 68, sys_setxattr, 5) 166 + #define __NR_getxattr 69 167 + __SYSCALL( 69, sys_getxattr, 4) 168 + #define __NR_listxattr 70 169 + __SYSCALL( 70, sys_listxattr, 3) 170 + #define __NR_removexattr 71 171 + __SYSCALL( 71, sys_removexattr, 2) 172 + #define __NR_lsetxattr 72 173 + __SYSCALL( 72, sys_lsetxattr, 5) 174 + #define __NR_lgetxattr 73 175 + __SYSCALL( 73, sys_lgetxattr, 4) 176 + #define __NR_llistxattr 74 177 + __SYSCALL( 74, sys_llistxattr, 3) 178 + #define __NR_lremovexattr 75 179 + __SYSCALL( 75, sys_lremovexattr, 2) 180 + #define __NR_fsetxattr 76 181 + __SYSCALL( 76, sys_fsetxattr, 5) 182 + #define __NR_fgetxattr 77 183 + __SYSCALL( 77, sys_fgetxattr, 4) 184 + #define __NR_flistxattr 78 185 + __SYSCALL( 78, sys_flistxattr, 3) 186 + #define __NR_fremovexattr 79 187 + __SYSCALL( 79, sys_fremovexattr, 2) 188 + 189 + /* File Map / Shared Memory Operations */ 190 + 191 + #define __NR_mmap2 80 192 + __SYSCALL( 80, sys_mmap_pgoff, 6) 193 + #define __NR_munmap 81 194 + __SYSCALL( 81, sys_munmap, 2) 195 + #define __NR_mprotect 82 196 + __SYSCALL( 82, sys_mprotect, 3) 197 + #define __NR_brk 83 198 + __SYSCALL( 83, sys_brk, 1) 199 + #define __NR_mlock 84 200 + __SYSCALL( 84, sys_mlock, 2) 201 + #define __NR_munlock 85 202 + __SYSCALL( 85, sys_munlock, 2) 203 + #define __NR_mlockall 86 204 + __SYSCALL( 86, sys_mlockall, 1) 205 + #define __NR_munlockall 87 206 + __SYSCALL( 87, sys_munlockall, 0) 207 + #define __NR_mremap 88 208 + __SYSCALL( 88, sys_mremap, 4) 209 + #define __NR_msync 89 210 + __SYSCALL( 89, sys_msync, 3) 211 + #define __NR_mincore 90 212 + __SYSCALL( 90, sys_mincore, 3) 213 + #define __NR_madvise 91 214 + __SYSCALL( 91, sys_madvise, 3) 215 + #define __NR_shmget 92 216 + __SYSCALL( 92, sys_shmget, 4) 217 + #define __NR_shmat 93 218 + __SYSCALL( 93, xtensa_shmat, 4) 219 + #define __NR_shmctl 94 220 + __SYSCALL( 94, sys_shmctl, 4) 221 + #define __NR_shmdt 95 222 + __SYSCALL( 95, sys_shmdt, 4) 223 + 224 + /* Socket Operations */ 225 + 226 + #define __NR_socket 96 227 + __SYSCALL( 96, sys_socket, 3) 228 + #define __NR_setsockopt 97 229 + __SYSCALL( 97, sys_setsockopt, 5) 230 + #define __NR_getsockopt 98 231 + __SYSCALL( 98, sys_getsockopt, 5) 232 + #define __NR_shutdown 99 233 + __SYSCALL( 99, sys_shutdown, 2) 234 + 235 + #define __NR_bind 100 236 + __SYSCALL(100, sys_bind, 3) 237 + #define __NR_connect 101 238 + __SYSCALL(101, sys_connect, 3) 239 + #define __NR_listen 102 240 + __SYSCALL(102, sys_listen, 2) 241 + #define __NR_accept 103 242 + __SYSCALL(103, sys_accept, 3) 243 + 244 + #define __NR_getsockname 104 245 + __SYSCALL(104, sys_getsockname, 3) 246 + #define __NR_getpeername 105 247 + __SYSCALL(105, sys_getpeername, 3) 248 + #define __NR_sendmsg 106 249 + __SYSCALL(106, sys_sendmsg, 3) 250 + #define __NR_recvmsg 107 251 + __SYSCALL(107, sys_recvmsg, 3) 252 + #define __NR_send 108 253 + __SYSCALL(108, sys_send, 4) 254 + #define __NR_recv 109 255 + __SYSCALL(109, sys_recv, 4) 256 + #define __NR_sendto 110 257 + __SYSCALL(110, sys_sendto, 6) 258 + #define __NR_recvfrom 111 259 + __SYSCALL(111, sys_recvfrom, 6) 260 + 261 + #define __NR_socketpair 112 262 + __SYSCALL(112, sys_socketpair, 4) 263 + #define __NR_sendfile 113 264 + __SYSCALL(113, sys_sendfile, 4) 265 + #define __NR_sendfile64 114 266 + __SYSCALL(114, sys_sendfile64, 4) 267 + #define __NR_sendmmsg 115 268 + __SYSCALL(115, sys_sendmmsg, 4) 269 + 270 + /* Process Operations */ 271 + 272 + #define __NR_clone 116 273 + __SYSCALL(116, xtensa_clone, 5) 274 + #define __NR_execve 117 275 + __SYSCALL(117, xtensa_execve, 3) 276 + #define __NR_exit 118 277 + __SYSCALL(118, sys_exit, 1) 278 + #define __NR_exit_group 119 279 + __SYSCALL(119, sys_exit_group, 1) 280 + #define __NR_getpid 120 281 + __SYSCALL(120, sys_getpid, 0) 282 + #define __NR_wait4 121 283 + __SYSCALL(121, sys_wait4, 4) 284 + #define __NR_waitid 122 285 + __SYSCALL(122, sys_waitid, 5) 286 + #define __NR_kill 123 287 + __SYSCALL(123, sys_kill, 2) 288 + #define __NR_tkill 124 289 + __SYSCALL(124, sys_tkill, 2) 290 + #define __NR_tgkill 125 291 + __SYSCALL(125, sys_tgkill, 3) 292 + #define __NR_set_tid_address 126 293 + __SYSCALL(126, sys_set_tid_address, 1) 294 + #define __NR_gettid 127 295 + __SYSCALL(127, sys_gettid, 0) 296 + #define __NR_setsid 128 297 + __SYSCALL(128, sys_setsid, 0) 298 + #define __NR_getsid 129 299 + __SYSCALL(129, sys_getsid, 1) 300 + #define __NR_prctl 130 301 + __SYSCALL(130, sys_prctl, 5) 302 + #define __NR_personality 131 303 + __SYSCALL(131, sys_personality, 1) 304 + #define __NR_getpriority 132 305 + __SYSCALL(132, sys_getpriority, 2) 306 + #define __NR_setpriority 133 307 + __SYSCALL(133, sys_setpriority, 3) 308 + #define __NR_setitimer 134 309 + __SYSCALL(134, sys_setitimer, 3) 310 + #define __NR_getitimer 135 311 + __SYSCALL(135, sys_getitimer, 2) 312 + #define __NR_setuid 136 313 + __SYSCALL(136, sys_setuid, 1) 314 + #define __NR_getuid 137 315 + __SYSCALL(137, sys_getuid, 0) 316 + #define __NR_setgid 138 317 + __SYSCALL(138, sys_setgid, 1) 318 + #define __NR_getgid 139 319 + __SYSCALL(139, sys_getgid, 0) 320 + #define __NR_geteuid 140 321 + __SYSCALL(140, sys_geteuid, 0) 322 + #define __NR_getegid 141 323 + __SYSCALL(141, sys_getegid, 0) 324 + #define __NR_setreuid 142 325 + __SYSCALL(142, sys_setreuid, 2) 326 + #define __NR_setregid 143 327 + __SYSCALL(143, sys_setregid, 2) 328 + #define __NR_setresuid 144 329 + __SYSCALL(144, sys_setresuid, 3) 330 + #define __NR_getresuid 145 331 + __SYSCALL(145, sys_getresuid, 3) 332 + #define __NR_setresgid 146 333 + __SYSCALL(146, sys_setresgid, 3) 334 + #define __NR_getresgid 147 335 + __SYSCALL(147, sys_getresgid, 3) 336 + #define __NR_setpgid 148 337 + __SYSCALL(148, sys_setpgid, 2) 338 + #define __NR_getpgid 149 339 + __SYSCALL(149, sys_getpgid, 1) 340 + #define __NR_getppid 150 341 + __SYSCALL(150, sys_getppid, 0) 342 + #define __NR_getpgrp 151 343 + __SYSCALL(151, sys_getpgrp, 0) 344 + 345 + #define __NR_reserved152 152 /* set_thread_area */ 346 + __SYSCALL(152, sys_ni_syscall, 0) 347 + #define __NR_reserved153 153 /* get_thread_area */ 348 + __SYSCALL(153, sys_ni_syscall, 0) 349 + #define __NR_times 154 350 + __SYSCALL(154, sys_times, 1) 351 + #define __NR_acct 155 352 + __SYSCALL(155, sys_acct, 1) 353 + #define __NR_sched_setaffinity 156 354 + __SYSCALL(156, sys_sched_setaffinity, 3) 355 + #define __NR_sched_getaffinity 157 356 + __SYSCALL(157, sys_sched_getaffinity, 3) 357 + #define __NR_capget 158 358 + __SYSCALL(158, sys_capget, 2) 359 + #define __NR_capset 159 360 + __SYSCALL(159, sys_capset, 2) 361 + #define __NR_ptrace 160 362 + __SYSCALL(160, sys_ptrace, 4) 363 + #define __NR_semtimedop 161 364 + __SYSCALL(161, sys_semtimedop, 5) 365 + #define __NR_semget 162 366 + __SYSCALL(162, sys_semget, 4) 367 + #define __NR_semop 163 368 + __SYSCALL(163, sys_semop, 4) 369 + #define __NR_semctl 164 370 + __SYSCALL(164, sys_semctl, 4) 371 + #define __NR_available165 165 372 + __SYSCALL(165, sys_ni_syscall, 0) 373 + #define __NR_msgget 166 374 + __SYSCALL(166, sys_msgget, 4) 375 + #define __NR_msgsnd 167 376 + __SYSCALL(167, sys_msgsnd, 4) 377 + #define __NR_msgrcv 168 378 + __SYSCALL(168, sys_msgrcv, 4) 379 + #define __NR_msgctl 169 380 + __SYSCALL(169, sys_msgctl, 4) 381 + #define __NR_available170 170 382 + __SYSCALL(170, sys_ni_syscall, 0) 383 + 384 + /* File System */ 385 + 386 + #define __NR_umount2 171 387 + __SYSCALL(171, sys_umount, 2) 388 + #define __NR_mount 172 389 + __SYSCALL(172, sys_mount, 5) 390 + #define __NR_swapon 173 391 + __SYSCALL(173, sys_swapon, 2) 392 + #define __NR_chroot 174 393 + __SYSCALL(174, sys_chroot, 1) 394 + #define __NR_pivot_root 175 395 + __SYSCALL(175, sys_pivot_root, 2) 396 + #define __NR_umount 176 397 + __SYSCALL(176, sys_umount, 2) 398 + #define __NR_swapoff 177 399 + __SYSCALL(177, sys_swapoff, 1) 400 + #define __NR_sync 178 401 + __SYSCALL(178, sys_sync, 0) 402 + #define __NR_syncfs 179 403 + __SYSCALL(179, sys_syncfs, 1) 404 + #define __NR_setfsuid 180 405 + __SYSCALL(180, sys_setfsuid, 1) 406 + #define __NR_setfsgid 181 407 + __SYSCALL(181, sys_setfsgid, 1) 408 + #define __NR_sysfs 182 409 + __SYSCALL(182, sys_sysfs, 3) 410 + #define __NR_ustat 183 411 + __SYSCALL(183, sys_ustat, 2) 412 + #define __NR_statfs 184 413 + __SYSCALL(184, sys_statfs, 2) 414 + #define __NR_fstatfs 185 415 + __SYSCALL(185, sys_fstatfs, 2) 416 + #define __NR_statfs64 186 417 + __SYSCALL(186, sys_statfs64, 3) 418 + #define __NR_fstatfs64 187 419 + __SYSCALL(187, sys_fstatfs64, 3) 420 + 421 + /* System */ 422 + 423 + #define __NR_setrlimit 188 424 + __SYSCALL(188, sys_setrlimit, 2) 425 + #define __NR_getrlimit 189 426 + __SYSCALL(189, sys_getrlimit, 2) 427 + #define __NR_getrusage 190 428 + __SYSCALL(190, sys_getrusage, 2) 429 + #define __NR_futex 191 430 + __SYSCALL(191, sys_futex, 5) 431 + #define __NR_gettimeofday 192 432 + __SYSCALL(192, sys_gettimeofday, 2) 433 + #define __NR_settimeofday 193 434 + __SYSCALL(193, sys_settimeofday, 2) 435 + #define __NR_adjtimex 194 436 + __SYSCALL(194, sys_adjtimex, 1) 437 + #define __NR_nanosleep 195 438 + __SYSCALL(195, sys_nanosleep, 2) 439 + #define __NR_getgroups 196 440 + __SYSCALL(196, sys_getgroups, 2) 441 + #define __NR_setgroups 197 442 + __SYSCALL(197, sys_setgroups, 2) 443 + #define __NR_sethostname 198 444 + __SYSCALL(198, sys_sethostname, 2) 445 + #define __NR_setdomainname 199 446 + __SYSCALL(199, sys_setdomainname, 2) 447 + #define __NR_syslog 200 448 + __SYSCALL(200, sys_syslog, 3) 449 + #define __NR_vhangup 201 450 + __SYSCALL(201, sys_vhangup, 0) 451 + #define __NR_uselib 202 452 + __SYSCALL(202, sys_uselib, 1) 453 + #define __NR_reboot 203 454 + __SYSCALL(203, sys_reboot, 3) 455 + #define __NR_quotactl 204 456 + __SYSCALL(204, sys_quotactl, 4) 457 + #define __NR_nfsservctl 205 458 + __SYSCALL(205, sys_ni_syscall, 0) /* old nfsservctl */ 459 + #define __NR__sysctl 206 460 + __SYSCALL(206, sys_sysctl, 1) 461 + #define __NR_bdflush 207 462 + __SYSCALL(207, sys_bdflush, 2) 463 + #define __NR_uname 208 464 + __SYSCALL(208, sys_newuname, 1) 465 + #define __NR_sysinfo 209 466 + __SYSCALL(209, sys_sysinfo, 1) 467 + #define __NR_init_module 210 468 + __SYSCALL(210, sys_init_module, 2) 469 + #define __NR_delete_module 211 470 + __SYSCALL(211, sys_delete_module, 1) 471 + 472 + #define __NR_sched_setparam 212 473 + __SYSCALL(212, sys_sched_setparam, 2) 474 + #define __NR_sched_getparam 213 475 + __SYSCALL(213, sys_sched_getparam, 2) 476 + #define __NR_sched_setscheduler 214 477 + __SYSCALL(214, sys_sched_setscheduler, 3) 478 + #define __NR_sched_getscheduler 215 479 + __SYSCALL(215, sys_sched_getscheduler, 1) 480 + #define __NR_sched_get_priority_max 216 481 + __SYSCALL(216, sys_sched_get_priority_max, 1) 482 + #define __NR_sched_get_priority_min 217 483 + __SYSCALL(217, sys_sched_get_priority_min, 1) 484 + #define __NR_sched_rr_get_interval 218 485 + __SYSCALL(218, sys_sched_rr_get_interval, 2) 486 + #define __NR_sched_yield 219 487 + __SYSCALL(219, sys_sched_yield, 0) 488 + #define __NR_available222 222 489 + __SYSCALL(222, sys_ni_syscall, 0) 490 + 491 + /* Signal Handling */ 492 + 493 + #define __NR_restart_syscall 223 494 + __SYSCALL(223, sys_restart_syscall, 0) 495 + #define __NR_sigaltstack 224 496 + __SYSCALL(224, xtensa_sigaltstack, 2) 497 + #define __NR_rt_sigreturn 225 498 + __SYSCALL(225, xtensa_rt_sigreturn, 1) 499 + #define __NR_rt_sigaction 226 500 + __SYSCALL(226, sys_rt_sigaction, 4) 501 + #define __NR_rt_sigprocmask 227 502 + __SYSCALL(227, sys_rt_sigprocmask, 4) 503 + #define __NR_rt_sigpending 228 504 + __SYSCALL(228, sys_rt_sigpending, 2) 505 + #define __NR_rt_sigtimedwait 229 506 + __SYSCALL(229, sys_rt_sigtimedwait, 4) 507 + #define __NR_rt_sigqueueinfo 230 508 + __SYSCALL(230, sys_rt_sigqueueinfo, 3) 509 + #define __NR_rt_sigsuspend 231 510 + __SYSCALL(231, sys_rt_sigsuspend, 2) 511 + 512 + /* Message */ 513 + 514 + #define __NR_mq_open 232 515 + __SYSCALL(232, sys_mq_open, 4) 516 + #define __NR_mq_unlink 233 517 + __SYSCALL(233, sys_mq_unlink, 1) 518 + #define __NR_mq_timedsend 234 519 + __SYSCALL(234, sys_mq_timedsend, 5) 520 + #define __NR_mq_timedreceive 235 521 + __SYSCALL(235, sys_mq_timedreceive, 5) 522 + #define __NR_mq_notify 236 523 + __SYSCALL(236, sys_mq_notify, 2) 524 + #define __NR_mq_getsetattr 237 525 + __SYSCALL(237, sys_mq_getsetattr, 3) 526 + #define __NR_available238 238 527 + __SYSCALL(238, sys_ni_syscall, 0) 528 + 529 + /* IO */ 530 + 531 + #define __NR_io_setup 239 532 + __SYSCALL(239, sys_io_setup, 2) 533 + #define __NR_io_destroy 240 534 + __SYSCALL(240, sys_io_destroy, 1) 535 + #define __NR_io_submit 241 536 + __SYSCALL(241, sys_io_submit, 3) 537 + #define __NR_io_getevents 242 538 + __SYSCALL(242, sys_io_getevents, 5) 539 + #define __NR_io_cancel 243 540 + __SYSCALL(243, sys_io_cancel, 3) 541 + #define __NR_clock_settime 244 542 + __SYSCALL(244, sys_clock_settime, 2) 543 + #define __NR_clock_gettime 245 544 + __SYSCALL(245, sys_clock_gettime, 2) 545 + #define __NR_clock_getres 246 546 + __SYSCALL(246, sys_clock_getres, 2) 547 + #define __NR_clock_nanosleep 247 548 + __SYSCALL(247, sys_clock_nanosleep, 4) 549 + 550 + /* Timer */ 551 + 552 + #define __NR_timer_create 248 553 + __SYSCALL(248, sys_timer_create, 3) 554 + #define __NR_timer_delete 249 555 + __SYSCALL(249, sys_timer_delete, 1) 556 + #define __NR_timer_settime 250 557 + __SYSCALL(250, sys_timer_settime, 4) 558 + #define __NR_timer_gettime 251 559 + __SYSCALL(251, sys_timer_gettime, 2) 560 + #define __NR_timer_getoverrun 252 561 + __SYSCALL(252, sys_timer_getoverrun, 1) 562 + 563 + /* System */ 564 + 565 + #define __NR_reserved253 253 566 + __SYSCALL(253, sys_ni_syscall, 0) 567 + #define __NR_lookup_dcookie 254 568 + __SYSCALL(254, sys_lookup_dcookie, 4) 569 + #define __NR_available255 255 570 + __SYSCALL(255, sys_ni_syscall, 0) 571 + #define __NR_add_key 256 572 + __SYSCALL(256, sys_add_key, 5) 573 + #define __NR_request_key 257 574 + __SYSCALL(257, sys_request_key, 5) 575 + #define __NR_keyctl 258 576 + __SYSCALL(258, sys_keyctl, 5) 577 + #define __NR_available259 259 578 + __SYSCALL(259, sys_ni_syscall, 0) 579 + 580 + 581 + #define __NR_readahead 260 582 + __SYSCALL(260, sys_readahead, 5) 583 + #define __NR_remap_file_pages 261 584 + __SYSCALL(261, sys_remap_file_pages, 5) 585 + #define __NR_migrate_pages 262 586 + __SYSCALL(262, sys_migrate_pages, 0) 587 + #define __NR_mbind 263 588 + __SYSCALL(263, sys_mbind, 6) 589 + #define __NR_get_mempolicy 264 590 + __SYSCALL(264, sys_get_mempolicy, 5) 591 + #define __NR_set_mempolicy 265 592 + __SYSCALL(265, sys_set_mempolicy, 3) 593 + #define __NR_unshare 266 594 + __SYSCALL(266, sys_unshare, 1) 595 + #define __NR_move_pages 267 596 + __SYSCALL(267, sys_move_pages, 0) 597 + #define __NR_splice 268 598 + __SYSCALL(268, sys_splice, 0) 599 + #define __NR_tee 269 600 + __SYSCALL(269, sys_tee, 0) 601 + #define __NR_vmsplice 270 602 + __SYSCALL(270, sys_vmsplice, 0) 603 + #define __NR_available271 271 604 + __SYSCALL(271, sys_ni_syscall, 0) 605 + 606 + #define __NR_pselect6 272 607 + __SYSCALL(272, sys_pselect6, 0) 608 + #define __NR_ppoll 273 609 + __SYSCALL(273, sys_ppoll, 0) 610 + #define __NR_epoll_pwait 274 611 + __SYSCALL(274, sys_epoll_pwait, 0) 612 + #define __NR_epoll_create1 275 613 + __SYSCALL(275, sys_epoll_create1, 1) 614 + 615 + #define __NR_inotify_init 276 616 + __SYSCALL(276, sys_inotify_init, 0) 617 + #define __NR_inotify_add_watch 277 618 + __SYSCALL(277, sys_inotify_add_watch, 3) 619 + #define __NR_inotify_rm_watch 278 620 + __SYSCALL(278, sys_inotify_rm_watch, 2) 621 + #define __NR_inotify_init1 279 622 + __SYSCALL(279, sys_inotify_init1, 1) 623 + 624 + #define __NR_getcpu 280 625 + __SYSCALL(280, sys_getcpu, 0) 626 + #define __NR_kexec_load 281 627 + __SYSCALL(281, sys_ni_syscall, 0) 628 + 629 + #define __NR_ioprio_set 282 630 + __SYSCALL(282, sys_ioprio_set, 2) 631 + #define __NR_ioprio_get 283 632 + __SYSCALL(283, sys_ioprio_get, 3) 633 + 634 + #define __NR_set_robust_list 284 635 + __SYSCALL(284, sys_set_robust_list, 3) 636 + #define __NR_get_robust_list 285 637 + __SYSCALL(285, sys_get_robust_list, 3) 638 + #define __NR_available286 286 639 + __SYSCALL(286, sys_ni_syscall, 0) 640 + #define __NR_available287 287 641 + __SYSCALL(287, sys_ni_syscall, 0) 642 + 643 + /* Relative File Operations */ 644 + 645 + #define __NR_openat 288 646 + __SYSCALL(288, sys_openat, 4) 647 + #define __NR_mkdirat 289 648 + __SYSCALL(289, sys_mkdirat, 3) 649 + #define __NR_mknodat 290 650 + __SYSCALL(290, sys_mknodat, 4) 651 + #define __NR_unlinkat 291 652 + __SYSCALL(291, sys_unlinkat, 3) 653 + #define __NR_renameat 292 654 + __SYSCALL(292, sys_renameat, 4) 655 + #define __NR_linkat 293 656 + __SYSCALL(293, sys_linkat, 5) 657 + #define __NR_symlinkat 294 658 + __SYSCALL(294, sys_symlinkat, 3) 659 + #define __NR_readlinkat 295 660 + __SYSCALL(295, sys_readlinkat, 4) 661 + #define __NR_utimensat 296 662 + __SYSCALL(296, sys_utimensat, 0) 663 + #define __NR_fchownat 297 664 + __SYSCALL(297, sys_fchownat, 5) 665 + #define __NR_futimesat 298 666 + __SYSCALL(298, sys_futimesat, 4) 667 + #define __NR_fstatat64 299 668 + __SYSCALL(299, sys_fstatat64, 0) 669 + #define __NR_fchmodat 300 670 + __SYSCALL(300, sys_fchmodat, 4) 671 + #define __NR_faccessat 301 672 + __SYSCALL(301, sys_faccessat, 4) 673 + #define __NR_available302 302 674 + __SYSCALL(302, sys_ni_syscall, 0) 675 + #define __NR_available303 303 676 + __SYSCALL(303, sys_ni_syscall, 0) 677 + 678 + #define __NR_signalfd 304 679 + __SYSCALL(304, sys_signalfd, 3) 680 + /* 305 was __NR_timerfd */ 681 + __SYSCALL(305, sys_ni_syscall, 0) 682 + #define __NR_eventfd 306 683 + __SYSCALL(306, sys_eventfd, 1) 684 + #define __NR_recvmmsg 307 685 + __SYSCALL(307, sys_recvmmsg, 5) 686 + 687 + #define __NR_setns 308 688 + __SYSCALL(308, sys_setns, 2) 689 + #define __NR_signalfd4 309 690 + __SYSCALL(309, sys_signalfd4, 4) 691 + #define __NR_dup3 310 692 + __SYSCALL(310, sys_dup3, 3) 693 + #define __NR_pipe2 311 694 + __SYSCALL(311, sys_pipe2, 2) 695 + 696 + #define __NR_timerfd_create 312 697 + __SYSCALL(312, sys_timerfd_create, 2) 698 + #define __NR_timerfd_settime 313 699 + __SYSCALL(313, sys_timerfd_settime, 4) 700 + #define __NR_timerfd_gettime 314 701 + __SYSCALL(314, sys_timerfd_gettime, 2) 702 + #define __NR_available315 315 703 + __SYSCALL(315, sys_ni_syscall, 0) 704 + 705 + #define __NR_eventfd2 316 706 + __SYSCALL(316, sys_eventfd2, 2) 707 + #define __NR_preadv 317 708 + __SYSCALL(317, sys_preadv, 5) 709 + #define __NR_pwritev 318 710 + __SYSCALL(318, sys_pwritev, 5) 711 + #define __NR_available319 319 712 + __SYSCALL(319, sys_ni_syscall, 0) 713 + 714 + #define __NR_fanotify_init 320 715 + __SYSCALL(320, sys_fanotify_init, 2) 716 + #define __NR_fanotify_mark 321 717 + __SYSCALL(321, sys_fanotify_mark, 6) 718 + #define __NR_process_vm_readv 322 719 + __SYSCALL(322, sys_process_vm_readv, 6) 720 + #define __NR_process_vm_writev 323 721 + __SYSCALL(323, sys_process_vm_writev, 6) 722 + 723 + #define __NR_name_to_handle_at 324 724 + __SYSCALL(324, sys_name_to_handle_at, 5) 725 + #define __NR_open_by_handle_at 325 726 + __SYSCALL(325, sys_open_by_handle_at, 3) 727 + #define __NR_sync_file_range 326 728 + __SYSCALL(326, sys_sync_file_range2, 6) 729 + #define __NR_perf_event_open 327 730 + __SYSCALL(327, sys_perf_event_open, 5) 731 + 732 + #define __NR_rt_tgsigqueueinfo 328 733 + __SYSCALL(328, sys_rt_tgsigqueueinfo, 4) 734 + #define __NR_clock_adjtime 329 735 + __SYSCALL(329, sys_clock_adjtime, 2) 736 + #define __NR_prlimit64 330 737 + __SYSCALL(330, sys_prlimit64, 4) 738 + #define __NR_kcmp 331 739 + __SYSCALL(331, sys_kcmp, 5) 740 + 741 + 742 + #define __NR_syscall_count 332 743 + 744 + /* 745 + * sysxtensa syscall handler 746 + * 747 + * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); 748 + * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); 749 + * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); 750 + * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); 751 + * a2 a6 a3 a4 a5 752 + */ 753 + 754 + #define SYS_XTENSA_RESERVED 0 /* don't use this */ 755 + #define SYS_XTENSA_ATOMIC_SET 1 /* set variable */ 756 + #define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */ 757 + #define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */ 758 + #define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */ 759 + 760 + #define SYS_XTENSA_COUNT 5 /* count */ 761 + 762 + #endif /* _UAPI_XTENSA_UNISTD_H */
+19 -19
arch/xtensa/kernel/align.S
··· 170 170 s32i a7, a2, PT_AREG7 171 171 s32i a8, a2, PT_AREG8 172 172 173 - rsr a0, DEPC 174 - xsr a3, EXCSAVE_1 173 + rsr a0, depc 174 + xsr a3, excsave1 175 175 s32i a0, a2, PT_AREG2 176 176 s32i a3, a2, PT_AREG3 177 177 178 178 /* Keep value of SAR in a0 */ 179 179 180 - rsr a0, SAR 181 - rsr a8, EXCVADDR # load unaligned memory address 180 + rsr a0, sar 181 + rsr a8, excvaddr # load unaligned memory address 182 182 183 183 /* Now, identify one of the following load/store instructions. 184 184 * ··· 197 197 198 198 /* Extract the instruction that caused the unaligned access. */ 199 199 200 - rsr a7, EPC_1 # load exception address 200 + rsr a7, epc1 # load exception address 201 201 movi a3, ~3 202 202 and a3, a3, a7 # mask lower bits 203 203 ··· 275 275 1: 276 276 277 277 #if XCHAL_HAVE_LOOPS 278 - rsr a5, LEND # check if we reached LEND 278 + rsr a5, lend # check if we reached LEND 279 279 bne a7, a5, 1f 280 - rsr a5, LCOUNT # and LCOUNT != 0 280 + rsr a5, lcount # and LCOUNT != 0 281 281 beqz a5, 1f 282 282 addi a5, a5, -1 # decrement LCOUNT and set 283 - rsr a7, LBEG # set PC to LBEGIN 284 - wsr a5, LCOUNT 283 + rsr a7, lbeg # set PC to LBEGIN 284 + wsr a5, lcount 285 285 #endif 286 286 287 - 1: wsr a7, EPC_1 # skip load instruction 287 + 1: wsr a7, epc1 # skip load instruction 288 288 extui a4, a4, INSN_T, 4 # extract target register 289 289 movi a5, .Lload_table 290 290 addx8 a4, a4, a5 ··· 355 355 356 356 1: 357 357 #if XCHAL_HAVE_LOOPS 358 - rsr a4, LEND # check if we reached LEND 358 + rsr a4, lend # check if we reached LEND 359 359 bne a7, a4, 1f 360 - rsr a4, LCOUNT # and LCOUNT != 0 360 + rsr a4, lcount # and LCOUNT != 0 361 361 beqz a4, 1f 362 362 addi a4, a4, -1 # decrement LCOUNT and set 363 - rsr a7, LBEG # set PC to LBEGIN 364 - wsr a4, LCOUNT 363 + rsr a7, lbeg # set PC to LBEGIN 364 + wsr a4, lcount 365 365 #endif 366 366 367 - 1: wsr a7, EPC_1 # skip store instruction 367 + 1: wsr a7, epc1 # skip store instruction 368 368 movi a4, ~3 369 369 and a4, a4, a8 # align memory address 370 370 ··· 406 406 407 407 .Lexit: 408 408 movi a4, 0 409 - rsr a3, EXCSAVE_1 409 + rsr a3, excsave1 410 410 s32i a4, a3, EXC_TABLE_FIXUP 411 411 412 412 /* Restore working register */ ··· 420 420 421 421 /* restore SAR and return */ 422 422 423 - wsr a0, SAR 423 + wsr a0, sar 424 424 l32i a0, a2, PT_AREG0 425 425 l32i a2, a2, PT_AREG2 426 426 rfe ··· 438 438 l32i a6, a2, PT_AREG6 439 439 l32i a5, a2, PT_AREG5 440 440 l32i a4, a2, PT_AREG4 441 - wsr a0, SAR 441 + wsr a0, sar 442 442 mov a1, a2 443 443 444 - rsr a0, PS 444 + rsr a0, ps 445 445 bbsi.l a2, PS_UM_BIT, 1f # jump if user mode 446 446 447 447 movi a0, _kernel_exception
+10 -10
arch/xtensa/kernel/coprocessor.S
··· 43 43 /* IO protection is currently unsupported. */ 44 44 45 45 ENTRY(fast_io_protect) 46 - wsr a0, EXCSAVE_1 46 + wsr a0, excsave1 47 47 movi a0, unrecoverable_exception 48 48 callx0 a0 49 49 ··· 220 220 */ 221 221 222 222 ENTRY(fast_coprocessor_double) 223 - wsr a0, EXCSAVE_1 223 + wsr a0, excsave1 224 224 movi a0, unrecoverable_exception 225 225 callx0 a0 226 226 ··· 229 229 230 230 /* Save remaining registers a1-a3 and SAR */ 231 231 232 - xsr a3, EXCSAVE_1 232 + xsr a3, excsave1 233 233 s32i a3, a2, PT_AREG3 234 - rsr a3, SAR 234 + rsr a3, sar 235 235 s32i a1, a2, PT_AREG1 236 236 s32i a3, a2, PT_SAR 237 237 mov a1, a2 238 - rsr a2, DEPC 238 + rsr a2, depc 239 239 s32i a2, a1, PT_AREG2 240 240 241 241 /* ··· 248 248 249 249 /* Find coprocessor number. Subtract first CP EXCCAUSE from EXCCAUSE */ 250 250 251 - rsr a3, EXCCAUSE 251 + rsr a3, exccause 252 252 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED 253 253 254 254 /* Set corresponding CPENABLE bit -> (sar:cp-index, a3: 1<<cp-index)*/ 255 255 256 256 ssl a3 # SAR: 32 - coprocessor_number 257 257 movi a2, 1 258 - rsr a0, CPENABLE 258 + rsr a0, cpenable 259 259 sll a2, a2 260 260 or a0, a0, a2 261 - wsr a0, CPENABLE 261 + wsr a0, cpenable 262 262 rsync 263 263 264 264 /* Retrieve previous owner. (a3 still holds CP number) */ ··· 291 291 292 292 /* Note that only a0 and a1 were preserved. */ 293 293 294 - 2: rsr a3, EXCCAUSE 294 + 2: rsr a3, exccause 295 295 addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED 296 296 movi a0, coprocessor_owner 297 297 addx4 a0, a3, a0 ··· 321 321 l32i a0, a1, PT_SAR 322 322 l32i a3, a1, PT_AREG3 323 323 l32i a2, a1, PT_AREG2 324 - wsr a0, SAR 324 + wsr a0, sar 325 325 l32i a0, a1, PT_AREG0 326 326 l32i a1, a1, PT_AREG1 327 327
+127 -127
arch/xtensa/kernel/entry.S
··· 112 112 113 113 /* Save a2, a3, and depc, restore excsave_1 and set SP. */ 114 114 115 - xsr a3, EXCSAVE_1 116 - rsr a0, DEPC 115 + xsr a3, excsave1 116 + rsr a0, depc 117 117 s32i a1, a2, PT_AREG1 118 118 s32i a0, a2, PT_AREG2 119 119 s32i a3, a2, PT_AREG3 ··· 125 125 /* Save SAR and turn off single stepping */ 126 126 127 127 movi a2, 0 128 - rsr a3, SAR 129 - xsr a2, ICOUNTLEVEL 128 + rsr a3, sar 129 + xsr a2, icountlevel 130 130 s32i a3, a1, PT_SAR 131 131 s32i a2, a1, PT_ICOUNTLEVEL 132 132 133 133 /* Rotate ws so that the current windowbase is at bit0. */ 134 134 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 135 135 136 - rsr a2, WINDOWBASE 137 - rsr a3, WINDOWSTART 136 + rsr a2, windowbase 137 + rsr a3, windowstart 138 138 ssr a2 139 139 s32i a2, a1, PT_WINDOWBASE 140 140 s32i a3, a1, PT_WINDOWSTART ··· 205 205 206 206 /* WINDOWBASE still in SAR! */ 207 207 208 - rsr a2, SAR # original WINDOWBASE 208 + rsr a2, sar # original WINDOWBASE 209 209 movi a3, 1 210 210 ssl a2 211 211 sll a3, a3 212 - wsr a3, WINDOWSTART # set corresponding WINDOWSTART bit 213 - wsr a2, WINDOWBASE # and WINDOWSTART 212 + wsr a3, windowstart # set corresponding WINDOWSTART bit 213 + wsr a2, windowbase # and WINDOWSTART 214 214 rsync 215 215 216 216 /* We are back to the original stack pointer (a1) */ ··· 252 252 253 253 /* Save a0, a2, a3, DEPC and set SP. */ 254 254 255 - xsr a3, EXCSAVE_1 # restore a3, excsave_1 256 - rsr a0, DEPC # get a2 255 + xsr a3, excsave1 # restore a3, excsave_1 256 + rsr a0, depc # get a2 257 257 s32i a1, a2, PT_AREG1 258 258 s32i a0, a2, PT_AREG2 259 259 s32i a3, a2, PT_AREG3 ··· 265 265 /* Save SAR and turn off single stepping */ 266 266 267 267 movi a2, 0 268 - rsr a3, SAR 269 - xsr a2, ICOUNTLEVEL 268 + rsr a3, sar 269 + xsr a2, icountlevel 270 270 s32i a3, a1, PT_SAR 271 271 s32i a2, a1, PT_ICOUNTLEVEL 272 272 273 273 /* Rotate ws so that the current windowbase is at bit0. */ 274 274 /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ 275 275 276 - rsr a2, WINDOWBASE # don't need to save these, we only 277 - rsr a3, WINDOWSTART # need shifted windowstart: windowmask 276 + rsr a2, windowbase # don't need to save these, we only 277 + rsr a3, windowstart # need shifted windowstart: windowmask 278 278 ssr a2 279 279 slli a2, a3, 32-WSBITS 280 280 src a2, a3, a2 ··· 323 323 324 324 /* Save some registers, disable loops and clear the syscall flag. */ 325 325 326 - rsr a2, DEBUGCAUSE 327 - rsr a3, EPC_1 326 + rsr a2, debugcause 327 + rsr a3, epc1 328 328 s32i a2, a1, PT_DEBUGCAUSE 329 329 s32i a3, a1, PT_PC 330 330 331 331 movi a2, -1 332 - rsr a3, EXCVADDR 332 + rsr a3, excvaddr 333 333 s32i a2, a1, PT_SYSCALL 334 334 movi a2, 0 335 335 s32i a3, a1, PT_EXCVADDR 336 - xsr a2, LCOUNT 336 + xsr a2, lcount 337 337 s32i a2, a1, PT_LCOUNT 338 338 339 339 /* It is now save to restore the EXC_TABLE_FIXUP variable. */ 340 340 341 - rsr a0, EXCCAUSE 341 + rsr a0, exccause 342 342 movi a3, 0 343 - rsr a2, EXCSAVE_1 343 + rsr a2, excsave1 344 344 s32i a0, a1, PT_EXCCAUSE 345 345 s32i a3, a2, EXC_TABLE_FIXUP 346 346 ··· 352 352 * (interrupts disabled) and if this exception is not an interrupt. 353 353 */ 354 354 355 - rsr a3, PS 355 + rsr a3, ps 356 356 addi a0, a0, -4 357 357 movi a2, 1 358 358 extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] 359 359 moveqz a3, a2, a0 # a3 = 1 iff interrupt exception 360 360 movi a2, 1 << PS_WOE_BIT 361 361 or a3, a3, a2 362 - rsr a0, EXCCAUSE 363 - xsr a3, PS 362 + rsr a0, exccause 363 + xsr a3, ps 364 364 365 365 s32i a3, a1, PT_PS # save ps 366 366 367 - /* Save LBEG, LEND */ 367 + /* Save lbeg, lend */ 368 368 369 - rsr a2, LBEG 370 - rsr a3, LEND 369 + rsr a2, lbeg 370 + rsr a3, lend 371 371 s32i a2, a1, PT_LBEG 372 372 s32i a3, a1, PT_LEND 373 373 ··· 432 432 433 433 load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT 434 434 435 - wsr a3, PS /* disable interrupts */ 435 + wsr a3, ps /* disable interrupts */ 436 436 437 437 _bbci.l a3, PS_UM_BIT, kernel_exception_exit 438 438 ··· 444 444 445 445 l32i a2, a1, PT_WINDOWBASE 446 446 l32i a3, a1, PT_WINDOWSTART 447 - wsr a1, DEPC # use DEPC as temp storage 448 - wsr a3, WINDOWSTART # restore WINDOWSTART 447 + wsr a1, depc # use DEPC as temp storage 448 + wsr a3, windowstart # restore WINDOWSTART 449 449 ssr a2 # preserve user's WB in the SAR 450 - wsr a2, WINDOWBASE # switch to user's saved WB 450 + wsr a2, windowbase # switch to user's saved WB 451 451 rsync 452 - rsr a1, DEPC # restore stack pointer 452 + rsr a1, depc # restore stack pointer 453 453 l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9) 454 454 rotw -1 # we restore a4..a7 455 455 _bltui a6, 16, 1f # only have to restore current window? ··· 475 475 476 476 /* Clear unrestored registers (don't leak anything to user-land */ 477 477 478 - 1: rsr a0, WINDOWBASE 479 - rsr a3, SAR 478 + 1: rsr a0, windowbase 479 + rsr a3, sar 480 480 sub a3, a0, a3 481 481 beqz a3, 2f 482 482 extui a3, a3, 0, WBBITS ··· 556 556 557 557 /* Test WINDOWSTART now. If spilled, do the movsp */ 558 558 559 - rsr a3, WINDOWSTART 559 + rsr a3, windowstart 560 560 addi a0, a3, -1 561 561 and a3, a3, a0 562 562 _bnez a3, common_exception_exit ··· 604 604 605 605 1: l32i a2, a1, PT_PC 606 606 l32i a3, a1, PT_SAR 607 - wsr a2, EPC_1 608 - wsr a3, SAR 607 + wsr a2, epc1 608 + wsr a3, sar 609 609 610 610 /* Restore LBEG, LEND, LCOUNT */ 611 611 612 612 l32i a2, a1, PT_LBEG 613 613 l32i a3, a1, PT_LEND 614 - wsr a2, LBEG 614 + wsr a2, lbeg 615 615 l32i a2, a1, PT_LCOUNT 616 - wsr a3, LEND 617 - wsr a2, LCOUNT 616 + wsr a3, lend 617 + wsr a2, lcount 618 618 619 619 /* We control single stepping through the ICOUNTLEVEL register. */ 620 620 621 621 l32i a2, a1, PT_ICOUNTLEVEL 622 622 movi a3, -2 623 - wsr a2, ICOUNTLEVEL 624 - wsr a3, ICOUNT 623 + wsr a2, icountlevel 624 + wsr a3, icount 625 625 626 626 /* Check if it was double exception. */ 627 627 ··· 636 636 l32i a1, a1, PT_AREG1 637 637 rfe 638 638 639 - 1: wsr a0, DEPC 639 + 1: wsr a0, depc 640 640 l32i a0, a1, PT_AREG0 641 641 l32i a1, a1, PT_AREG1 642 642 rfde ··· 651 651 652 652 ENTRY(debug_exception) 653 653 654 - rsr a0, EPS + XCHAL_DEBUGLEVEL 654 + rsr a0, SREG_EPS + XCHAL_DEBUGLEVEL 655 655 bbsi.l a0, PS_EXCM_BIT, 1f # exception mode 656 656 657 - /* Set EPC_1 and EXCCAUSE */ 657 + /* Set EPC1 and EXCCAUSE */ 658 658 659 - wsr a2, DEPC # save a2 temporarily 660 - rsr a2, EPC + XCHAL_DEBUGLEVEL 661 - wsr a2, EPC_1 659 + wsr a2, depc # save a2 temporarily 660 + rsr a2, SREG_EPC + XCHAL_DEBUGLEVEL 661 + wsr a2, epc1 662 662 663 663 movi a2, EXCCAUSE_MAPPED_DEBUG 664 - wsr a2, EXCCAUSE 664 + wsr a2, exccause 665 665 666 666 /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ 667 667 668 668 movi a2, 1 << PS_EXCM_BIT 669 669 or a2, a0, a2 670 670 movi a0, debug_exception # restore a3, debug jump vector 671 - wsr a2, PS 672 - xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL 671 + wsr a2, ps 672 + xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL 673 673 674 674 /* Switch to kernel/user stack, restore jump vector, and save a0 */ 675 675 ··· 680 680 movi a0, 0 681 681 s32i a1, a2, PT_AREG1 682 682 s32i a0, a2, PT_DEPC # mark it as a regular exception 683 - xsr a0, DEPC 683 + xsr a0, depc 684 684 s32i a3, a2, PT_AREG3 685 685 s32i a0, a2, PT_AREG2 686 686 mov a1, a2 687 687 j _kernel_exception 688 688 689 - 2: rsr a2, EXCSAVE_1 689 + 2: rsr a2, excsave1 690 690 l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer 691 691 s32i a0, a2, PT_AREG0 692 692 movi a0, 0 693 693 s32i a1, a2, PT_AREG1 694 694 s32i a0, a2, PT_DEPC 695 - xsr a0, DEPC 695 + xsr a0, depc 696 696 s32i a3, a2, PT_AREG3 697 697 s32i a0, a2, PT_AREG2 698 698 mov a1, a2 ··· 732 732 movi a0, 1 733 733 movi a1, 0 734 734 735 - wsr a0, WINDOWSTART 736 - wsr a1, WINDOWBASE 735 + wsr a0, windowstart 736 + wsr a1, windowbase 737 737 rsync 738 738 739 739 movi a1, (1 << PS_WOE_BIT) | 1 740 - wsr a1, PS 740 + wsr a1, ps 741 741 rsync 742 742 743 743 movi a1, init_task ··· 793 793 l32i a0, a2, PT_DEPC 794 794 _bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, .Lunhandled_double 795 795 796 - rsr a0, DEPC # get a2 796 + rsr a0, depc # get a2 797 797 s32i a4, a2, PT_AREG4 # save a4 and 798 798 s32i a0, a2, PT_AREG2 # a2 to stack 799 799 ··· 804 804 805 805 /* Restore a3, excsave_1 */ 806 806 807 - xsr a3, EXCSAVE_1 # make sure excsave_1 is valid for dbl. 808 - rsr a4, EPC_1 # get exception address 807 + xsr a3, excsave1 # make sure excsave_1 is valid for dbl. 808 + rsr a4, epc1 # get exception address 809 809 s32i a3, a2, PT_AREG3 # save a3 to stack 810 810 811 811 #ifdef ALLOCA_EXCEPTION_IN_IRAM ··· 820 820 jx a3 821 821 822 822 .Lunhandled_double: 823 - wsr a0, EXCSAVE_1 823 + wsr a0, excsave1 824 824 movi a0, unrecoverable_exception 825 825 callx0 a0 826 826 ··· 852 852 #endif 853 853 addi a4, a4, 3 # step over movsp 854 854 _EXTUI_MOVSP_DST(a0) # extract destination register 855 - wsr a4, EPC_1 # save new epc_1 855 + wsr a4, epc1 # save new epc_1 856 856 857 857 _bnei a0, 1, 1f # no 'movsp a1, ax': jump 858 858 ··· 953 953 954 954 /* Skip syscall. */ 955 955 956 - rsr a0, EPC_1 956 + rsr a0, epc1 957 957 addi a0, a0, 3 958 - wsr a0, EPC_1 958 + wsr a0, epc1 959 959 960 960 l32i a0, a2, PT_DEPC 961 961 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable 962 962 963 - rsr a0, DEPC # get syscall-nr 963 + rsr a0, depc # get syscall-nr 964 964 _beqz a0, fast_syscall_spill_registers 965 965 _beqi a0, __NR_xtensa, fast_syscall_xtensa 966 966 ··· 970 970 971 971 /* Skip syscall. */ 972 972 973 - rsr a0, EPC_1 973 + rsr a0, epc1 974 974 addi a0, a0, 3 975 - wsr a0, EPC_1 975 + wsr a0, epc1 976 976 977 977 l32i a0, a2, PT_DEPC 978 978 bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable 979 979 980 - rsr a0, DEPC # get syscall-nr 980 + rsr a0, depc # get syscall-nr 981 981 _beqz a0, fast_syscall_spill_registers 982 982 _beqi a0, __NR_xtensa, fast_syscall_xtensa 983 983 ··· 988 988 /* Restore all states. */ 989 989 990 990 l32i a0, a2, PT_AREG0 # restore a0 991 - xsr a2, DEPC # restore a2, depc 992 - rsr a3, EXCSAVE_1 991 + xsr a2, depc # restore a2, depc 992 + rsr a3, excsave1 993 993 994 - wsr a0, EXCSAVE_1 994 + wsr a0, excsave1 995 995 movi a0, unrecoverable_exception 996 996 callx0 a0 997 997 ··· 1047 1047 1048 1048 ENTRY(fast_syscall_xtensa) 1049 1049 1050 - xsr a3, EXCSAVE_1 # restore a3, excsave1 1050 + xsr a3, excsave1 # restore a3, excsave1 1051 1051 1052 1052 s32i a7, a2, PT_AREG7 # we need an additional register 1053 1053 movi a7, 4 # sizeof(unsigned int) ··· 1124 1124 1125 1125 movi a0, fast_syscall_spill_registers_fixup 1126 1126 s32i a0, a3, EXC_TABLE_FIXUP 1127 - rsr a0, WINDOWBASE 1127 + rsr a0, windowbase 1128 1128 s32i a0, a3, EXC_TABLE_PARAM 1129 1129 1130 1130 /* Save a3 and SAR on stack. */ 1131 1131 1132 - rsr a0, SAR 1133 - xsr a3, EXCSAVE_1 # restore a3 and excsave_1 1132 + rsr a0, sar 1133 + xsr a3, excsave1 # restore a3 and excsave_1 1134 1134 s32i a3, a2, PT_AREG3 1135 1135 s32i a4, a2, PT_AREG4 1136 1136 s32i a0, a2, PT_AREG5 # store SAR to PT_AREG5 ··· 1148 1148 l32i a3, a2, PT_AREG5 1149 1149 l32i a4, a2, PT_AREG4 1150 1150 l32i a0, a2, PT_AREG0 1151 - wsr a3, SAR 1151 + wsr a3, sar 1152 1152 l32i a3, a2, PT_AREG3 1153 1153 1154 1154 /* Restore clobbered registers. */ ··· 1173 1173 1174 1174 fast_syscall_spill_registers_fixup: 1175 1175 1176 - rsr a2, WINDOWBASE # get current windowbase (a2 is saved) 1177 - xsr a0, DEPC # restore depc and a0 1176 + rsr a2, windowbase # get current windowbase (a2 is saved) 1177 + xsr a0, depc # restore depc and a0 1178 1178 ssl a2 # set shift (32 - WB) 1179 1179 1180 1180 /* We need to make sure the current registers (a0-a3) are preserved. ··· 1182 1182 * in WS, so that the exception handlers save them to the task stack. 1183 1183 */ 1184 1184 1185 - rsr a3, EXCSAVE_1 # get spill-mask 1185 + rsr a3, excsave1 # get spill-mask 1186 1186 slli a2, a3, 1 # shift left by one 1187 1187 1188 1188 slli a3, a2, 32-WSBITS 1189 1189 src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy...... 1190 - wsr a2, WINDOWSTART # set corrected windowstart 1190 + wsr a2, windowstart # set corrected windowstart 1191 1191 1192 1192 movi a3, exc_table 1193 1193 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2 ··· 1201 1201 * excsave_1: a3 1202 1202 */ 1203 1203 1204 - wsr a3, WINDOWBASE 1204 + wsr a3, windowbase 1205 1205 rsync 1206 1206 1207 1207 /* We are now in the original frame when we entered _spill_registers: ··· 1227 1227 /* Jump to the exception handler. */ 1228 1228 1229 1229 movi a3, exc_table 1230 - rsr a0, EXCCAUSE 1230 + rsr a0, exccause 1231 1231 addx4 a0, a0, a3 # find entry in table 1232 1232 l32i a0, a0, EXC_TABLE_FAST_USER # load handler 1233 1233 jx a0 ··· 1236 1236 1237 1237 /* When we return here, all registers have been restored (a2: DEPC) */ 1238 1238 1239 - wsr a2, DEPC # exception address 1239 + wsr a2, depc # exception address 1240 1240 1241 1241 /* Restore fixup handler. */ 1242 1242 1243 - xsr a3, EXCSAVE_1 1243 + xsr a3, excsave1 1244 1244 movi a2, fast_syscall_spill_registers_fixup 1245 1245 s32i a2, a3, EXC_TABLE_FIXUP 1246 - rsr a2, WINDOWBASE 1246 + rsr a2, windowbase 1247 1247 s32i a2, a3, EXC_TABLE_PARAM 1248 1248 l32i a2, a3, EXC_TABLE_KSTK 1249 1249 1250 1250 /* Load WB at the time the exception occurred. */ 1251 1251 1252 - rsr a3, SAR # WB is still in SAR 1252 + rsr a3, sar # WB is still in SAR 1253 1253 neg a3, a3 1254 - wsr a3, WINDOWBASE 1254 + wsr a3, windowbase 1255 1255 rsync 1256 1256 1257 1257 /* Restore a3 and return. */ 1258 1258 1259 1259 movi a3, exc_table 1260 - xsr a3, EXCSAVE_1 1260 + xsr a3, excsave1 1261 1261 1262 1262 rfde 1263 1263 ··· 1283 1283 * Rotate ws right so that a4 = yyxxxwww1. 1284 1284 */ 1285 1285 1286 - rsr a4, WINDOWBASE 1287 - rsr a3, WINDOWSTART # a3 = xxxwww1yy 1286 + rsr a4, windowbase 1287 + rsr a3, windowstart # a3 = xxxwww1yy 1288 1288 ssr a4 # holds WB 1289 1289 slli a4, a3, WSBITS 1290 1290 or a3, a3, a4 # a3 = xxxwww1yyxxxwww1yy ··· 1302 1302 1303 1303 /* Skip empty frames - get 'oldest' WINDOWSTART-bit. */ 1304 1304 1305 - wsr a3, WINDOWSTART # save shifted windowstart 1305 + wsr a3, windowstart # save shifted windowstart 1306 1306 neg a4, a3 1307 1307 and a3, a4, a3 # first bit set from right: 000010000 1308 1308 ··· 1311 1311 sub a4, a3, a4 # WSBITS-a4:number of 0-bits from right 1312 1312 ssr a4 # save in SAR for later. 1313 1313 1314 - rsr a3, WINDOWBASE 1314 + rsr a3, windowbase 1315 1315 add a3, a3, a4 1316 - wsr a3, WINDOWBASE 1316 + wsr a3, windowbase 1317 1317 rsync 1318 1318 1319 - rsr a3, WINDOWSTART 1319 + rsr a3, windowstart 1320 1320 srl a3, a3 # shift windowstart 1321 1321 1322 1322 /* WB is now just one frame below the oldest frame in the register ··· 1364 1364 .Lexit: /* Done. Do the final rotation, set WS, and return. */ 1365 1365 1366 1366 rotw 1 1367 - rsr a3, WINDOWBASE 1367 + rsr a3, windowbase 1368 1368 ssl a3 1369 1369 movi a3, 1 1370 1370 sll a3, a3 1371 - wsr a3, WINDOWSTART 1371 + wsr a3, windowstart 1372 1372 ret 1373 1373 1374 1374 .Lc4: s32e a4, a9, -16 ··· 1429 1429 * however, this condition is unrecoverable in kernel space. 1430 1430 */ 1431 1431 1432 - rsr a0, PS 1432 + rsr a0, ps 1433 1433 _bbci.l a0, PS_UM_BIT, 1f 1434 1434 1435 1435 /* User space: Setup a dummy frame and kill application. ··· 1439 1439 movi a0, 1 1440 1440 movi a1, 0 1441 1441 1442 - wsr a0, WINDOWSTART 1443 - wsr a1, WINDOWBASE 1442 + wsr a0, windowstart 1443 + wsr a1, windowbase 1444 1444 rsync 1445 1445 1446 1446 movi a0, 0 1447 1447 1448 1448 movi a3, exc_table 1449 1449 l32i a1, a3, EXC_TABLE_KSTK 1450 - wsr a3, EXCSAVE_1 1450 + wsr a3, excsave1 1451 1451 1452 1452 movi a4, (1 << PS_WOE_BIT) | 1 1453 - wsr a4, PS 1453 + wsr a4, ps 1454 1454 rsync 1455 1455 1456 1456 movi a6, SIGSEGV ··· 1459 1459 1460 1460 1: /* Kernel space: PANIC! */ 1461 1461 1462 - wsr a0, EXCSAVE_1 1462 + wsr a0, excsave1 1463 1463 movi a0, unrecoverable_exception 1464 1464 callx0 a0 # should not return 1465 1465 1: j 1b ··· 1524 1524 1525 1525 /* We deliberately destroy a3 that holds the exception table. */ 1526 1526 1527 - 8: rsr a3, EXCVADDR # fault address 1527 + 8: rsr a3, excvaddr # fault address 1528 1528 _PGD_OFFSET(a0, a3, a1) 1529 1529 l32i a0, a0, 0 # read pmdval 1530 1530 beqz a0, 2f ··· 1542 1542 * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY 1543 1543 */ 1544 1544 1545 - movi a1, -PAGE_OFFSET 1545 + movi a1, (-PAGE_OFFSET) & 0xffffffff 1546 1546 add a0, a0, a1 # pmdval - PAGE_OFFSET 1547 1547 extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK 1548 1548 xor a0, a0, a1 ··· 1561 1561 */ 1562 1562 1563 1563 extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3 1564 - rsr a1, PTEVADDR 1564 + rsr a1, ptevaddr 1565 1565 addx2 a3, a3, a3 # -> 0,3,6,9 1566 1566 srli a1, a1, PAGE_SHIFT 1567 1567 extui a3, a3, 2, 2 # -> 0,0,1,2 ··· 1583 1583 l32i a0, a2, PT_AREG0 1584 1584 l32i a1, a2, PT_AREG1 1585 1585 l32i a2, a2, PT_DEPC 1586 - xsr a3, EXCSAVE_1 1586 + xsr a3, excsave1 1587 1587 1588 1588 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f 1589 1589 1590 1590 /* Restore excsave1 and return. */ 1591 1591 1592 - rsr a2, DEPC 1592 + rsr a2, depc 1593 1593 rfe 1594 1594 1595 1595 /* Return from double exception. */ 1596 1596 1597 - 1: xsr a2, DEPC 1597 + 1: xsr a2, depc 1598 1598 esync 1599 1599 rfde 1600 1600 ··· 1618 1618 /* Make sure the exception originated in the special functions */ 1619 1619 1620 1620 movi a0, __tlbtemp_mapping_start 1621 - rsr a3, EPC_1 1621 + rsr a3, epc1 1622 1622 bltu a3, a0, 2f 1623 1623 movi a0, __tlbtemp_mapping_end 1624 1624 bgeu a3, a0, 2f ··· 1626 1626 /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */ 1627 1627 1628 1628 movi a3, TLBTEMP_BASE_1 1629 - rsr a0, EXCVADDR 1629 + rsr a0, excvaddr 1630 1630 bltu a0, a3, 2f 1631 1631 1632 1632 addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT)) ··· 1635 1635 /* Check if we have to restore an ITLB mapping. */ 1636 1636 1637 1637 movi a1, __tlbtemp_mapping_itlb 1638 - rsr a3, EPC_1 1638 + rsr a3, epc1 1639 1639 sub a3, a3, a1 1640 1640 1641 1641 /* Calculate VPN */ ··· 1671 1671 2: /* Invalid PGD, default exception handling */ 1672 1672 1673 1673 movi a3, exc_table 1674 - rsr a1, DEPC 1675 - xsr a3, EXCSAVE_1 1674 + rsr a1, depc 1675 + xsr a3, excsave1 1676 1676 s32i a1, a2, PT_AREG2 1677 1677 s32i a3, a2, PT_AREG3 1678 1678 mov a1, a2 1679 1679 1680 - rsr a2, PS 1680 + rsr a2, ps 1681 1681 bbsi.l a2, PS_UM_BIT, 1f 1682 1682 j _kernel_exception 1683 1683 1: j _user_exception ··· 1712 1712 l32i a0, a1, TASK_MM # tsk->mm 1713 1713 beqz a0, 9f 1714 1714 1715 - 8: rsr a1, EXCVADDR # fault address 1715 + 8: rsr a1, excvaddr # fault address 1716 1716 _PGD_OFFSET(a0, a1, a4) 1717 1717 l32i a0, a0, 0 1718 1718 beqz a0, 2f ··· 1725 1725 1726 1726 movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE 1727 1727 or a4, a4, a1 1728 - rsr a1, EXCVADDR 1728 + rsr a1, excvaddr 1729 1729 s32i a4, a0, 0 1730 1730 1731 1731 /* We need to flush the cache if we have page coloring. */ ··· 1749 1749 1750 1750 /* Restore excsave1 and a3. */ 1751 1751 1752 - xsr a3, EXCSAVE_1 1752 + xsr a3, excsave1 1753 1753 bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f 1754 1754 1755 - rsr a2, DEPC 1755 + rsr a2, depc 1756 1756 rfe 1757 1757 1758 1758 /* Double exception. Restore FIXUP handler and return. */ 1759 1759 1760 - 1: xsr a2, DEPC 1760 + 1: xsr a2, depc 1761 1761 esync 1762 1762 rfde 1763 1763 ··· 1766 1766 1767 1767 2: /* If there was a problem, handle fault in C */ 1768 1768 1769 - rsr a4, DEPC # still holds a2 1770 - xsr a3, EXCSAVE_1 1769 + rsr a4, depc # still holds a2 1770 + xsr a3, excsave1 1771 1771 s32i a4, a2, PT_AREG2 1772 1772 s32i a3, a2, PT_AREG3 1773 1773 l32i a4, a2, PT_AREG4 1774 1774 mov a1, a2 1775 1775 1776 - rsr a2, PS 1776 + rsr a2, ps 1777 1777 bbsi.l a2, PS_UM_BIT, 1f 1778 1778 j _kernel_exception 1779 1779 1: j _user_exception ··· 1901 1901 /* Disable ints while we manipulate the stack pointer. */ 1902 1902 1903 1903 movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL 1904 - xsr a14, PS 1905 - rsr a3, EXCSAVE_1 1904 + xsr a14, ps 1905 + rsr a3, excsave1 1906 1906 rsync 1907 1907 s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */ 1908 1908 ··· 1910 1910 1911 1911 #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) 1912 1912 l32i a3, a5, THREAD_CPENABLE 1913 - xsr a3, CPENABLE 1913 + xsr a3, cpenable 1914 1914 s32i a3, a4, THREAD_CPENABLE 1915 1915 #endif 1916 1916 ··· 1924 1924 * we return from kernel space. 1925 1925 */ 1926 1926 1927 - rsr a3, EXCSAVE_1 # exc_table 1927 + rsr a3, excsave1 # exc_table 1928 1928 movi a6, 0 1929 1929 addi a7, a5, PT_REGS_OFFSET 1930 1930 s32i a6, a3, EXC_TABLE_FIXUP ··· 1937 1937 1938 1938 load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER 1939 1939 1940 - wsr a14, PS 1940 + wsr a14, ps 1941 1941 mov a2, a12 # return 'prev' 1942 1942 rsync 1943 1943
+18 -18
arch/xtensa/kernel/head.S
··· 61 61 /* Disable interrupts and exceptions. */ 62 62 63 63 movi a0, LOCKLEVEL 64 - wsr a0, PS 64 + wsr a0, ps 65 65 66 66 /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ 67 67 68 - wsr a2, EXCSAVE_1 68 + wsr a2, excsave1 69 69 70 70 /* Start with a fresh windowbase and windowstart. */ 71 71 72 72 movi a1, 1 73 73 movi a0, 0 74 - wsr a1, WINDOWSTART 75 - wsr a0, WINDOWBASE 74 + wsr a1, windowstart 75 + wsr a0, windowbase 76 76 rsync 77 77 78 78 /* Set a0 to 0 for the remaining initialization. */ ··· 82 82 /* Clear debugging registers. */ 83 83 84 84 #if XCHAL_HAVE_DEBUG 85 - wsr a0, IBREAKENABLE 86 - wsr a0, ICOUNT 85 + wsr a0, ibreakenable 86 + wsr a0, icount 87 87 movi a1, 15 88 - wsr a0, ICOUNTLEVEL 88 + wsr a0, icountlevel 89 89 90 90 .set _index, 0 91 91 .rept XCHAL_NUM_DBREAK - 1 92 - wsr a0, DBREAKC + _index 92 + wsr a0, SREG_DBREAKC + _index 93 93 .set _index, _index + 1 94 94 .endr 95 95 #endif 96 96 97 97 /* Clear CCOUNT (not really necessary, but nice) */ 98 98 99 - wsr a0, CCOUNT # not really necessary, but nice 99 + wsr a0, ccount # not really necessary, but nice 100 100 101 101 /* Disable zero-loops. */ 102 102 103 103 #if XCHAL_HAVE_LOOPS 104 - wsr a0, LCOUNT 104 + wsr a0, lcount 105 105 #endif 106 106 107 107 /* Disable all timers. */ 108 108 109 109 .set _index, 0 110 110 .rept XCHAL_NUM_TIMERS - 1 111 - wsr a0, CCOMPARE + _index 111 + wsr a0, SREG_CCOMPARE + _index 112 112 .set _index, _index + 1 113 113 .endr 114 114 115 115 /* Interrupt initialization. */ 116 116 117 117 movi a2, XCHAL_INTTYPE_MASK_SOFTWARE | XCHAL_INTTYPE_MASK_EXTERN_EDGE 118 - wsr a0, INTENABLE 119 - wsr a2, INTCLEAR 118 + wsr a0, intenable 119 + wsr a2, intclear 120 120 121 121 /* Disable coprocessors. */ 122 122 123 123 #if XCHAL_CP_NUM > 0 124 - wsr a0, CPENABLE 124 + wsr a0, cpenable 125 125 #endif 126 126 127 127 /* Set PS.INTLEVEL=1, PS.WOE=0, kernel stack, PS.EXCM=0 ··· 132 132 */ 133 133 134 134 movi a1, 1 135 - wsr a1, PS 135 + wsr a1, ps 136 136 rsync 137 137 138 138 /* Initialize the caches. ··· 206 206 addi a1, a1, KERNEL_STACK_SIZE 207 207 208 208 movi a2, 0x00040001 # WOE=1, INTLEVEL=1, UM=0 209 - wsr a2, PS # (enable reg-windows; progmode stack) 209 + wsr a2, ps # (enable reg-windows; progmode stack) 210 210 rsync 211 211 212 212 /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/ 213 213 214 214 movi a2, debug_exception 215 - wsr a2, EXCSAVE + XCHAL_DEBUGLEVEL 215 + wsr a2, SREG_EXCSAVE + XCHAL_DEBUGLEVEL 216 216 217 217 /* Set up EXCSAVE[1] to point to the exc_table. */ 218 218 219 219 movi a6, exc_table 220 - xsr a6, EXCSAVE_1 220 + xsr a6, excsave1 221 221 222 222 /* init_arch kick-starts the linux kernel */ 223 223
+3 -3
arch/xtensa/kernel/irq.c
··· 72 72 static void xtensa_irq_mask(struct irq_data *d) 73 73 { 74 74 cached_irq_mask &= ~(1 << d->irq); 75 - set_sr (cached_irq_mask, INTENABLE); 75 + set_sr (cached_irq_mask, intenable); 76 76 } 77 77 78 78 static void xtensa_irq_unmask(struct irq_data *d) 79 79 { 80 80 cached_irq_mask |= 1 << d->irq; 81 - set_sr (cached_irq_mask, INTENABLE); 81 + set_sr (cached_irq_mask, intenable); 82 82 } 83 83 84 84 static void xtensa_irq_enable(struct irq_data *d) ··· 95 95 96 96 static void xtensa_irq_ack(struct irq_data *d) 97 97 { 98 - set_sr(1 << d->irq, INTCLEAR); 98 + set_sr(1 << d->irq, intclear); 99 99 } 100 100 101 101 static int xtensa_irq_retrigger(struct irq_data *d)
+24 -5
arch/xtensa/kernel/process.c
··· 173 173 * 174 174 * Note: This is a pristine frame, so we don't need any spill region on top of 175 175 * childregs. 176 + * 177 + * The fun part: if we're keeping the same VM (i.e. cloning a thread, 178 + * not an entire process), we're normally given a new usp, and we CANNOT share 179 + * any live address register windows. If we just copy those live frames over, 180 + * the two threads (parent and child) will overflow the same frames onto the 181 + * parent stack at different times, likely corrupting the parent stack (esp. 182 + * if the parent returns from functions that called clone() and calls new 183 + * ones, before the child overflows its now old copies of its parent windows). 184 + * One solution is to spill windows to the parent stack, but that's fairly 185 + * involved. Much simpler to just not copy those live frames across. 176 186 */ 177 187 178 188 int copy_thread(unsigned long clone_flags, unsigned long usp, ··· 190 180 struct task_struct * p, struct pt_regs * regs) 191 181 { 192 182 struct pt_regs *childregs; 193 - struct thread_info *ti; 194 183 unsigned long tos; 195 184 int user_mode = user_mode(regs); 185 + 186 + #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) 187 + struct thread_info *ti; 188 + #endif 196 189 197 190 /* Set up new TSS. */ 198 191 tos = (unsigned long)task_stack_page(p) + THREAD_SIZE; ··· 204 191 else 205 192 childregs = (struct pt_regs*)tos - 1; 206 193 194 + /* This does not copy all the regs. In a bout of brilliance or madness, 195 + ARs beyond a0-a15 exist past the end of the struct. */ 207 196 *childregs = *regs; 208 197 209 198 /* Create a call4 dummy-frame: a0 = 0, a1 = childregs. */ 210 199 *((int*)childregs - 3) = (unsigned long)childregs; 211 200 *((int*)childregs - 4) = 0; 212 201 213 - childregs->areg[1] = tos; 214 202 childregs->areg[2] = 0; 215 203 p->set_child_tid = p->clear_child_tid = NULL; 216 204 p->thread.ra = MAKE_RA_FOR_CALL((unsigned long)ret_from_fork, 0x1); ··· 219 205 220 206 if (user_mode(regs)) { 221 207 222 - int len = childregs->wmask & ~0xf; 223 208 childregs->areg[1] = usp; 224 - memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4], 225 - &regs->areg[XCHAL_NUM_AREGS - len/4], len); 209 + if (clone_flags & CLONE_VM) { 210 + childregs->wmask = 1; /* can't share live windows */ 211 + } else { 212 + int len = childregs->wmask & ~0xf; 213 + memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4], 214 + &regs->areg[XCHAL_NUM_AREGS - len/4], len); 215 + } 226 216 // FIXME: we need to set THREADPTR in thread_info... 227 217 if (clone_flags & CLONE_SETTLS) 228 218 childregs->areg[2] = childregs->areg[6]; ··· 234 216 } else { 235 217 /* In kernel space, we start a new thread with a new stack. */ 236 218 childregs->wmask = 1; 219 + childregs->areg[1] = tos; 237 220 } 238 221 239 222 #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS)
+2 -2
arch/xtensa/kernel/setup.c
··· 100 100 } tagtable_t; 101 101 102 102 #define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ 103 - __attribute__((unused, __section__(".taglist"))) = { tag, fn } 103 + __attribute__((used, section(".taglist"))) = { tag, fn } 104 104 105 105 /* parse current tag */ 106 106 ··· 120 120 } 121 121 sysmem.bank[sysmem.nr_banks].type = mi->type; 122 122 sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start); 123 - sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_SIZE; 123 + sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_MASK; 124 124 sysmem.nr_banks++; 125 125 126 126 return 0;
-1
arch/xtensa/kernel/syscall.c
··· 34 34 35 35 #undef __SYSCALL 36 36 #define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, 37 - #undef _XTENSA_UNISTD_H 38 37 #undef __KERNEL_SYSCALLS__ 39 38 #include <asm/unistd.h> 40 39 };
+11 -11
arch/xtensa/kernel/traps.c
··· 97 97 /* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ 98 98 /* EXCCAUSE_PRIVILEGED unhandled */ 99 99 #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION 100 - #ifdef CONFIG_UNALIGNED_USER 100 + #ifdef CONFIG_XTENSA_UNALIGNED_USER 101 101 { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, 102 102 #else 103 103 { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, ··· 202 202 203 203 void do_interrupt (struct pt_regs *regs) 204 204 { 205 - unsigned long intread = get_sr (INTREAD); 206 - unsigned long intenable = get_sr (INTENABLE); 205 + unsigned long intread = get_sr (interrupt); 206 + unsigned long intenable = get_sr (intenable); 207 207 int i, mask; 208 208 209 209 /* Handle all interrupts (no priorities). ··· 213 213 214 214 for (i=0, mask = 1; i < XCHAL_NUM_INTERRUPTS; i++, mask <<= 1) { 215 215 if (mask & (intread & intenable)) { 216 - set_sr (mask, INTCLEAR); 216 + set_sr (mask, intclear); 217 217 do_IRQ (i,regs); 218 218 } 219 219 } ··· 244 244 */ 245 245 246 246 #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION 247 - #ifndef CONFIG_UNALIGNED_USER 247 + #ifndef CONFIG_XTENSA_UNALIGNED_USER 248 248 void 249 249 do_unaligned_user (struct pt_regs *regs) 250 250 { ··· 339 339 /* Initialize EXCSAVE_1 to hold the address of the exception table. */ 340 340 341 341 i = (unsigned long)exc_table; 342 - __asm__ __volatile__("wsr %0, "__stringify(EXCSAVE_1)"\n" : : "a" (i)); 342 + __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (i)); 343 343 } 344 344 345 345 /* ··· 386 386 unsigned int a0, ps; 387 387 388 388 __asm__ __volatile__ ( 389 - "movi a14," __stringify (PS_EXCM_BIT) " | 1\n\t" 389 + "movi a14, " __stringify(PS_EXCM_BIT | 1) "\n\t" 390 390 "mov a12, a0\n\t" 391 - "rsr a13," __stringify(SAR) "\n\t" 392 - "xsr a14," __stringify(PS) "\n\t" 391 + "rsr a13, sar\n\t" 392 + "xsr a14, ps\n\t" 393 393 "movi a0, _spill_registers\n\t" 394 394 "rsync\n\t" 395 395 "callx0 a0\n\t" 396 396 "mov a0, a12\n\t" 397 - "wsr a13," __stringify(SAR) "\n\t" 398 - "wsr a14," __stringify(PS) "\n\t" 397 + "wsr a13, sar\n\t" 398 + "wsr a14, ps\n\t" 399 399 :: "a" (&a0), "a" (&ps) 400 400 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); 401 401 }
+22 -22
arch/xtensa/kernel/vectors.S
··· 69 69 70 70 ENTRY(_UserExceptionVector) 71 71 72 - xsr a3, EXCSAVE_1 # save a3 and get dispatch table 73 - wsr a2, DEPC # save a2 72 + xsr a3, excsave1 # save a3 and get dispatch table 73 + wsr a2, depc # save a2 74 74 l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 75 75 s32i a0, a2, PT_AREG0 # save a0 to ESF 76 - rsr a0, EXCCAUSE # retrieve exception cause 76 + rsr a0, exccause # retrieve exception cause 77 77 s32i a0, a2, PT_DEPC # mark it as a regular exception 78 78 addx4 a0, a0, a3 # find entry in table 79 79 l32i a0, a0, EXC_TABLE_FAST_USER # load handler ··· 93 93 94 94 ENTRY(_KernelExceptionVector) 95 95 96 - xsr a3, EXCSAVE_1 # save a3, and get dispatch table 97 - wsr a2, DEPC # save a2 96 + xsr a3, excsave1 # save a3, and get dispatch table 97 + wsr a2, depc # save a2 98 98 addi a2, a1, -16-PT_SIZE # adjust stack pointer 99 99 s32i a0, a2, PT_AREG0 # save a0 to ESF 100 - rsr a0, EXCCAUSE # retrieve exception cause 100 + rsr a0, exccause # retrieve exception cause 101 101 s32i a0, a2, PT_DEPC # mark it as a regular exception 102 102 addx4 a0, a0, a3 # find entry in table 103 103 l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address ··· 205 205 206 206 /* Deliberately destroy excsave (don't assume it's value was valid). */ 207 207 208 - wsr a3, EXCSAVE_1 # save a3 208 + wsr a3, excsave1 # save a3 209 209 210 210 /* Check for kernel double exception (usually fatal). */ 211 211 212 - rsr a3, PS 212 + rsr a3, ps 213 213 _bbci.l a3, PS_UM_BIT, .Lksp 214 214 215 215 /* Check if we are currently handling a window exception. */ 216 216 /* Note: We don't need to indicate that we enter a critical section. */ 217 217 218 - xsr a0, DEPC # get DEPC, save a0 218 + xsr a0, depc # get DEPC, save a0 219 219 220 220 movi a3, XCHAL_WINDOW_VECTORS_VADDR 221 221 _bltu a0, a3, .Lfixup ··· 243 243 * Note: We can trash the current window frame (a0...a3) and depc! 244 244 */ 245 245 246 - wsr a2, DEPC # save stack pointer temporarily 247 - rsr a0, PS 246 + wsr a2, depc # save stack pointer temporarily 247 + rsr a0, ps 248 248 extui a0, a0, PS_OWB_SHIFT, 4 249 - wsr a0, WINDOWBASE 249 + wsr a0, windowbase 250 250 rsync 251 251 252 252 /* We are now in the previous window frame. Save registers again. */ 253 253 254 - xsr a2, DEPC # save a2 and get stack pointer 254 + xsr a2, depc # save a2 and get stack pointer 255 255 s32i a0, a2, PT_AREG0 256 256 257 - wsr a3, EXCSAVE_1 # save a3 257 + wsr a3, excsave1 # save a3 258 258 movi a3, exc_table 259 259 260 - rsr a0, EXCCAUSE 260 + rsr a0, exccause 261 261 s32i a0, a2, PT_DEPC # mark it as a regular exception 262 262 addx4 a0, a0, a3 263 263 l32i a0, a0, EXC_TABLE_FAST_USER ··· 290 290 291 291 /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ 292 292 293 - xsr a3, DEPC 293 + xsr a3, depc 294 294 s32i a0, a2, PT_DEPC 295 295 s32i a3, a2, PT_AREG0 296 296 297 297 /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ 298 298 299 299 movi a3, exc_table 300 - rsr a0, EXCCAUSE 300 + rsr a0, exccause 301 301 addx4 a0, a0, a3 302 302 l32i a0, a0, EXC_TABLE_FAST_USER 303 303 jx a0 ··· 312 312 313 313 .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ 314 314 315 - rsr a3, EXCCAUSE 315 + rsr a3, exccause 316 316 beqi a3, EXCCAUSE_ITLB_MISS, 1f 317 317 addi a3, a3, -EXCCAUSE_DTLB_MISS 318 318 bnez a3, .Lunrecoverable ··· 328 328 329 329 .Lunrecoverable_fixup: 330 330 l32i a2, a3, EXC_TABLE_DOUBLE_SAVE 331 - xsr a0, DEPC 331 + xsr a0, depc 332 332 333 333 .Lunrecoverable: 334 - rsr a3, EXCSAVE_1 335 - wsr a0, EXCSAVE_1 334 + rsr a3, excsave1 335 + wsr a0, excsave1 336 336 movi a0, unrecoverable_exception 337 337 callx0 a0 338 338 ··· 349 349 .section .DebugInterruptVector.text, "ax" 350 350 351 351 ENTRY(_DebugInterruptVector) 352 - xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL 352 + xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL 353 353 jx a0 354 354 355 355
+284 -25
arch/xtensa/lib/memcopy.S
··· 6 6 * License. See the file "COPYING" in the main directory of this archive 7 7 * for more details. 8 8 * 9 - * Copyright (C) 2002 - 2005 Tensilica Inc. 9 + * Copyright (C) 2002 - 2012 Tensilica Inc. 10 10 */ 11 11 12 12 #include <variant/core.h> ··· 27 27 #endif 28 28 .endm 29 29 30 - 31 30 /* 32 31 * void *memcpy(void *dst, const void *src, size_t len); 33 - * void *memmove(void *dst, const void *src, size_t len); 34 - * void *bcopy(const void *src, void *dst, size_t len); 35 32 * 36 33 * This function is intended to do the same thing as the standard 37 - * library function memcpy() (or bcopy()) for most cases. 34 + * library function memcpy() for most cases. 38 35 * However, where the source and/or destination references 39 36 * an instruction RAM or ROM or a data RAM or ROM, that 40 37 * source and/or destination will always be accessed with ··· 41 44 * !!!!!!! XTFIXME: 42 45 * !!!!!!! Handling of IRAM/IROM has not yet 43 46 * !!!!!!! been implemented. 44 - * 45 - * The bcopy version is provided here to avoid the overhead 46 - * of an extra call, for callers that require this convention. 47 47 * 48 48 * The (general case) algorithm is as follows: 49 49 * If destination is unaligned, align it by conditionally ··· 70 76 */ 71 77 72 78 .text 73 - .align 4 74 - .global bcopy 75 - .type bcopy,@function 76 - bcopy: 77 - entry sp, 16 # minimal stack frame 78 - # a2=src, a3=dst, a4=len 79 - mov a5, a3 # copy dst so that a2 is return value 80 - mov a3, a2 81 - mov a2, a5 82 - j .Lcommon # go to common code for memcpy+bcopy 83 - 84 79 85 80 /* 86 81 * Byte by byte copy ··· 90 107 s8i a6, a5, 0 91 108 addi a5, a5, 1 92 109 #if !XCHAL_HAVE_LOOPS 93 - blt a3, a7, .Lnextbyte 110 + bne a3, a7, .Lnextbyte # continue loop if $a3:src != $a7:src_end 94 111 #endif /* !XCHAL_HAVE_LOOPS */ 95 112 .Lbytecopydone: 96 113 retw ··· 127 144 .global memcpy 128 145 .type memcpy,@function 129 146 memcpy: 130 - .global memmove 131 - .type memmove,@function 132 - memmove: 133 147 134 148 entry sp, 16 # minimal stack frame 135 149 # a2/ dst, a3/ src, a4/ len ··· 162 182 s32i a7, a5, 12 163 183 addi a5, a5, 16 164 184 #if !XCHAL_HAVE_LOOPS 165 - blt a3, a8, .Loop1 185 + bne a3, a8, .Loop1 # continue loop if a3:src != a8:src_end 166 186 #endif /* !XCHAL_HAVE_LOOPS */ 167 187 .Loop1done: 168 188 bbci.l a4, 3, .L2 ··· 240 260 s32i a9, a5, 12 241 261 addi a5, a5, 16 242 262 #if !XCHAL_HAVE_LOOPS 243 - blt a3, a10, .Loop2 263 + bne a3, a10, .Loop2 # continue loop if a3:src != a10:src_end 244 264 #endif /* !XCHAL_HAVE_LOOPS */ 245 265 .Loop2done: 246 266 bbci.l a4, 3, .L12 ··· 285 305 l8ui a6, a3, 0 286 306 s8i a6, a5, 0 287 307 retw 308 + 309 + 310 + /* 311 + * void bcopy(const void *src, void *dest, size_t n); 312 + */ 313 + .align 4 314 + .global bcopy 315 + .type bcopy,@function 316 + bcopy: 317 + entry sp, 16 # minimal stack frame 318 + # a2=src, a3=dst, a4=len 319 + mov a5, a3 320 + mov a3, a2 321 + mov a2, a5 322 + j .Lmovecommon # go to common code for memmove+bcopy 323 + 324 + /* 325 + * void *memmove(void *dst, const void *src, size_t len); 326 + * 327 + * This function is intended to do the same thing as the standard 328 + * library function memmove() for most cases. 329 + * However, where the source and/or destination references 330 + * an instruction RAM or ROM or a data RAM or ROM, that 331 + * source and/or destination will always be accessed with 332 + * 32-bit load and store instructions (as required for these 333 + * types of devices). 334 + * 335 + * !!!!!!! XTFIXME: 336 + * !!!!!!! Handling of IRAM/IROM has not yet 337 + * !!!!!!! been implemented. 338 + * 339 + * The (general case) algorithm is as follows: 340 + * If end of source doesn't overlap destination then use memcpy. 341 + * Otherwise do memcpy backwards. 342 + * 343 + * Register use: 344 + * a0/ return address 345 + * a1/ stack pointer 346 + * a2/ return value 347 + * a3/ src 348 + * a4/ length 349 + * a5/ dst 350 + * a6/ tmp 351 + * a7/ tmp 352 + * a8/ tmp 353 + * a9/ tmp 354 + * a10/ tmp 355 + * a11/ tmp 356 + */ 357 + 358 + /* 359 + * Byte by byte copy 360 + */ 361 + .align 4 362 + .byte 0 # 1 mod 4 alignment for LOOPNEZ 363 + # (0 mod 4 alignment for LBEG) 364 + .Lbackbytecopy: 365 + #if XCHAL_HAVE_LOOPS 366 + loopnez a4, .Lbackbytecopydone 367 + #else /* !XCHAL_HAVE_LOOPS */ 368 + beqz a4, .Lbackbytecopydone 369 + sub a7, a3, a4 # a7 = start address for source 370 + #endif /* !XCHAL_HAVE_LOOPS */ 371 + .Lbacknextbyte: 372 + addi a3, a3, -1 373 + l8ui a6, a3, 0 374 + addi a5, a5, -1 375 + s8i a6, a5, 0 376 + #if !XCHAL_HAVE_LOOPS 377 + bne a3, a7, .Lbacknextbyte # continue loop if 378 + # $a3:src != $a7:src_start 379 + #endif /* !XCHAL_HAVE_LOOPS */ 380 + .Lbackbytecopydone: 381 + retw 382 + 383 + /* 384 + * Destination is unaligned 385 + */ 386 + 387 + .align 4 388 + .Lbackdst1mod2: # dst is only byte aligned 389 + _bltui a4, 7, .Lbackbytecopy # do short copies byte by byte 390 + 391 + # copy 1 byte 392 + addi a3, a3, -1 393 + l8ui a6, a3, 0 394 + addi a5, a5, -1 395 + s8i a6, a5, 0 396 + addi a4, a4, -1 397 + _bbci.l a5, 1, .Lbackdstaligned # if dst is now aligned, then 398 + # return to main algorithm 399 + .Lbackdst2mod4: # dst 16-bit aligned 400 + # copy 2 bytes 401 + _bltui a4, 6, .Lbackbytecopy # do short copies byte by byte 402 + addi a3, a3, -2 403 + l8ui a6, a3, 0 404 + l8ui a7, a3, 1 405 + addi a5, a5, -2 406 + s8i a6, a5, 0 407 + s8i a7, a5, 1 408 + addi a4, a4, -2 409 + j .Lbackdstaligned # dst is now aligned, 410 + # return to main algorithm 411 + 412 + .align 4 413 + .global memmove 414 + .type memmove,@function 415 + memmove: 416 + 417 + entry sp, 16 # minimal stack frame 418 + # a2/ dst, a3/ src, a4/ len 419 + mov a5, a2 # copy dst so that a2 is return value 420 + .Lmovecommon: 421 + sub a6, a5, a3 422 + bgeu a6, a4, .Lcommon 423 + 424 + add a5, a5, a4 425 + add a3, a3, a4 426 + 427 + _bbsi.l a5, 0, .Lbackdst1mod2 # if dst is 1 mod 2 428 + _bbsi.l a5, 1, .Lbackdst2mod4 # if dst is 2 mod 4 429 + .Lbackdstaligned: # return here from .Lbackdst?mod? once dst is aligned 430 + srli a7, a4, 4 # number of loop iterations with 16B 431 + # per iteration 432 + movi a8, 3 # if source is not aligned, 433 + _bany a3, a8, .Lbacksrcunaligned # then use shifting copy 434 + /* 435 + * Destination and source are word-aligned, use word copy. 436 + */ 437 + # copy 16 bytes per iteration for word-aligned dst and word-aligned src 438 + #if XCHAL_HAVE_LOOPS 439 + loopnez a7, .backLoop1done 440 + #else /* !XCHAL_HAVE_LOOPS */ 441 + beqz a7, .backLoop1done 442 + slli a8, a7, 4 443 + sub a8, a3, a8 # a8 = start of first 16B source chunk 444 + #endif /* !XCHAL_HAVE_LOOPS */ 445 + .backLoop1: 446 + addi a3, a3, -16 447 + l32i a7, a3, 12 448 + l32i a6, a3, 8 449 + addi a5, a5, -16 450 + s32i a7, a5, 12 451 + l32i a7, a3, 4 452 + s32i a6, a5, 8 453 + l32i a6, a3, 0 454 + s32i a7, a5, 4 455 + s32i a6, a5, 0 456 + #if !XCHAL_HAVE_LOOPS 457 + bne a3, a8, .backLoop1 # continue loop if a3:src != a8:src_start 458 + #endif /* !XCHAL_HAVE_LOOPS */ 459 + .backLoop1done: 460 + bbci.l a4, 3, .Lback2 461 + # copy 8 bytes 462 + addi a3, a3, -8 463 + l32i a6, a3, 0 464 + l32i a7, a3, 4 465 + addi a5, a5, -8 466 + s32i a6, a5, 0 467 + s32i a7, a5, 4 468 + .Lback2: 469 + bbsi.l a4, 2, .Lback3 470 + bbsi.l a4, 1, .Lback4 471 + bbsi.l a4, 0, .Lback5 472 + retw 473 + .Lback3: 474 + # copy 4 bytes 475 + addi a3, a3, -4 476 + l32i a6, a3, 0 477 + addi a5, a5, -4 478 + s32i a6, a5, 0 479 + bbsi.l a4, 1, .Lback4 480 + bbsi.l a4, 0, .Lback5 481 + retw 482 + .Lback4: 483 + # copy 2 bytes 484 + addi a3, a3, -2 485 + l16ui a6, a3, 0 486 + addi a5, a5, -2 487 + s16i a6, a5, 0 488 + bbsi.l a4, 0, .Lback5 489 + retw 490 + .Lback5: 491 + # copy 1 byte 492 + addi a3, a3, -1 493 + l8ui a6, a3, 0 494 + addi a5, a5, -1 495 + s8i a6, a5, 0 496 + retw 497 + 498 + /* 499 + * Destination is aligned, Source is unaligned 500 + */ 501 + 502 + .align 4 503 + .Lbacksrcunaligned: 504 + _beqz a4, .Lbackdone # avoid loading anything for zero-length copies 505 + # copy 16 bytes per iteration for word-aligned dst and unaligned src 506 + ssa8 a3 # set shift amount from byte offset 507 + #define SIM_CHECKS_ALIGNMENT 1 /* set to 1 when running on ISS with 508 + * the lint or ferret client, or 0 509 + * to save a few cycles */ 510 + #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT 511 + and a11, a3, a8 # save unalignment offset for below 512 + sub a3, a3, a11 # align a3 513 + #endif 514 + l32i a6, a3, 0 # load first word 515 + #if XCHAL_HAVE_LOOPS 516 + loopnez a7, .backLoop2done 517 + #else /* !XCHAL_HAVE_LOOPS */ 518 + beqz a7, .backLoop2done 519 + slli a10, a7, 4 520 + sub a10, a3, a10 # a10 = start of first 16B source chunk 521 + #endif /* !XCHAL_HAVE_LOOPS */ 522 + .backLoop2: 523 + addi a3, a3, -16 524 + l32i a7, a3, 12 525 + l32i a8, a3, 8 526 + addi a5, a5, -16 527 + src_b a6, a7, a6 528 + s32i a6, a5, 12 529 + l32i a9, a3, 4 530 + src_b a7, a8, a7 531 + s32i a7, a5, 8 532 + l32i a6, a3, 0 533 + src_b a8, a9, a8 534 + s32i a8, a5, 4 535 + src_b a9, a6, a9 536 + s32i a9, a5, 0 537 + #if !XCHAL_HAVE_LOOPS 538 + bne a3, a10, .backLoop2 # continue loop if a3:src != a10:src_start 539 + #endif /* !XCHAL_HAVE_LOOPS */ 540 + .backLoop2done: 541 + bbci.l a4, 3, .Lback12 542 + # copy 8 bytes 543 + addi a3, a3, -8 544 + l32i a7, a3, 4 545 + l32i a8, a3, 0 546 + addi a5, a5, -8 547 + src_b a6, a7, a6 548 + s32i a6, a5, 4 549 + src_b a7, a8, a7 550 + s32i a7, a5, 0 551 + mov a6, a8 552 + .Lback12: 553 + bbci.l a4, 2, .Lback13 554 + # copy 4 bytes 555 + addi a3, a3, -4 556 + l32i a7, a3, 0 557 + addi a5, a5, -4 558 + src_b a6, a7, a6 559 + s32i a6, a5, 0 560 + mov a6, a7 561 + .Lback13: 562 + #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT 563 + add a3, a3, a11 # readjust a3 with correct misalignment 564 + #endif 565 + bbsi.l a4, 1, .Lback14 566 + bbsi.l a4, 0, .Lback15 567 + .Lbackdone: 568 + retw 569 + .Lback14: 570 + # copy 2 bytes 571 + addi a3, a3, -2 572 + l8ui a6, a3, 0 573 + l8ui a7, a3, 1 574 + addi a5, a5, -2 575 + s8i a6, a5, 0 576 + s8i a7, a5, 1 577 + bbsi.l a4, 0, .Lback15 578 + retw 579 + .Lback15: 580 + # copy 1 byte 581 + addi a3, a3, -1 582 + addi a5, a5, -1 583 + l8ui a6, a3, 0 584 + s8i a6, a5, 0 585 + retw 586 + 288 587 289 588 /* 290 589 * Local Variables:
+2 -1
arch/xtensa/mm/fault.c
··· 6 6 * License. See the file "COPYING" in the main directory of this archive 7 7 * for more details. 8 8 * 9 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 + * Copyright (C) 2001 - 2010 Tensilica Inc. 10 10 * 11 11 * Chris Zankel <chris@zankel.net> 12 12 * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> ··· 186 186 /* Kernel mode? Handle exceptions or die */ 187 187 if (!user_mode(regs)) 188 188 bad_page_fault(regs, address, SIGBUS); 189 + return; 189 190 190 191 vmalloc_fault: 191 192 {
+2 -7
arch/xtensa/platforms/iss/console.c
··· 91 91 { 92 92 /* see drivers/char/serialX.c to reference original version */ 93 93 94 - __simc (SYS_write, 1, (unsigned long)buf, count, 0, 0); 94 + simc_write(1, buf, count); 95 95 return count; 96 96 } 97 97 ··· 122 122 123 123 static int rs_put_char(struct tty_struct *tty, unsigned char ch) 124 124 { 125 - char buf[2]; 126 - 127 - buf[0] = ch; 128 - buf[1] = '\0'; /* Is this NULL necessary? */ 129 - __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0); 130 - return 1; 125 + return rs_write(tty, &ch, 1); 131 126 } 132 127 133 128 static void rs_flush_chars(struct tty_struct *tty)
+7 -2
arch/xtensa/platforms/iss/include/platform/simcall.h
··· 78 78 return ret; 79 79 } 80 80 81 - static inline int simc_open(char *file, int flags, int mode) 81 + static inline int simc_open(const char *file, int flags, int mode) 82 82 { 83 + wmb(); 83 84 return __simc(SYS_open, (int) file, flags, mode, 0, 0); 84 85 } 85 86 ··· 91 90 92 91 static inline int simc_ioctl(int fd, int request, void *arg) 93 92 { 93 + wmb(); 94 94 return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); 95 95 } 96 96 97 97 static inline int simc_read(int fd, void *buf, size_t count) 98 98 { 99 + rmb(); 99 100 return __simc(SYS_read, fd, (int) buf, count, 0, 0); 100 101 } 101 102 102 - static inline int simc_write(int fd, void *buf, size_t count) 103 + static inline int simc_write(int fd, const void *buf, size_t count) 103 104 { 105 + wmb(); 104 106 return __simc(SYS_write, fd, (int) buf, count, 0, 0); 105 107 } 106 108 ··· 111 107 { 112 108 struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; 113 109 110 + wmb(); 114 111 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv, 115 112 0, 0); 116 113 }
+5 -5
arch/xtensa/platforms/iss/setup.c
··· 61 61 * jump to the reset vector. */ 62 62 63 63 __asm__ __volatile__("movi a2, 15\n\t" 64 - "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" 64 + "wsr a2, icountlevel\n\t" 65 65 "movi a2, 0\n\t" 66 - "wsr a2, " __stringify(ICOUNT) "\n\t" 67 - "wsr a2, " __stringify(IBREAKENABLE) "\n\t" 68 - "wsr a2, " __stringify(LCOUNT) "\n\t" 66 + "wsr a2, icount\n\t" 67 + "wsr a2, ibreakenable\n\t" 68 + "wsr a2, lcount\n\t" 69 69 "movi a2, 0x1f\n\t" 70 - "wsr a2, " __stringify(PS) "\n\t" 70 + "wsr a2, ps\n\t" 71 71 "isync\n\t" 72 72 "jx %0\n\t" 73 73 :
+5 -5
arch/xtensa/platforms/xt2000/setup.c
··· 66 66 * jump to the reset vector. */ 67 67 68 68 __asm__ __volatile__ ("movi a2, 15\n\t" 69 - "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" 69 + "wsr a2, icountlevel\n\t" 70 70 "movi a2, 0\n\t" 71 - "wsr a2, " __stringify(ICOUNT) "\n\t" 72 - "wsr a2, " __stringify(IBREAKENABLE) "\n\t" 73 - "wsr a2, " __stringify(LCOUNT) "\n\t" 71 + "wsr a2, icount\n\t" 72 + "wsr a2, ibreakenable\n\t" 73 + "wsr a2, lcount\n\t" 74 74 "movi a2, 0x1f\n\t" 75 - "wsr a2, " __stringify(PS) "\n\t" 75 + "wsr a2, ps\n\t" 76 76 "isync\n\t" 77 77 "jx %0\n\t" 78 78 :