diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /arch/arm/include | |
parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'arch/arm/include')
82 files changed, 1904 insertions, 1789 deletions
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 960abceb8e14..f70ae175a3d6 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -1,20 +1,35 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += hwcap.h | ||
4 | 2 | ||
5 | generic-y += auxvec.h | 3 | generic-y += auxvec.h |
6 | generic-y += bitsperlong.h | 4 | generic-y += bitsperlong.h |
7 | generic-y += cputime.h | 5 | generic-y += cputime.h |
6 | generic-y += current.h | ||
8 | generic-y += emergency-restart.h | 7 | generic-y += emergency-restart.h |
9 | generic-y += errno.h | 8 | generic-y += errno.h |
9 | generic-y += exec.h | ||
10 | generic-y += ioctl.h | 10 | generic-y += ioctl.h |
11 | generic-y += ipcbuf.h | ||
11 | generic-y += irq_regs.h | 12 | generic-y += irq_regs.h |
12 | generic-y += kdebug.h | 13 | generic-y += kdebug.h |
13 | generic-y += local.h | 14 | generic-y += local.h |
14 | generic-y += local64.h | 15 | generic-y += local64.h |
16 | generic-y += msgbuf.h | ||
17 | generic-y += param.h | ||
18 | generic-y += parport.h | ||
15 | generic-y += percpu.h | 19 | generic-y += percpu.h |
16 | generic-y += poll.h | 20 | generic-y += poll.h |
17 | generic-y += resource.h | 21 | generic-y += resource.h |
18 | generic-y += sections.h | 22 | generic-y += sections.h |
23 | generic-y += segment.h | ||
24 | generic-y += sembuf.h | ||
25 | generic-y += serial.h | ||
26 | generic-y += shmbuf.h | ||
19 | generic-y += siginfo.h | 27 | generic-y += siginfo.h |
20 | generic-y += sizes.h | 28 | generic-y += sizes.h |
29 | generic-y += socket.h | ||
30 | generic-y += sockios.h | ||
31 | generic-y += termbits.h | ||
32 | generic-y += termios.h | ||
33 | generic-y += timex.h | ||
34 | generic-y += types.h | ||
35 | generic-y += unaligned.h | ||
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 62e75475e57e..d40229d9a1c9 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h | |||
@@ -2,11 +2,12 @@ | |||
2 | #define __ASMARM_ARCH_TIMER_H | 2 | #define __ASMARM_ARCH_TIMER_H |
3 | 3 | ||
4 | #include <asm/errno.h> | 4 | #include <asm/errno.h> |
5 | #include <linux/clocksource.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_ARM_ARCH_TIMER | 7 | #ifdef CONFIG_ARM_ARCH_TIMER |
7 | #define ARCH_HAS_READ_CURRENT_TIMER | ||
8 | int arch_timer_of_register(void); | 8 | int arch_timer_of_register(void); |
9 | int arch_timer_sched_clock_init(void); | 9 | int arch_timer_sched_clock_init(void); |
10 | struct timecounter *arch_timer_get_timecounter(void); | ||
10 | #else | 11 | #else |
11 | static inline int arch_timer_of_register(void) | 12 | static inline int arch_timer_of_register(void) |
12 | { | 13 | { |
@@ -17,6 +18,11 @@ static inline int arch_timer_sched_clock_init(void) | |||
17 | { | 18 | { |
18 | return -ENXIO; | 19 | return -ENXIO; |
19 | } | 20 | } |
21 | |||
22 | static inline struct timecounter *arch_timer_get_timecounter(void) | ||
23 | { | ||
24 | return NULL; | ||
25 | } | ||
20 | #endif | 26 | #endif |
21 | 27 | ||
22 | #endif | 28 | #endif |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 03fb93621d0d..2ef95813fce0 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/domain.h> | 24 | #include <asm/domain.h> |
25 | #include <asm/opcodes-virt.h> | ||
25 | 26 | ||
26 | #define IOMEM(x) (x) | 27 | #define IOMEM(x) (x) |
27 | 28 | ||
@@ -240,6 +241,34 @@ | |||
240 | #endif | 241 | #endif |
241 | 242 | ||
242 | /* | 243 | /* |
244 | * Helper macro to enter SVC mode cleanly and mask interrupts. reg is | ||
245 | * a scratch register for the macro to overwrite. | ||
246 | * | ||
247 | * This macro is intended for forcing the CPU into SVC mode at boot time. | ||
248 | * you cannot return to the original mode. | ||
249 | * | ||
250 | * Beware, it also clobers LR. | ||
251 | */ | ||
252 | .macro safe_svcmode_maskall reg:req | ||
253 | mrs \reg , cpsr | ||
254 | mov lr , \reg | ||
255 | and lr , lr , #MODE_MASK | ||
256 | cmp lr , #HYP_MODE | ||
257 | orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | ||
258 | bic \reg , \reg , #MODE_MASK | ||
259 | orr \reg , \reg , #SVC_MODE | ||
260 | THUMB( orr \reg , \reg , #PSR_T_BIT ) | ||
261 | bne 1f | ||
262 | orr \reg, \reg, #PSR_A_BIT | ||
263 | adr lr, BSYM(2f) | ||
264 | msr spsr_cxsf, \reg | ||
265 | __MSR_ELR_HYP(14) | ||
266 | __ERET | ||
267 | 1: msr cpsr_c, \reg | ||
268 | 2: | ||
269 | .endm | ||
270 | |||
271 | /* | ||
243 | * STRT/LDRT access macros with ARM and Thumb-2 variants | 272 | * STRT/LDRT access macros with ARM and Thumb-2 variants |
244 | */ | 273 | */ |
245 | #ifdef CONFIG_THUMB2_KERNEL | 274 | #ifdef CONFIG_THUMB2_KERNEL |
@@ -320,4 +349,12 @@ | |||
320 | .size \name , . - \name | 349 | .size \name , . - \name |
321 | .endm | 350 | .endm |
322 | 351 | ||
352 | .macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req | ||
353 | #ifndef CONFIG_CPU_USE_DOMAINS | ||
354 | adds \tmp, \addr, #\size - 1 | ||
355 | sbcccs \tmp, \tmp, \limit | ||
356 | bcs \bad | ||
357 | #endif | ||
358 | .endm | ||
359 | |||
323 | #endif /* __ASM_ASSEMBLER_H__ */ | 360 | #endif /* __ASM_ASSEMBLER_H__ */ |
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h index 05112380dc53..8dcd9c702d90 100644 --- a/arch/arm/include/asm/barrier.h +++ b/arch/arm/include/asm/barrier.h | |||
@@ -44,10 +44,9 @@ | |||
44 | #define rmb() dsb() | 44 | #define rmb() dsb() |
45 | #define wmb() mb() | 45 | #define wmb() mb() |
46 | #else | 46 | #else |
47 | #include <asm/memory.h> | 47 | #define mb() barrier() |
48 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 48 | #define rmb() barrier() |
49 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 49 | #define wmb() barrier() |
50 | #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
51 | #endif | 50 | #endif |
52 | 51 | ||
53 | #ifndef CONFIG_SMP | 52 | #ifndef CONFIG_SMP |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index e4448e16046d..e1489c54cd12 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -49,6 +49,13 @@ | |||
49 | * | 49 | * |
50 | * Unconditionally clean and invalidate the entire cache. | 50 | * Unconditionally clean and invalidate the entire cache. |
51 | * | 51 | * |
52 | * flush_kern_louis() | ||
53 | * | ||
54 | * Flush data cache levels up to the level of unification | ||
55 | * inner shareable and invalidate the I-cache. | ||
56 | * Only needed from v7 onwards, falls back to flush_cache_all() | ||
57 | * for all other processor versions. | ||
58 | * | ||
52 | * flush_user_all() | 59 | * flush_user_all() |
53 | * | 60 | * |
54 | * Clean and invalidate all user space cache entries | 61 | * Clean and invalidate all user space cache entries |
@@ -97,6 +104,7 @@ | |||
97 | struct cpu_cache_fns { | 104 | struct cpu_cache_fns { |
98 | void (*flush_icache_all)(void); | 105 | void (*flush_icache_all)(void); |
99 | void (*flush_kern_all)(void); | 106 | void (*flush_kern_all)(void); |
107 | void (*flush_kern_louis)(void); | ||
100 | void (*flush_user_all)(void); | 108 | void (*flush_user_all)(void); |
101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); | 109 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); |
102 | 110 | ||
@@ -119,6 +127,7 @@ extern struct cpu_cache_fns cpu_cache; | |||
119 | 127 | ||
120 | #define __cpuc_flush_icache_all cpu_cache.flush_icache_all | 128 | #define __cpuc_flush_icache_all cpu_cache.flush_icache_all |
121 | #define __cpuc_flush_kern_all cpu_cache.flush_kern_all | 129 | #define __cpuc_flush_kern_all cpu_cache.flush_kern_all |
130 | #define __cpuc_flush_kern_louis cpu_cache.flush_kern_louis | ||
122 | #define __cpuc_flush_user_all cpu_cache.flush_user_all | 131 | #define __cpuc_flush_user_all cpu_cache.flush_user_all |
123 | #define __cpuc_flush_user_range cpu_cache.flush_user_range | 132 | #define __cpuc_flush_user_range cpu_cache.flush_user_range |
124 | #define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range | 133 | #define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range |
@@ -139,6 +148,7 @@ extern struct cpu_cache_fns cpu_cache; | |||
139 | 148 | ||
140 | extern void __cpuc_flush_icache_all(void); | 149 | extern void __cpuc_flush_icache_all(void); |
141 | extern void __cpuc_flush_kern_all(void); | 150 | extern void __cpuc_flush_kern_all(void); |
151 | extern void __cpuc_flush_kern_louis(void); | ||
142 | extern void __cpuc_flush_user_all(void); | 152 | extern void __cpuc_flush_user_all(void); |
143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); | 153 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); |
144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); | 154 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); |
@@ -204,6 +214,11 @@ static inline void __flush_icache_all(void) | |||
204 | __flush_icache_preferred(); | 214 | __flush_icache_preferred(); |
205 | } | 215 | } |
206 | 216 | ||
217 | /* | ||
218 | * Flush caches up to Level of Unification Inner Shareable | ||
219 | */ | ||
220 | #define flush_cache_louis() __cpuc_flush_kern_louis() | ||
221 | |||
207 | #define flush_cache_all() __cpuc_flush_kern_all() | 222 | #define flush_cache_all() __cpuc_flush_kern_all() |
208 | 223 | ||
209 | static inline void vivt_flush_cache_mm(struct mm_struct *mm) | 224 | static inline void vivt_flush_cache_mm(struct mm_struct *mm) |
diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h deleted file mode 100644 index 75d21e2a3ff7..000000000000 --- a/arch/arm/include/asm/current.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASMARM_CURRENT_H | ||
2 | #define _ASMARM_CURRENT_H | ||
3 | |||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | static inline struct task_struct *get_current(void) __attribute_const__; | ||
7 | |||
8 | static inline struct task_struct *get_current(void) | ||
9 | { | ||
10 | return current_thread_info()->task; | ||
11 | } | ||
12 | |||
13 | #define current (get_current()) | ||
14 | |||
15 | #endif /* _ASMARM_CURRENT_H */ | ||
diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h index dc6145120de3..ab98fdd083bd 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h | |||
@@ -15,6 +15,11 @@ | |||
15 | 15 | ||
16 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
17 | 17 | ||
18 | struct delay_timer { | ||
19 | unsigned long (*read_current_timer)(void); | ||
20 | unsigned long freq; | ||
21 | }; | ||
22 | |||
18 | extern struct arm_delay_ops { | 23 | extern struct arm_delay_ops { |
19 | void (*delay)(unsigned long); | 24 | void (*delay)(unsigned long); |
20 | void (*const_udelay)(unsigned long); | 25 | void (*const_udelay)(unsigned long); |
@@ -56,6 +61,10 @@ extern void __loop_delay(unsigned long loops); | |||
56 | extern void __loop_udelay(unsigned long usecs); | 61 | extern void __loop_udelay(unsigned long usecs); |
57 | extern void __loop_const_udelay(unsigned long); | 62 | extern void __loop_const_udelay(unsigned long); |
58 | 63 | ||
64 | /* Delay-loop timer registration. */ | ||
65 | #define ARCH_HAS_READ_CURRENT_TIMER | ||
66 | extern void register_current_timer_delay(const struct delay_timer *timer); | ||
67 | |||
59 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
60 | 69 | ||
61 | #endif /* defined(_ARM_DELAY_H) */ | 70 | #endif /* defined(_ARM_DELAY_H) */ |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 5c44dcb0987b..23004847bb05 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #define DMA_ERROR_CODE (~0) | 14 | #define DMA_ERROR_CODE (~0) |
15 | extern struct dma_map_ops arm_dma_ops; | 15 | extern struct dma_map_ops arm_dma_ops; |
16 | extern struct dma_map_ops arm_coherent_dma_ops; | ||
16 | 17 | ||
17 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 18 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
18 | { | 19 | { |
diff --git a/arch/arm/include/asm/exec.h b/arch/arm/include/asm/exec.h deleted file mode 100644 index 7c4fbef72b3a..000000000000 --- a/arch/arm/include/asm/exec.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_EXEC_H | ||
2 | #define __ASM_ARM_EXEC_H | ||
3 | |||
4 | #define arch_align_stack(x) (x) | ||
5 | |||
6 | #endif /* __ASM_ARM_EXEC_H */ | ||
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h index 7e30874377e6..cca9f15704ed 100644 --- a/arch/arm/include/asm/glue-cache.h +++ b/arch/arm/include/asm/glue-cache.h | |||
@@ -110,19 +110,19 @@ | |||
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 112 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) |
113 | //# ifdef _CACHE | 113 | # ifdef _CACHE |
114 | # define MULTI_CACHE 1 | 114 | # define MULTI_CACHE 1 |
115 | //# else | 115 | # else |
116 | //# define _CACHE v6 | 116 | # define _CACHE v6 |
117 | //# endif | 117 | # endif |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | #if defined(CONFIG_CPU_V7) | 120 | #if defined(CONFIG_CPU_V7) |
121 | //# ifdef _CACHE | 121 | # ifdef _CACHE |
122 | # define MULTI_CACHE 1 | 122 | # define MULTI_CACHE 1 |
123 | //# else | 123 | # else |
124 | //# define _CACHE v7 | 124 | # define _CACHE v7 |
125 | //# endif | 125 | # endif |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) | 128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) |
@@ -132,6 +132,7 @@ | |||
132 | #ifndef MULTI_CACHE | 132 | #ifndef MULTI_CACHE |
133 | #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) | 133 | #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) |
134 | #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) | 134 | #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) |
135 | #define __cpuc_flush_kern_louis __glue(_CACHE,_flush_kern_cache_louis) | ||
135 | #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) | 136 | #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) |
136 | #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) | 137 | #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) |
137 | #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) | 138 | #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) |
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index c402e9b31f4c..477e0206e016 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -6,7 +6,9 @@ | |||
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
9 | #ifdef CONFIG_NEED_MACH_GPIO_H | ||
9 | #include <mach/gpio.h> | 10 | #include <mach/gpio.h> |
11 | #endif | ||
10 | 12 | ||
11 | #ifndef __ARM_GPIOLIB_COMPLEX | 13 | #ifndef __ARM_GPIOLIB_COMPLEX |
12 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ | 14 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ |
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 436e60b2cf7a..2740c2a2df63 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <asm/irq.h> | 6 | #include <asm/irq.h> |
7 | 7 | ||
8 | #define NR_IPI 5 | 8 | #define NR_IPI 6 |
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
11 | unsigned int __softirq_pending; | 11 | unsigned int __softirq_pending; |
diff --git a/arch/arm/include/asm/hardware/cache-tauros2.h b/arch/arm/include/asm/hardware/cache-tauros2.h index 538f17ca905b..295e2e40151b 100644 --- a/arch/arm/include/asm/hardware/cache-tauros2.h +++ b/arch/arm/include/asm/hardware/cache-tauros2.h | |||
@@ -8,4 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | extern void __init tauros2_init(void); | 11 | #define CACHE_TAUROS2_PREFETCH_ON (1 << 0) |
12 | #define CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1) | ||
13 | |||
14 | extern void __init tauros2_init(unsigned int features); | ||
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 2ff2c75a4639..02fe2fbe2477 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -217,18 +217,8 @@ extern int iop3xx_get_init_atu(void); | |||
217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 | 217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 |
218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 | 218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 |
219 | 219 | ||
220 | #define IOP3XX_PCI_IO_WINDOW_SIZE 0x00010000 | ||
221 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 220 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
222 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 221 | #define IOP3XX_PCI_LOWER_IO_BA 0x00000000 |
223 | #define IOP3XX_PCI_LOWER_IO_BA 0x90000000 | ||
224 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | ||
225 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
226 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | ||
227 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
228 | #define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) (addr) -\ | ||
229 | IOP3XX_PCI_LOWER_IO_PA) +\ | ||
230 | IOP3XX_PCI_LOWER_IO_VA) | ||
231 | |||
232 | 222 | ||
233 | #ifndef __ASSEMBLY__ | 223 | #ifndef __ASSEMBLY__ |
234 | 224 | ||
diff --git a/arch/arm/include/asm/hardware/linkup-l1110.h b/arch/arm/include/asm/hardware/linkup-l1110.h deleted file mode 100644 index 7ec91168a576..000000000000 --- a/arch/arm/include/asm/hardware/linkup-l1110.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Definitions for H3600 Handheld Computer | ||
4 | * | ||
5 | * Copyright 2001 Compaq Computer Corporation. | ||
6 | * | ||
7 | * Use consistent with the GNU GPL is permitted, | ||
8 | * provided that this copyright notice is | ||
9 | * preserved in its entirety in all copies and derived works. | ||
10 | * | ||
11 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
12 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
13 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
14 | * | ||
15 | * Author: Jamey Hicks. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | /* LinkUp Systems PCCard/CompactFlash Interface for SA-1100 */ | ||
20 | |||
21 | /* PC Card Status Register */ | ||
22 | #define LINKUP_PRS_S1 (1 << 0) /* voltage control bits S1-S4 */ | ||
23 | #define LINKUP_PRS_S2 (1 << 1) | ||
24 | #define LINKUP_PRS_S3 (1 << 2) | ||
25 | #define LINKUP_PRS_S4 (1 << 3) | ||
26 | #define LINKUP_PRS_BVD1 (1 << 4) | ||
27 | #define LINKUP_PRS_BVD2 (1 << 5) | ||
28 | #define LINKUP_PRS_VS1 (1 << 6) | ||
29 | #define LINKUP_PRS_VS2 (1 << 7) | ||
30 | #define LINKUP_PRS_RDY (1 << 8) | ||
31 | #define LINKUP_PRS_CD1 (1 << 9) | ||
32 | #define LINKUP_PRS_CD2 (1 << 10) | ||
33 | |||
34 | /* PC Card Command Register */ | ||
35 | #define LINKUP_PRC_S1 (1 << 0) | ||
36 | #define LINKUP_PRC_S2 (1 << 1) | ||
37 | #define LINKUP_PRC_S3 (1 << 2) | ||
38 | #define LINKUP_PRC_S4 (1 << 3) | ||
39 | #define LINKUP_PRC_RESET (1 << 4) | ||
40 | #define LINKUP_PRC_APOE (1 << 5) /* Auto Power Off Enable: clears S1-S4 when either nCD goes high */ | ||
41 | #define LINKUP_PRC_CFE (1 << 6) /* CompactFlash mode Enable: addresses A[10:0] only, A[25:11] high */ | ||
42 | #define LINKUP_PRC_SOE (1 << 7) /* signal output driver enable */ | ||
43 | #define LINKUP_PRC_SSP (1 << 8) /* sock select polarity: 0 for socket 0, 1 for socket 1 */ | ||
44 | #define LINKUP_PRC_MBZ (1 << 15) /* must be zero */ | ||
45 | |||
46 | struct linkup_l1110 { | ||
47 | volatile short prc; | ||
48 | }; | ||
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index 917626128a1d..6ff56eca3f1f 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -1,31 +1,8 @@ | |||
1 | #ifndef __ASMARM_HWCAP_H | 1 | #ifndef __ASMARM_HWCAP_H |
2 | #define __ASMARM_HWCAP_H | 2 | #define __ASMARM_HWCAP_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/hwcap.h> |
5 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
6 | */ | ||
7 | #define HWCAP_SWP (1 << 0) | ||
8 | #define HWCAP_HALF (1 << 1) | ||
9 | #define HWCAP_THUMB (1 << 2) | ||
10 | #define HWCAP_26BIT (1 << 3) /* Play it safe */ | ||
11 | #define HWCAP_FAST_MULT (1 << 4) | ||
12 | #define HWCAP_FPA (1 << 5) | ||
13 | #define HWCAP_VFP (1 << 6) | ||
14 | #define HWCAP_EDSP (1 << 7) | ||
15 | #define HWCAP_JAVA (1 << 8) | ||
16 | #define HWCAP_IWMMXT (1 << 9) | ||
17 | #define HWCAP_CRUNCH (1 << 10) | ||
18 | #define HWCAP_THUMBEE (1 << 11) | ||
19 | #define HWCAP_NEON (1 << 12) | ||
20 | #define HWCAP_VFPv3 (1 << 13) | ||
21 | #define HWCAP_VFPv3D16 (1 << 14) | ||
22 | #define HWCAP_TLS (1 << 15) | ||
23 | #define HWCAP_VFPv4 (1 << 16) | ||
24 | #define HWCAP_IDIVA (1 << 17) | ||
25 | #define HWCAP_IDIVT (1 << 18) | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | ||
27 | 5 | ||
28 | #if defined(__KERNEL__) | ||
29 | #if !defined(__ASSEMBLY__) | 6 | #if !defined(__ASSEMBLY__) |
30 | /* | 7 | /* |
31 | * This yields a mask that user programs can use to figure out what | 8 | * This yields a mask that user programs can use to figure out what |
@@ -35,5 +12,3 @@ | |||
35 | extern unsigned int elf_hwcap; | 12 | extern unsigned int elf_hwcap; |
36 | #endif | 13 | #endif |
37 | #endif | 14 | #endif |
38 | |||
39 | #endif | ||
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 815c669fec0a..35c1ed89b936 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -47,13 +47,68 @@ extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); | |||
47 | extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); | 47 | extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); |
48 | extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | 48 | extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); |
49 | 49 | ||
50 | #define __raw_writeb(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))) | 50 | #if __LINUX_ARM_ARCH__ < 6 |
51 | #define __raw_writew(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))) | 51 | /* |
52 | #define __raw_writel(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned int __force *)(a) = (v))) | 52 | * Half-word accesses are problematic with RiscPC due to limitations of |
53 | * the bus. Rather than special-case the machine, just let the compiler | ||
54 | * generate the access for CPUs prior to ARMv6. | ||
55 | */ | ||
56 | #define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) | ||
57 | #define __raw_writew(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))) | ||
58 | #else | ||
59 | /* | ||
60 | * When running under a hypervisor, we want to avoid I/O accesses with | ||
61 | * writeback addressing modes as these incur a significant performance | ||
62 | * overhead (the address generation must be emulated in software). | ||
63 | */ | ||
64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) | ||
65 | { | ||
66 | asm volatile("strh %1, %0" | ||
67 | : "+Qo" (*(volatile u16 __force *)addr) | ||
68 | : "r" (val)); | ||
69 | } | ||
70 | |||
71 | static inline u16 __raw_readw(const volatile void __iomem *addr) | ||
72 | { | ||
73 | u16 val; | ||
74 | asm volatile("ldrh %1, %0" | ||
75 | : "+Qo" (*(volatile u16 __force *)addr), | ||
76 | "=r" (val)); | ||
77 | return val; | ||
78 | } | ||
79 | #endif | ||
80 | |||
81 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr) | ||
82 | { | ||
83 | asm volatile("strb %1, %0" | ||
84 | : "+Qo" (*(volatile u8 __force *)addr) | ||
85 | : "r" (val)); | ||
86 | } | ||
87 | |||
88 | static inline void __raw_writel(u32 val, volatile void __iomem *addr) | ||
89 | { | ||
90 | asm volatile("str %1, %0" | ||
91 | : "+Qo" (*(volatile u32 __force *)addr) | ||
92 | : "r" (val)); | ||
93 | } | ||
94 | |||
95 | static inline u8 __raw_readb(const volatile void __iomem *addr) | ||
96 | { | ||
97 | u8 val; | ||
98 | asm volatile("ldrb %1, %0" | ||
99 | : "+Qo" (*(volatile u8 __force *)addr), | ||
100 | "=r" (val)); | ||
101 | return val; | ||
102 | } | ||
53 | 103 | ||
54 | #define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a)) | 104 | static inline u32 __raw_readl(const volatile void __iomem *addr) |
55 | #define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) | 105 | { |
56 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) | 106 | u32 val; |
107 | asm volatile("ldr %1, %0" | ||
108 | : "+Qo" (*(volatile u32 __force *)addr), | ||
109 | "=r" (val)); | ||
110 | return val; | ||
111 | } | ||
57 | 112 | ||
58 | /* | 113 | /* |
59 | * Architecture ioremap implementation. | 114 | * Architecture ioremap implementation. |
@@ -113,11 +168,19 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
113 | #define __iowmb() do { } while (0) | 168 | #define __iowmb() do { } while (0) |
114 | #endif | 169 | #endif |
115 | 170 | ||
171 | /* PCI fixed i/o mapping */ | ||
172 | #define PCI_IO_VIRT_BASE 0xfee00000 | ||
173 | |||
174 | extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); | ||
175 | |||
116 | /* | 176 | /* |
117 | * Now, pick up the machine-defined IO definitions | 177 | * Now, pick up the machine-defined IO definitions |
118 | */ | 178 | */ |
119 | #ifdef CONFIG_NEED_MACH_IO_H | 179 | #ifdef CONFIG_NEED_MACH_IO_H |
120 | #include <mach/io.h> | 180 | #include <mach/io.h> |
181 | #elif defined(CONFIG_PCI) | ||
182 | #define IO_SPACE_LIMIT ((resource_size_t)0xfffff) | ||
183 | #define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT)) | ||
121 | #else | 184 | #else |
122 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) | 185 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) |
123 | #endif | 186 | #endif |
diff --git a/arch/arm/include/asm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d0..000000000000 --- a/arch/arm/include/asm/ipcbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/arm/include/asm/leds.h b/arch/arm/include/asm/leds.h deleted file mode 100644 index c545739f39b7..000000000000 --- a/arch/arm/include/asm/leds.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/leds.h | ||
3 | * | ||
4 | * Copyright (C) 1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Event-driven interface for LEDs on machines | ||
11 | * Added led_start and led_stop- Alex Holden, 28th Dec 1998. | ||
12 | */ | ||
13 | #ifndef ASM_ARM_LEDS_H | ||
14 | #define ASM_ARM_LEDS_H | ||
15 | |||
16 | |||
17 | typedef enum { | ||
18 | led_idle_start, | ||
19 | led_idle_end, | ||
20 | led_timer, | ||
21 | led_start, | ||
22 | led_stop, | ||
23 | led_claim, /* override idle & timer leds */ | ||
24 | led_release, /* restore idle & timer leds */ | ||
25 | led_start_timer_mode, | ||
26 | led_stop_timer_mode, | ||
27 | led_green_on, | ||
28 | led_green_off, | ||
29 | led_amber_on, | ||
30 | led_amber_off, | ||
31 | led_red_on, | ||
32 | led_red_off, | ||
33 | led_blue_on, | ||
34 | led_blue_off, | ||
35 | /* | ||
36 | * I want this between led_timer and led_start, but | ||
37 | * someone has decided to export this to user space | ||
38 | */ | ||
39 | led_halted | ||
40 | } led_event_t; | ||
41 | |||
42 | /* Use this routine to handle LEDs */ | ||
43 | |||
44 | #ifdef CONFIG_LEDS | ||
45 | extern void (*leds_event)(led_event_t); | ||
46 | #else | ||
47 | #define leds_event(e) | ||
48 | #endif | ||
49 | |||
50 | #endif | ||
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 0b1c94b8c652..917d4fcfd9b4 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -14,6 +14,12 @@ struct tag; | |||
14 | struct meminfo; | 14 | struct meminfo; |
15 | struct sys_timer; | 15 | struct sys_timer; |
16 | struct pt_regs; | 16 | struct pt_regs; |
17 | struct smp_operations; | ||
18 | #ifdef CONFIG_SMP | ||
19 | #define smp_ops(ops) (&(ops)) | ||
20 | #else | ||
21 | #define smp_ops(ops) (struct smp_operations *)NULL | ||
22 | #endif | ||
17 | 23 | ||
18 | struct machine_desc { | 24 | struct machine_desc { |
19 | unsigned int nr; /* architecture number */ | 25 | unsigned int nr; /* architecture number */ |
@@ -35,6 +41,7 @@ struct machine_desc { | |||
35 | unsigned char reserve_lp1 :1; /* never has lp1 */ | 41 | unsigned char reserve_lp1 :1; /* never has lp1 */ |
36 | unsigned char reserve_lp2 :1; /* never has lp2 */ | 42 | unsigned char reserve_lp2 :1; /* never has lp2 */ |
37 | char restart_mode; /* default restart mode */ | 43 | char restart_mode; /* default restart mode */ |
44 | struct smp_operations *smp; /* SMP operations */ | ||
38 | void (*fixup)(struct tag *, char **, | 45 | void (*fixup)(struct tag *, char **, |
39 | struct meminfo *); | 46 | struct meminfo *); |
40 | void (*reserve)(void);/* reserve mem blocks */ | 47 | void (*reserve)(void);/* reserve mem blocks */ |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index a6efcdd6fd25..195ac2f9d3d3 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * | 9 | * |
10 | * Page table mapping constructs and function prototypes | 10 | * Page table mapping constructs and function prototypes |
11 | */ | 11 | */ |
12 | #ifndef __ASM_MACH_MAP_H | ||
13 | #define __ASM_MACH_MAP_H | ||
14 | |||
12 | #include <asm/io.h> | 15 | #include <asm/io.h> |
13 | 16 | ||
14 | struct map_desc { | 17 | struct map_desc { |
@@ -34,6 +37,8 @@ struct map_desc { | |||
34 | 37 | ||
35 | #ifdef CONFIG_MMU | 38 | #ifdef CONFIG_MMU |
36 | extern void iotable_init(struct map_desc *, int); | 39 | extern void iotable_init(struct map_desc *, int); |
40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | ||
41 | void *caller); | ||
37 | 42 | ||
38 | struct mem_type; | 43 | struct mem_type; |
39 | extern const struct mem_type *get_mem_type(unsigned int type); | 44 | extern const struct mem_type *get_mem_type(unsigned int type); |
@@ -44,4 +49,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, | |||
44 | const struct mem_type *mtype); | 49 | const struct mem_type *mtype); |
45 | #else | 50 | #else |
46 | #define iotable_init(map,num) do { } while (0) | 51 | #define iotable_init(map,num) do { } while (0) |
52 | #define vm_reserve_area_early(a,s,c) do { } while (0) | ||
53 | #endif | ||
54 | |||
47 | #endif | 55 | #endif |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 26c511fddf8f..db9fedb57f2c 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_MACH_PCI_H | 11 | #ifndef __ASM_MACH_PCI_H |
12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
13 | 13 | ||
14 | #include <linux/ioport.h> | ||
15 | |||
14 | struct pci_sys_data; | 16 | struct pci_sys_data; |
15 | struct pci_ops; | 17 | struct pci_ops; |
16 | struct pci_bus; | 18 | struct pci_bus; |
@@ -42,6 +44,8 @@ struct pci_sys_data { | |||
42 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 44 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
43 | struct pci_bus *bus; /* PCI bus */ | 45 | struct pci_bus *bus; /* PCI bus */ |
44 | struct list_head resources; /* root bus resources (apertures) */ | 46 | struct list_head resources; /* root bus resources (apertures) */ |
47 | struct resource io_res; | ||
48 | char io_res_name[12]; | ||
45 | /* Bridge swizzling */ | 49 | /* Bridge swizzling */ |
46 | u8 (*swizzle)(struct pci_dev *, u8 *); | 50 | u8 (*swizzle)(struct pci_dev *, u8 *); |
47 | /* IRQ mapping */ | 51 | /* IRQ mapping */ |
@@ -55,6 +59,15 @@ struct pci_sys_data { | |||
55 | void pci_common_init(struct hw_pci *); | 59 | void pci_common_init(struct hw_pci *); |
56 | 60 | ||
57 | /* | 61 | /* |
62 | * Setup early fixed I/O mapping. | ||
63 | */ | ||
64 | #if defined(CONFIG_PCI) | ||
65 | extern void pci_map_io_early(unsigned long pfn); | ||
66 | #else | ||
67 | static inline void pci_map_io_early(unsigned long pfn) {} | ||
68 | #endif | ||
69 | |||
70 | /* | ||
58 | * PCI controllers | 71 | * PCI controllers |
59 | */ | 72 | */ |
60 | extern struct pci_ops iop3xx_ops; | 73 | extern struct pci_ops iop3xx_ops; |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index e965f1b560f1..73cf03aa981e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -187,6 +187,7 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
187 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) | 187 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) |
188 | #endif | 188 | #endif |
189 | #endif | 189 | #endif |
190 | #endif /* __ASSEMBLY__ */ | ||
190 | 191 | ||
191 | #ifndef PHYS_OFFSET | 192 | #ifndef PHYS_OFFSET |
192 | #ifdef PLAT_PHYS_OFFSET | 193 | #ifdef PLAT_PHYS_OFFSET |
@@ -196,6 +197,8 @@ static inline unsigned long __phys_to_virt(unsigned long x) | |||
196 | #endif | 197 | #endif |
197 | #endif | 198 | #endif |
198 | 199 | ||
200 | #ifndef __ASSEMBLY__ | ||
201 | |||
199 | /* | 202 | /* |
200 | * PFNs are used to describe any physical page; this means | 203 | * PFNs are used to describe any physical page; this means |
201 | * PFN 0 == physical address 0. | 204 | * PFN 0 == physical address 0. |
@@ -272,14 +275,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
272 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 275 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
273 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 276 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) |
274 | 277 | ||
275 | /* | ||
276 | * Optional coherency support. Currently used only by selected | ||
277 | * Intel XSC3-based systems. | ||
278 | */ | ||
279 | #ifndef arch_is_coherent | ||
280 | #define arch_is_coherent() 0 | ||
281 | #endif | ||
282 | |||
283 | #endif | 278 | #endif |
284 | 279 | ||
285 | #include <asm-generic/memory_model.h> | 280 | #include <asm-generic/memory_model.h> |
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 6c6809f982f1..0d3a28dbc8e5 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_ARM_MODULE_H | 1 | #ifndef _ASM_ARM_MODULE_H |
2 | #define _ASM_ARM_MODULE_H | 2 | #define _ASM_ARM_MODULE_H |
3 | 3 | ||
4 | #define Elf_Shdr Elf32_Shdr | 4 | #include <asm-generic/module.h> |
5 | #define Elf_Sym Elf32_Sym | ||
6 | #define Elf_Ehdr Elf32_Ehdr | ||
7 | 5 | ||
8 | struct unwind_table; | 6 | struct unwind_table; |
9 | 7 | ||
@@ -16,13 +14,11 @@ enum { | |||
16 | ARM_SEC_DEVEXIT, | 14 | ARM_SEC_DEVEXIT, |
17 | ARM_SEC_MAX, | 15 | ARM_SEC_MAX, |
18 | }; | 16 | }; |
19 | #endif | ||
20 | 17 | ||
21 | struct mod_arch_specific { | 18 | struct mod_arch_specific { |
22 | #ifdef CONFIG_ARM_UNWIND | ||
23 | struct unwind_table *unwind[ARM_SEC_MAX]; | 19 | struct unwind_table *unwind[ARM_SEC_MAX]; |
24 | #endif | ||
25 | }; | 20 | }; |
21 | #endif | ||
26 | 22 | ||
27 | /* | 23 | /* |
28 | * Add the ARM architecture version to the version magic string | 24 | * Add the ARM architecture version to the version magic string |
diff --git a/arch/arm/include/asm/msgbuf.h b/arch/arm/include/asm/msgbuf.h deleted file mode 100644 index 33b35b946eaa..000000000000 --- a/arch/arm/include/asm/msgbuf.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _ASMARM_MSGBUF_H | ||
2 | #define _ASMARM_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct msqid64_ds { | ||
15 | struct ipc64_perm msg_perm; | ||
16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
19 | unsigned long __unused2; | ||
20 | __kernel_time_t msg_ctime; /* last change time */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
27 | unsigned long __unused4; | ||
28 | unsigned long __unused5; | ||
29 | }; | ||
30 | |||
31 | #endif /* _ASMARM_MSGBUF_H */ | ||
diff --git a/arch/arm/include/asm/mutex.h b/arch/arm/include/asm/mutex.h index b1479fd04a95..87c044910fe0 100644 --- a/arch/arm/include/asm/mutex.h +++ b/arch/arm/include/asm/mutex.h | |||
@@ -9,8 +9,13 @@ | |||
9 | #define _ASM_MUTEX_H | 9 | #define _ASM_MUTEX_H |
10 | /* | 10 | /* |
11 | * On pre-ARMv6 hardware this results in a swp-based implementation, | 11 | * On pre-ARMv6 hardware this results in a swp-based implementation, |
12 | * which is the most efficient. For ARMv6+, we emit a pair of exclusive | 12 | * which is the most efficient. For ARMv6+, we have exclusive memory |
13 | * accesses instead. | 13 | * accessors and use atomic_dec to avoid the extra xchg operations |
14 | * on the locking slowpaths. | ||
14 | */ | 15 | */ |
16 | #if __LINUX_ARM_ARCH__ < 6 | ||
15 | #include <asm-generic/mutex-xchg.h> | 17 | #include <asm-generic/mutex-xchg.h> |
18 | #else | ||
19 | #include <asm-generic/mutex-dec.h> | ||
16 | #endif | 20 | #endif |
21 | #endif /* _ASM_MUTEX_H */ | ||
diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h new file mode 100644 index 000000000000..efcfdf92d9d5 --- /dev/null +++ b/arch/arm/include/asm/opcodes-virt.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions | ||
3 | * Copyright (C) 2012 Linaro Limited | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
19 | #ifndef __ASM_ARM_OPCODES_VIRT_H | ||
20 | #define __ASM_ARM_OPCODES_VIRT_H | ||
21 | |||
22 | #include <asm/opcodes.h> | ||
23 | |||
24 | #define __HVC(imm16) __inst_arm_thumb32( \ | ||
25 | 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ | ||
26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ | ||
27 | ) | ||
28 | |||
29 | #define __ERET __inst_arm_thumb32( \ | ||
30 | 0xE160006E, \ | ||
31 | 0xF3DE8F00 \ | ||
32 | ) | ||
33 | |||
34 | #define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ | ||
35 | 0xE12EF300 | regnum, \ | ||
36 | 0xF3808E30 | (regnum << 16) \ | ||
37 | ) | ||
38 | |||
39 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ | ||
diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h index 19c48deda70f..74e211a6fb24 100644 --- a/arch/arm/include/asm/opcodes.h +++ b/arch/arm/include/asm/opcodes.h | |||
@@ -19,6 +19,33 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | |||
19 | 19 | ||
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Assembler opcode byteswap helpers. | ||
23 | * These are only intended for use by this header: don't use them directly, | ||
24 | * because they will be suboptimal in most cases. | ||
25 | */ | ||
26 | #define ___asm_opcode_swab32(x) ( \ | ||
27 | (((x) << 24) & 0xFF000000) \ | ||
28 | | (((x) << 8) & 0x00FF0000) \ | ||
29 | | (((x) >> 8) & 0x0000FF00) \ | ||
30 | | (((x) >> 24) & 0x000000FF) \ | ||
31 | ) | ||
32 | #define ___asm_opcode_swab16(x) ( \ | ||
33 | (((x) << 8) & 0xFF00) \ | ||
34 | | (((x) >> 8) & 0x00FF) \ | ||
35 | ) | ||
36 | #define ___asm_opcode_swahb32(x) ( \ | ||
37 | (((x) << 8) & 0xFF00FF00) \ | ||
38 | | (((x) >> 8) & 0x00FF00FF) \ | ||
39 | ) | ||
40 | #define ___asm_opcode_swahw32(x) ( \ | ||
41 | (((x) << 16) & 0xFFFF0000) \ | ||
42 | | (((x) >> 16) & 0x0000FFFF) \ | ||
43 | ) | ||
44 | #define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) | ||
45 | #define ___asm_opcode_identity16(x) ((x) & 0xFFFF) | ||
46 | |||
47 | |||
48 | /* | ||
22 | * Opcode byteswap helpers | 49 | * Opcode byteswap helpers |
23 | * | 50 | * |
24 | * These macros help with converting instructions between a canonical integer | 51 | * These macros help with converting instructions between a canonical integer |
@@ -41,39 +68,163 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); | |||
41 | * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not | 68 | * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not |
42 | * represent any valid Thumb-2 instruction. For this range, | 69 | * represent any valid Thumb-2 instruction. For this range, |
43 | * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. | 70 | * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. |
71 | * | ||
72 | * The ___asm variants are intended only for use by this header, in situations | ||
73 | * involving inline assembler. For .S files, the normal __opcode_*() macros | ||
74 | * should do the right thing. | ||
44 | */ | 75 | */ |
76 | #ifdef __ASSEMBLY__ | ||
45 | 77 | ||
46 | #ifndef __ASSEMBLY__ | 78 | #define ___opcode_swab32(x) ___asm_opcode_swab32(x) |
79 | #define ___opcode_swab16(x) ___asm_opcode_swab16(x) | ||
80 | #define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) | ||
81 | #define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) | ||
82 | #define ___opcode_identity32(x) ___asm_opcode_identity32(x) | ||
83 | #define ___opcode_identity16(x) ___asm_opcode_identity16(x) | ||
84 | |||
85 | #else /* ! __ASSEMBLY__ */ | ||
47 | 86 | ||
48 | #include <linux/types.h> | 87 | #include <linux/types.h> |
49 | #include <linux/swab.h> | 88 | #include <linux/swab.h> |
50 | 89 | ||
90 | #define ___opcode_swab32(x) swab32(x) | ||
91 | #define ___opcode_swab16(x) swab16(x) | ||
92 | #define ___opcode_swahb32(x) swahb32(x) | ||
93 | #define ___opcode_swahw32(x) swahw32(x) | ||
94 | #define ___opcode_identity32(x) ((u32)(x)) | ||
95 | #define ___opcode_identity16(x) ((u16)(x)) | ||
96 | |||
97 | #endif /* ! __ASSEMBLY__ */ | ||
98 | |||
99 | |||
51 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 100 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
52 | #define __opcode_to_mem_arm(x) swab32(x) | 101 | |
53 | #define __opcode_to_mem_thumb16(x) swab16(x) | 102 | #define __opcode_to_mem_arm(x) ___opcode_swab32(x) |
54 | #define __opcode_to_mem_thumb32(x) swahb32(x) | 103 | #define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) |
55 | #else | 104 | #define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) |
56 | #define __opcode_to_mem_arm(x) ((u32)(x)) | 105 | #define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) |
57 | #define __opcode_to_mem_thumb16(x) ((u16)(x)) | 106 | #define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) |
58 | #define __opcode_to_mem_thumb32(x) swahw32(x) | 107 | #define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) |
108 | |||
109 | #else /* ! CONFIG_CPU_ENDIAN_BE8 */ | ||
110 | |||
111 | #define __opcode_to_mem_arm(x) ___opcode_identity32(x) | ||
112 | #define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) | ||
113 | #define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) | ||
114 | #define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x) | ||
115 | #ifndef CONFIG_CPU_ENDIAN_BE32 | ||
116 | /* | ||
117 | * On BE32 systems, using 32-bit accesses to store Thumb instructions will not | ||
118 | * work in all cases, due to alignment constraints. For now, a correct | ||
119 | * version is not provided for BE32. | ||
120 | */ | ||
121 | #define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) | ||
122 | #define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) | ||
59 | #endif | 123 | #endif |
60 | 124 | ||
125 | #endif /* ! CONFIG_CPU_ENDIAN_BE8 */ | ||
126 | |||
61 | #define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) | 127 | #define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) |
62 | #define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) | 128 | #define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) |
129 | #ifndef CONFIG_CPU_ENDIAN_BE32 | ||
63 | #define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) | 130 | #define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) |
131 | #endif | ||
64 | 132 | ||
65 | /* Operations specific to Thumb opcodes */ | 133 | /* Operations specific to Thumb opcodes */ |
66 | 134 | ||
67 | /* Instruction size checks: */ | 135 | /* Instruction size checks: */ |
68 | #define __opcode_is_thumb32(x) ((u32)(x) >= 0xE8000000UL) | 136 | #define __opcode_is_thumb32(x) ( \ |
69 | #define __opcode_is_thumb16(x) ((u32)(x) < 0xE800UL) | 137 | ((x) & 0xF8000000) == 0xE8000000 \ |
138 | || ((x) & 0xF0000000) == 0xF0000000 \ | ||
139 | ) | ||
140 | #define __opcode_is_thumb16(x) ( \ | ||
141 | ((x) & 0xFFFF0000) == 0 \ | ||
142 | && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \ | ||
143 | ) | ||
70 | 144 | ||
71 | /* Operations to construct or split 32-bit Thumb instructions: */ | 145 | /* Operations to construct or split 32-bit Thumb instructions: */ |
72 | #define __opcode_thumb32_first(x) ((u16)((x) >> 16)) | 146 | #define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16)) |
73 | #define __opcode_thumb32_second(x) ((u16)(x)) | 147 | #define __opcode_thumb32_second(x) (___opcode_identity16(x)) |
74 | #define __opcode_thumb32_compose(first, second) \ | 148 | #define __opcode_thumb32_compose(first, second) ( \ |
75 | (((u32)(u16)(first) << 16) | (u32)(u16)(second)) | 149 | (___opcode_identity32(___opcode_identity16(first)) << 16) \ |
150 | | ___opcode_identity32(___opcode_identity16(second)) \ | ||
151 | ) | ||
152 | #define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16)) | ||
153 | #define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x)) | ||
154 | #define ___asm_opcode_thumb32_compose(first, second) ( \ | ||
155 | (___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \ | ||
156 | | ___asm_opcode_identity32(___asm_opcode_identity16(second)) \ | ||
157 | ) | ||
76 | 158 | ||
77 | #endif /* __ASSEMBLY__ */ | 159 | /* |
160 | * Opcode injection helpers | ||
161 | * | ||
162 | * In rare cases it is necessary to assemble an opcode which the | ||
163 | * assembler does not support directly, or which would normally be | ||
164 | * rejected because of the CFLAGS or AFLAGS used to build the affected | ||
165 | * file. | ||
166 | * | ||
167 | * Before using these macros, consider carefully whether it is feasible | ||
168 | * instead to change the build flags for your file, or whether it really | ||
169 | * makes sense to support old assembler versions when building that | ||
170 | * particular kernel feature. | ||
171 | * | ||
172 | * The macros defined here should only be used where there is no viable | ||
173 | * alternative. | ||
174 | * | ||
175 | * | ||
176 | * __inst_arm(x): emit the specified ARM opcode | ||
177 | * __inst_thumb16(x): emit the specified 16-bit Thumb opcode | ||
178 | * __inst_thumb32(x): emit the specified 32-bit Thumb opcode | ||
179 | * | ||
180 | * __inst_arm_thumb16(arm, thumb): emit either the specified arm or | ||
181 | * 16-bit Thumb opcode, depending on whether an ARM or Thumb-2 | ||
182 | * kernel is being built | ||
183 | * | ||
184 | * __inst_arm_thumb32(arm, thumb): emit either the specified arm or | ||
185 | * 32-bit Thumb opcode, depending on whether an ARM or Thumb-2 | ||
186 | * kernel is being built | ||
187 | * | ||
188 | * | ||
189 | * Note that using these macros directly is poor practice. Instead, you | ||
190 | * should use them to define human-readable wrapper macros to encode the | ||
191 | * instructions that you care about. In code which might run on ARMv7 or | ||
192 | * above, you can usually use the __inst_arm_thumb{16,32} macros to | ||
193 | * specify the ARM and Thumb alternatives at the same time. This ensures | ||
194 | * that the correct opcode gets emitted depending on the instruction set | ||
195 | * used for the kernel build. | ||
196 | * | ||
197 | * Look at opcodes-virt.h for an example of how to use these macros. | ||
198 | */ | ||
199 | #include <linux/stringify.h> | ||
200 | |||
201 | #define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) | ||
202 | #define __inst_thumb32(x) ___inst_thumb32( \ | ||
203 | ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \ | ||
204 | ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \ | ||
205 | ) | ||
206 | #define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) | ||
207 | |||
208 | #ifdef CONFIG_THUMB2_KERNEL | ||
209 | #define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ | ||
210 | __inst_thumb16(thumb_opcode) | ||
211 | #define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ | ||
212 | __inst_thumb32(thumb_opcode) | ||
213 | #else | ||
214 | #define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) | ||
215 | #define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) | ||
216 | #endif | ||
217 | |||
218 | /* Helpers for the helpers. Don't use these directly. */ | ||
219 | #ifdef __ASSEMBLY__ | ||
220 | #define ___inst_arm(x) .long x | ||
221 | #define ___inst_thumb16(x) .short x | ||
222 | #define ___inst_thumb32(first, second) .short first, second | ||
223 | #else | ||
224 | #define ___inst_arm(x) ".long " __stringify(x) "\n\t" | ||
225 | #define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" | ||
226 | #define ___inst_thumb32(first, second) \ | ||
227 | ".short " __stringify(first) ", " __stringify(second) "\n\t" | ||
228 | #endif | ||
78 | 229 | ||
79 | #endif /* __ASM_ARM_OPCODES_H */ | 230 | #endif /* __ASM_ARM_OPCODES_H */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index ecf901902e44..812a4944e783 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #ifndef CONFIG_MMU | 20 | #ifndef CONFIG_MMU |
21 | 21 | ||
22 | #include "page-nommu.h" | 22 | #include <asm/page-nommu.h> |
23 | 23 | ||
24 | #else | 24 | #else |
25 | 25 | ||
diff --git a/arch/arm/include/asm/param.h b/arch/arm/include/asm/param.h deleted file mode 100644 index 8b24bf94c06b..000000000000 --- a/arch/arm/include/asm/param.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/param.h | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_PARAM_H | ||
11 | #define __ASM_PARAM_H | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
15 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | ||
16 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
17 | #else | ||
18 | # define HZ 100 | ||
19 | #endif | ||
20 | |||
21 | #define EXEC_PAGESIZE 4096 | ||
22 | |||
23 | #ifndef NOGROUP | ||
24 | #define NOGROUP (-1) | ||
25 | #endif | ||
26 | |||
27 | /* max length of hostname */ | ||
28 | #define MAXHOSTNAMELEN 64 | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/arch/arm/include/asm/parport.h b/arch/arm/include/asm/parport.h deleted file mode 100644 index 26e94b09035a..000000000000 --- a/arch/arm/include/asm/parport.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/parport.h: ARM-specific parport initialisation | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> | ||
5 | * | ||
6 | * This file should only be included by drivers/parport/parport_pc.c. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASMARM_PARPORT_H | ||
10 | #define __ASMARM_PARPORT_H | ||
11 | |||
12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | ||
13 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | ||
14 | { | ||
15 | return parport_pc_find_isa_ports (autoirq, autodma); | ||
16 | } | ||
17 | |||
18 | #endif /* !(_ASMARM_PARPORT_H) */ | ||
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index e074948d8143..625cd621a436 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #ifndef __ARM_PERF_EVENT_H__ | 12 | #ifndef __ARM_PERF_EVENT_H__ |
13 | #define __ARM_PERF_EVENT_H__ | 13 | #define __ARM_PERF_EVENT_H__ |
14 | 14 | ||
15 | /* Nothing to see here... */ | 15 | /* |
16 | * The ARMv7 CPU PMU supports up to 32 event counters. | ||
17 | */ | ||
18 | #define ARMPMU_MAX_HWEVENTS 32 | ||
19 | |||
20 | #define HW_OP_UNSUPPORTED 0xFFFF | ||
21 | #define C(_x) PERF_COUNT_HW_CACHE_##_x | ||
22 | #define CACHE_OP_UNSUPPORTED 0xFFFF | ||
16 | 23 | ||
17 | #endif /* __ARM_PERF_EVENT_H__ */ | 24 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 41dc31f834c3..08c12312a1f9 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifndef CONFIG_MMU | 16 | #ifndef CONFIG_MMU |
17 | 17 | ||
18 | #include <asm-generic/4level-fixup.h> | 18 | #include <asm-generic/4level-fixup.h> |
19 | #include "pgtable-nommu.h" | 19 | #include <asm/pgtable-nommu.h> |
20 | 20 | ||
21 | #else | 21 | #else |
22 | 22 | ||
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 4432305f4a2a..a26170dce02e 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -16,69 +16,30 @@ | |||
16 | #include <linux/perf_event.h> | 16 | #include <linux/perf_event.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Types of PMUs that can be accessed directly and require mutual | ||
20 | * exclusion between profiling tools. | ||
21 | */ | ||
22 | enum arm_pmu_type { | ||
23 | ARM_PMU_DEVICE_CPU = 0, | ||
24 | ARM_NUM_PMU_DEVICES, | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * struct arm_pmu_platdata - ARM PMU platform data | 19 | * struct arm_pmu_platdata - ARM PMU platform data |
29 | * | 20 | * |
30 | * @handle_irq: an optional handler which will be called from the | 21 | * @handle_irq: an optional handler which will be called from the |
31 | * interrupt and passed the address of the low level handler, | 22 | * interrupt and passed the address of the low level handler, |
32 | * and can be used to implement any platform specific handling | 23 | * and can be used to implement any platform specific handling |
33 | * before or after calling it. | 24 | * before or after calling it. |
34 | * @enable_irq: an optional handler which will be called after | 25 | * @runtime_resume: an optional handler which will be called by the |
35 | * request_irq and be used to handle some platform specific | 26 | * runtime PM framework following a call to pm_runtime_get(). |
36 | * irq enablement | 27 | * Note that if pm_runtime_get() is called more than once in |
37 | * @disable_irq: an optional handler which will be called before | 28 | * succession this handler will only be called once. |
38 | * free_irq and be used to handle some platform specific | 29 | * @runtime_suspend: an optional handler which will be called by the |
39 | * irq disablement | 30 | * runtime PM framework following a call to pm_runtime_put(). |
31 | * Note that if pm_runtime_get() is called more than once in | ||
32 | * succession this handler will only be called following the | ||
33 | * final call to pm_runtime_put() that actually disables the | ||
34 | * hardware. | ||
40 | */ | 35 | */ |
41 | struct arm_pmu_platdata { | 36 | struct arm_pmu_platdata { |
42 | irqreturn_t (*handle_irq)(int irq, void *dev, | 37 | irqreturn_t (*handle_irq)(int irq, void *dev, |
43 | irq_handler_t pmu_handler); | 38 | irq_handler_t pmu_handler); |
44 | void (*enable_irq)(int irq); | 39 | int (*runtime_resume)(struct device *dev); |
45 | void (*disable_irq)(int irq); | 40 | int (*runtime_suspend)(struct device *dev); |
46 | }; | 41 | }; |
47 | 42 | ||
48 | #ifdef CONFIG_CPU_HAS_PMU | ||
49 | |||
50 | /** | ||
51 | * reserve_pmu() - reserve the hardware performance counters | ||
52 | * | ||
53 | * Reserve the hardware performance counters in the system for exclusive use. | ||
54 | * Returns 0 on success or -EBUSY if the lock is already held. | ||
55 | */ | ||
56 | extern int | ||
57 | reserve_pmu(enum arm_pmu_type type); | ||
58 | |||
59 | /** | ||
60 | * release_pmu() - Relinquish control of the performance counters | ||
61 | * | ||
62 | * Release the performance counters and allow someone else to use them. | ||
63 | */ | ||
64 | extern void | ||
65 | release_pmu(enum arm_pmu_type type); | ||
66 | |||
67 | #else /* CONFIG_CPU_HAS_PMU */ | ||
68 | |||
69 | #include <linux/err.h> | ||
70 | |||
71 | static inline int | ||
72 | reserve_pmu(enum arm_pmu_type type) | ||
73 | { | ||
74 | return -ENODEV; | ||
75 | } | ||
76 | |||
77 | static inline void | ||
78 | release_pmu(enum arm_pmu_type type) { } | ||
79 | |||
80 | #endif /* CONFIG_CPU_HAS_PMU */ | ||
81 | |||
82 | #ifdef CONFIG_HW_PERF_EVENTS | 43 | #ifdef CONFIG_HW_PERF_EVENTS |
83 | 44 | ||
84 | /* The events for a given PMU register set. */ | 45 | /* The events for a given PMU register set. */ |
@@ -103,7 +64,6 @@ struct pmu_hw_events { | |||
103 | 64 | ||
104 | struct arm_pmu { | 65 | struct arm_pmu { |
105 | struct pmu pmu; | 66 | struct pmu pmu; |
106 | enum arm_pmu_type type; | ||
107 | cpumask_t active_irqs; | 67 | cpumask_t active_irqs; |
108 | char *name; | 68 | char *name; |
109 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 69 | irqreturn_t (*handle_irq)(int irq_num, void *dev); |
@@ -118,6 +78,8 @@ struct arm_pmu { | |||
118 | void (*start)(void); | 78 | void (*start)(void); |
119 | void (*stop)(void); | 79 | void (*stop)(void); |
120 | void (*reset)(void *); | 80 | void (*reset)(void *); |
81 | int (*request_irq)(irq_handler_t handler); | ||
82 | void (*free_irq)(void); | ||
121 | int (*map_event)(struct perf_event *event); | 83 | int (*map_event)(struct perf_event *event); |
122 | int num_events; | 84 | int num_events; |
123 | atomic_t active_events; | 85 | atomic_t active_events; |
@@ -129,7 +91,9 @@ struct arm_pmu { | |||
129 | 91 | ||
130 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) | 92 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) |
131 | 93 | ||
132 | int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); | 94 | extern const struct dev_pm_ops armpmu_dev_pm_ops; |
95 | |||
96 | int armpmu_register(struct arm_pmu *armpmu, char *name, int type); | ||
133 | 97 | ||
134 | u64 armpmu_event_update(struct perf_event *event, | 98 | u64 armpmu_event_update(struct perf_event *event, |
135 | struct hw_perf_event *hwc, | 99 | struct hw_perf_event *hwc, |
@@ -139,6 +103,13 @@ int armpmu_event_set_period(struct perf_event *event, | |||
139 | struct hw_perf_event *hwc, | 103 | struct hw_perf_event *hwc, |
140 | int idx); | 104 | int idx); |
141 | 105 | ||
106 | int armpmu_map_event(struct perf_event *event, | ||
107 | const unsigned (*event_map)[PERF_COUNT_HW_MAX], | ||
108 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] | ||
109 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
110 | [PERF_COUNT_HW_CACHE_RESULT_MAX], | ||
111 | u32 raw_event_mask); | ||
112 | |||
142 | #endif /* CONFIG_HW_PERF_EVENTS */ | 113 | #endif /* CONFIG_HW_PERF_EVENTS */ |
143 | 114 | ||
144 | #endif /* __ARM_PMU_H__ */ | 115 | #endif /* __ARM_PMU_H__ */ |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 99afa7498260..06e7d509eaac 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -85,11 +85,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
85 | #define cpu_relax() barrier() | 85 | #define cpu_relax() barrier() |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | /* | ||
89 | * Create a new kernel thread | ||
90 | */ | ||
91 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
92 | |||
93 | #define task_pt_regs(p) \ | 88 | #define task_pt_regs(p) \ |
94 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) | 89 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) |
95 | 90 | ||
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 355ece523f41..3d52ee1bfb31 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -10,132 +10,12 @@ | |||
10 | #ifndef __ASM_ARM_PTRACE_H | 10 | #ifndef __ASM_ARM_PTRACE_H |
11 | #define __ASM_ARM_PTRACE_H | 11 | #define __ASM_ARM_PTRACE_H |
12 | 12 | ||
13 | #include <asm/hwcap.h> | 13 | #include <uapi/asm/ptrace.h> |
14 | |||
15 | #define PTRACE_GETREGS 12 | ||
16 | #define PTRACE_SETREGS 13 | ||
17 | #define PTRACE_GETFPREGS 14 | ||
18 | #define PTRACE_SETFPREGS 15 | ||
19 | /* PTRACE_ATTACH is 16 */ | ||
20 | /* PTRACE_DETACH is 17 */ | ||
21 | #define PTRACE_GETWMMXREGS 18 | ||
22 | #define PTRACE_SETWMMXREGS 19 | ||
23 | /* 20 is unused */ | ||
24 | #define PTRACE_OLDSETOPTIONS 21 | ||
25 | #define PTRACE_GET_THREAD_AREA 22 | ||
26 | #define PTRACE_SET_SYSCALL 23 | ||
27 | /* PTRACE_SYSCALL is 24 */ | ||
28 | #define PTRACE_GETCRUNCHREGS 25 | ||
29 | #define PTRACE_SETCRUNCHREGS 26 | ||
30 | #define PTRACE_GETVFPREGS 27 | ||
31 | #define PTRACE_SETVFPREGS 28 | ||
32 | #define PTRACE_GETHBPREGS 29 | ||
33 | #define PTRACE_SETHBPREGS 30 | ||
34 | |||
35 | /* | ||
36 | * PSR bits | ||
37 | */ | ||
38 | #define USR26_MODE 0x00000000 | ||
39 | #define FIQ26_MODE 0x00000001 | ||
40 | #define IRQ26_MODE 0x00000002 | ||
41 | #define SVC26_MODE 0x00000003 | ||
42 | #define USR_MODE 0x00000010 | ||
43 | #define FIQ_MODE 0x00000011 | ||
44 | #define IRQ_MODE 0x00000012 | ||
45 | #define SVC_MODE 0x00000013 | ||
46 | #define ABT_MODE 0x00000017 | ||
47 | #define UND_MODE 0x0000001b | ||
48 | #define SYSTEM_MODE 0x0000001f | ||
49 | #define MODE32_BIT 0x00000010 | ||
50 | #define MODE_MASK 0x0000001f | ||
51 | #define PSR_T_BIT 0x00000020 | ||
52 | #define PSR_F_BIT 0x00000040 | ||
53 | #define PSR_I_BIT 0x00000080 | ||
54 | #define PSR_A_BIT 0x00000100 | ||
55 | #define PSR_E_BIT 0x00000200 | ||
56 | #define PSR_J_BIT 0x01000000 | ||
57 | #define PSR_Q_BIT 0x08000000 | ||
58 | #define PSR_V_BIT 0x10000000 | ||
59 | #define PSR_C_BIT 0x20000000 | ||
60 | #define PSR_Z_BIT 0x40000000 | ||
61 | #define PSR_N_BIT 0x80000000 | ||
62 | |||
63 | /* | ||
64 | * Groups of PSR bits | ||
65 | */ | ||
66 | #define PSR_f 0xff000000 /* Flags */ | ||
67 | #define PSR_s 0x00ff0000 /* Status */ | ||
68 | #define PSR_x 0x0000ff00 /* Extension */ | ||
69 | #define PSR_c 0x000000ff /* Control */ | ||
70 | |||
71 | /* | ||
72 | * ARMv7 groups of PSR bits | ||
73 | */ | ||
74 | #define APSR_MASK 0xf80f0000 /* N, Z, C, V, Q and GE flags */ | ||
75 | #define PSR_ISET_MASK 0x01000010 /* ISA state (J, T) mask */ | ||
76 | #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | ||
77 | #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ | ||
78 | |||
79 | /* | ||
80 | * Default endianness state | ||
81 | */ | ||
82 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
83 | #define PSR_ENDSTATE PSR_E_BIT | ||
84 | #else | ||
85 | #define PSR_ENDSTATE 0 | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | ||
90 | * process is located in memory. | ||
91 | */ | ||
92 | #define PT_TEXT_ADDR 0x10000 | ||
93 | #define PT_DATA_ADDR 0x10004 | ||
94 | #define PT_TEXT_END_ADDR 0x10008 | ||
95 | 14 | ||
96 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
97 | |||
98 | /* | ||
99 | * This struct defines the way the registers are stored on the | ||
100 | * stack during a system call. Note that sizeof(struct pt_regs) | ||
101 | * has to be a multiple of 8. | ||
102 | */ | ||
103 | #ifndef __KERNEL__ | ||
104 | struct pt_regs { | ||
105 | long uregs[18]; | ||
106 | }; | ||
107 | #else /* __KERNEL__ */ | ||
108 | struct pt_regs { | 16 | struct pt_regs { |
109 | unsigned long uregs[18]; | 17 | unsigned long uregs[18]; |
110 | }; | 18 | }; |
111 | #endif /* __KERNEL__ */ | ||
112 | |||
113 | #define ARM_cpsr uregs[16] | ||
114 | #define ARM_pc uregs[15] | ||
115 | #define ARM_lr uregs[14] | ||
116 | #define ARM_sp uregs[13] | ||
117 | #define ARM_ip uregs[12] | ||
118 | #define ARM_fp uregs[11] | ||
119 | #define ARM_r10 uregs[10] | ||
120 | #define ARM_r9 uregs[9] | ||
121 | #define ARM_r8 uregs[8] | ||
122 | #define ARM_r7 uregs[7] | ||
123 | #define ARM_r6 uregs[6] | ||
124 | #define ARM_r5 uregs[5] | ||
125 | #define ARM_r4 uregs[4] | ||
126 | #define ARM_r3 uregs[3] | ||
127 | #define ARM_r2 uregs[2] | ||
128 | #define ARM_r1 uregs[1] | ||
129 | #define ARM_r0 uregs[0] | ||
130 | #define ARM_ORIG_r0 uregs[17] | ||
131 | |||
132 | /* | ||
133 | * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS | ||
134 | * and core dumps. | ||
135 | */ | ||
136 | #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) | ||
137 | |||
138 | #ifdef __KERNEL__ | ||
139 | 19 | ||
140 | #define user_mode(regs) \ | 20 | #define user_mode(regs) \ |
141 | (((regs)->ARM_cpsr & 0xf) == 0) | 21 | (((regs)->ARM_cpsr & 0xf) == 0) |
@@ -254,9 +134,10 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs) | |||
254 | return regs->ARM_sp; | 134 | return regs->ARM_sp; |
255 | } | 135 | } |
256 | 136 | ||
257 | #endif /* __KERNEL__ */ | 137 | #define current_pt_regs(void) ({ \ |
138 | register unsigned long sp asm ("sp"); \ | ||
139 | (struct pt_regs *)((sp | (THREAD_SIZE - 1)) - 7) - 1; \ | ||
140 | }) | ||
258 | 141 | ||
259 | #endif /* __ASSEMBLY__ */ | 142 | #endif /* __ASSEMBLY__ */ |
260 | |||
261 | #endif | 143 | #endif |
262 | |||
diff --git a/arch/arm/include/asm/segment.h b/arch/arm/include/asm/segment.h deleted file mode 100644 index 9e24c21f6304..000000000000 --- a/arch/arm/include/asm/segment.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_SEGMENT_H | ||
2 | #define __ASM_ARM_SEGMENT_H | ||
3 | |||
4 | #define __KERNEL_CS 0x0 | ||
5 | #define __KERNEL_DS 0x0 | ||
6 | |||
7 | #define __USER_CS 0x1 | ||
8 | #define __USER_DS 0x1 | ||
9 | |||
10 | #endif /* __ASM_ARM_SEGMENT_H */ | ||
11 | |||
diff --git a/arch/arm/include/asm/sembuf.h b/arch/arm/include/asm/sembuf.h deleted file mode 100644 index 1c0283954289..000000000000 --- a/arch/arm/include/asm/sembuf.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASMARM_SEMBUF_H | ||
2 | #define _ASMARM_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct semid64_ds { | ||
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
16 | __kernel_time_t sem_otime; /* last semop time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t sem_ctime; /* last change time */ | ||
19 | unsigned long __unused2; | ||
20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long __unused4; | ||
23 | }; | ||
24 | |||
25 | #endif /* _ASMARM_SEMBUF_H */ | ||
diff --git a/arch/arm/include/asm/serial.h b/arch/arm/include/asm/serial.h deleted file mode 100644 index ebb049091e26..000000000000 --- a/arch/arm/include/asm/serial.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/serial.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 15-10-1996 RMK Created | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_SERIAL_H | ||
15 | #define __ASM_SERIAL_H | ||
16 | |||
17 | #define BASE_BAUD (1843200 / 16) | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 24d284a1bfc7..c50f05609501 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -14,176 +14,8 @@ | |||
14 | #ifndef __ASMARM_SETUP_H | 14 | #ifndef __ASMARM_SETUP_H |
15 | #define __ASMARM_SETUP_H | 15 | #define __ASMARM_SETUP_H |
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <uapi/asm/setup.h> |
18 | 18 | ||
19 | #define COMMAND_LINE_SIZE 1024 | ||
20 | |||
21 | /* The list ends with an ATAG_NONE node. */ | ||
22 | #define ATAG_NONE 0x00000000 | ||
23 | |||
24 | struct tag_header { | ||
25 | __u32 size; | ||
26 | __u32 tag; | ||
27 | }; | ||
28 | |||
29 | /* The list must start with an ATAG_CORE node */ | ||
30 | #define ATAG_CORE 0x54410001 | ||
31 | |||
32 | struct tag_core { | ||
33 | __u32 flags; /* bit 0 = read-only */ | ||
34 | __u32 pagesize; | ||
35 | __u32 rootdev; | ||
36 | }; | ||
37 | |||
38 | /* it is allowed to have multiple ATAG_MEM nodes */ | ||
39 | #define ATAG_MEM 0x54410002 | ||
40 | |||
41 | struct tag_mem32 { | ||
42 | __u32 size; | ||
43 | __u32 start; /* physical start address */ | ||
44 | }; | ||
45 | |||
46 | /* VGA text type displays */ | ||
47 | #define ATAG_VIDEOTEXT 0x54410003 | ||
48 | |||
49 | struct tag_videotext { | ||
50 | __u8 x; | ||
51 | __u8 y; | ||
52 | __u16 video_page; | ||
53 | __u8 video_mode; | ||
54 | __u8 video_cols; | ||
55 | __u16 video_ega_bx; | ||
56 | __u8 video_lines; | ||
57 | __u8 video_isvga; | ||
58 | __u16 video_points; | ||
59 | }; | ||
60 | |||
61 | /* describes how the ramdisk will be used in kernel */ | ||
62 | #define ATAG_RAMDISK 0x54410004 | ||
63 | |||
64 | struct tag_ramdisk { | ||
65 | __u32 flags; /* bit 0 = load, bit 1 = prompt */ | ||
66 | __u32 size; /* decompressed ramdisk size in _kilo_ bytes */ | ||
67 | __u32 start; /* starting block of floppy-based RAM disk image */ | ||
68 | }; | ||
69 | |||
70 | /* describes where the compressed ramdisk image lives (virtual address) */ | ||
71 | /* | ||
72 | * this one accidentally used virtual addresses - as such, | ||
73 | * it's deprecated. | ||
74 | */ | ||
75 | #define ATAG_INITRD 0x54410005 | ||
76 | |||
77 | /* describes where the compressed ramdisk image lives (physical address) */ | ||
78 | #define ATAG_INITRD2 0x54420005 | ||
79 | |||
80 | struct tag_initrd { | ||
81 | __u32 start; /* physical start address */ | ||
82 | __u32 size; /* size of compressed ramdisk image in bytes */ | ||
83 | }; | ||
84 | |||
85 | /* board serial number. "64 bits should be enough for everybody" */ | ||
86 | #define ATAG_SERIAL 0x54410006 | ||
87 | |||
88 | struct tag_serialnr { | ||
89 | __u32 low; | ||
90 | __u32 high; | ||
91 | }; | ||
92 | |||
93 | /* board revision */ | ||
94 | #define ATAG_REVISION 0x54410007 | ||
95 | |||
96 | struct tag_revision { | ||
97 | __u32 rev; | ||
98 | }; | ||
99 | |||
100 | /* initial values for vesafb-type framebuffers. see struct screen_info | ||
101 | * in include/linux/tty.h | ||
102 | */ | ||
103 | #define ATAG_VIDEOLFB 0x54410008 | ||
104 | |||
105 | struct tag_videolfb { | ||
106 | __u16 lfb_width; | ||
107 | __u16 lfb_height; | ||
108 | __u16 lfb_depth; | ||
109 | __u16 lfb_linelength; | ||
110 | __u32 lfb_base; | ||
111 | __u32 lfb_size; | ||
112 | __u8 red_size; | ||
113 | __u8 red_pos; | ||
114 | __u8 green_size; | ||
115 | __u8 green_pos; | ||
116 | __u8 blue_size; | ||
117 | __u8 blue_pos; | ||
118 | __u8 rsvd_size; | ||
119 | __u8 rsvd_pos; | ||
120 | }; | ||
121 | |||
122 | /* command line: \0 terminated string */ | ||
123 | #define ATAG_CMDLINE 0x54410009 | ||
124 | |||
125 | struct tag_cmdline { | ||
126 | char cmdline[1]; /* this is the minimum size */ | ||
127 | }; | ||
128 | |||
129 | /* acorn RiscPC specific information */ | ||
130 | #define ATAG_ACORN 0x41000101 | ||
131 | |||
132 | struct tag_acorn { | ||
133 | __u32 memc_control_reg; | ||
134 | __u32 vram_pages; | ||
135 | __u8 sounddefault; | ||
136 | __u8 adfsdrives; | ||
137 | }; | ||
138 | |||
139 | /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ | ||
140 | #define ATAG_MEMCLK 0x41000402 | ||
141 | |||
142 | struct tag_memclk { | ||
143 | __u32 fmemclk; | ||
144 | }; | ||
145 | |||
146 | struct tag { | ||
147 | struct tag_header hdr; | ||
148 | union { | ||
149 | struct tag_core core; | ||
150 | struct tag_mem32 mem; | ||
151 | struct tag_videotext videotext; | ||
152 | struct tag_ramdisk ramdisk; | ||
153 | struct tag_initrd initrd; | ||
154 | struct tag_serialnr serialnr; | ||
155 | struct tag_revision revision; | ||
156 | struct tag_videolfb videolfb; | ||
157 | struct tag_cmdline cmdline; | ||
158 | |||
159 | /* | ||
160 | * Acorn specific | ||
161 | */ | ||
162 | struct tag_acorn acorn; | ||
163 | |||
164 | /* | ||
165 | * DC21285 specific | ||
166 | */ | ||
167 | struct tag_memclk memclk; | ||
168 | } u; | ||
169 | }; | ||
170 | |||
171 | struct tagtable { | ||
172 | __u32 tag; | ||
173 | int (*parse)(const struct tag *); | ||
174 | }; | ||
175 | |||
176 | #define tag_member_present(tag,member) \ | ||
177 | ((unsigned long)(&((struct tag *)0L)->member + 1) \ | ||
178 | <= (tag)->hdr.size * 4) | ||
179 | |||
180 | #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size)) | ||
181 | #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) | ||
182 | |||
183 | #define for_each_tag(t,base) \ | ||
184 | for (t = base; t->hdr.size; t = tag_next(t)) | ||
185 | |||
186 | #ifdef __KERNEL__ | ||
187 | 19 | ||
188 | #define __tag __used __attribute__((__section__(".taglist.init"))) | 20 | #define __tag __used __attribute__((__section__(".taglist.init"))) |
189 | #define __tagtable(tag, fn) \ | 21 | #define __tagtable(tag, fn) \ |
@@ -221,6 +53,4 @@ extern int arm_add_memory(phys_addr_t start, phys_addr_t size); | |||
221 | extern void early_print(const char *str, ...); | 53 | extern void early_print(const char *str, ...); |
222 | extern void dump_machine_table(void); | 54 | extern void dump_machine_table(void); |
223 | 55 | ||
224 | #endif /* __KERNEL__ */ | ||
225 | |||
226 | #endif | 56 | #endif |
diff --git a/arch/arm/include/asm/shmbuf.h b/arch/arm/include/asm/shmbuf.h deleted file mode 100644 index 2e5c67ba1c97..000000000000 --- a/arch/arm/include/asm/shmbuf.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _ASMARM_SHMBUF_H | ||
2 | #define _ASMARM_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct shmid64_ds { | ||
15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
17 | __kernel_time_t shm_atime; /* last attach time */ | ||
18 | unsigned long __unused1; | ||
19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
20 | unsigned long __unused2; | ||
21 | __kernel_time_t shm_ctime; /* last change time */ | ||
22 | unsigned long __unused3; | ||
23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
26 | unsigned long __unused4; | ||
27 | unsigned long __unused5; | ||
28 | }; | ||
29 | |||
30 | struct shminfo64 { | ||
31 | unsigned long shmmax; | ||
32 | unsigned long shmmin; | ||
33 | unsigned long shmmni; | ||
34 | unsigned long shmseg; | ||
35 | unsigned long shmall; | ||
36 | unsigned long __unused1; | ||
37 | unsigned long __unused2; | ||
38 | unsigned long __unused3; | ||
39 | unsigned long __unused4; | ||
40 | }; | ||
41 | |||
42 | #endif /* _ASMARM_SHMBUF_H */ | ||
diff --git a/arch/arm/include/asm/signal.h b/arch/arm/include/asm/signal.h index 43ba0fb1c8ad..5a7963dbd3fb 100644 --- a/arch/arm/include/asm/signal.h +++ b/arch/arm/include/asm/signal.h | |||
@@ -1,12 +1,8 @@ | |||
1 | #ifndef _ASMARM_SIGNAL_H | 1 | #ifndef _ASMARM_SIGNAL_H |
2 | #define _ASMARM_SIGNAL_H | 2 | #define _ASMARM_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | 6 | /* Most things should be clean enough to redefine this at will, if care |
11 | is taken to make libc match. */ | 7 | is taken to make libc match. */ |
12 | 8 | ||
@@ -20,100 +16,6 @@ typedef struct { | |||
20 | unsigned long sig[_NSIG_WORDS]; | 16 | unsigned long sig[_NSIG_WORDS]; |
21 | } sigset_t; | 17 | } sigset_t; |
22 | 18 | ||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | #define SIGSWI 32 | ||
74 | |||
75 | /* | ||
76 | * SA_FLAGS values: | ||
77 | * | ||
78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
79 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
80 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
81 | * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task | ||
82 | * is running in 26-bit. | ||
83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | ||
84 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
85 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
86 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
87 | * | ||
88 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
89 | * Unix names RESETHAND and NODEFER respectively. | ||
90 | */ | ||
91 | #define SA_NOCLDSTOP 0x00000001 | ||
92 | #define SA_NOCLDWAIT 0x00000002 | ||
93 | #define SA_SIGINFO 0x00000004 | ||
94 | #define SA_THIRTYTWO 0x02000000 | ||
95 | #define SA_RESTORER 0x04000000 | ||
96 | #define SA_ONSTACK 0x08000000 | ||
97 | #define SA_RESTART 0x10000000 | ||
98 | #define SA_NODEFER 0x40000000 | ||
99 | #define SA_RESETHAND 0x80000000 | ||
100 | |||
101 | #define SA_NOMASK SA_NODEFER | ||
102 | #define SA_ONESHOT SA_RESETHAND | ||
103 | |||
104 | |||
105 | /* | ||
106 | * sigaltstack controls | ||
107 | */ | ||
108 | #define SS_ONSTACK 1 | ||
109 | #define SS_DISABLE 2 | ||
110 | |||
111 | #define MINSIGSTKSZ 2048 | ||
112 | #define SIGSTKSZ 8192 | ||
113 | |||
114 | #include <asm-generic/signal-defs.h> | ||
115 | |||
116 | #ifdef __KERNEL__ | ||
117 | struct old_sigaction { | 19 | struct old_sigaction { |
118 | __sighandler_t sa_handler; | 20 | __sighandler_t sa_handler; |
119 | old_sigset_t sa_mask; | 21 | old_sigset_t sa_mask; |
@@ -132,33 +34,6 @@ struct k_sigaction { | |||
132 | struct sigaction sa; | 34 | struct sigaction sa; |
133 | }; | 35 | }; |
134 | 36 | ||
135 | #else | ||
136 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
137 | |||
138 | struct sigaction { | ||
139 | union { | ||
140 | __sighandler_t _sa_handler; | ||
141 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
142 | } _u; | ||
143 | sigset_t sa_mask; | ||
144 | unsigned long sa_flags; | ||
145 | void (*sa_restorer)(void); | ||
146 | }; | ||
147 | |||
148 | #define sa_handler _u._sa_handler | ||
149 | #define sa_sigaction _u._sa_sigaction | ||
150 | |||
151 | #endif /* __KERNEL__ */ | ||
152 | |||
153 | typedef struct sigaltstack { | ||
154 | void __user *ss_sp; | ||
155 | int ss_flags; | ||
156 | size_t ss_size; | ||
157 | } stack_t; | ||
158 | |||
159 | #ifdef __KERNEL__ | ||
160 | #include <asm/sigcontext.h> | 37 | #include <asm/sigcontext.h> |
161 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 38 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
162 | #endif | 39 | #endif |
163 | |||
164 | #endif | ||
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index ae29293270a3..2e3be16c6766 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -60,15 +60,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *); | |||
60 | */ | 60 | */ |
61 | asmlinkage void secondary_start_kernel(void); | 61 | asmlinkage void secondary_start_kernel(void); |
62 | 62 | ||
63 | /* | ||
64 | * Perform platform specific initialisation of the specified CPU. | ||
65 | */ | ||
66 | extern void platform_secondary_init(unsigned int cpu); | ||
67 | |||
68 | /* | ||
69 | * Initialize cpu_possible map, and enable coherency | ||
70 | */ | ||
71 | extern void platform_smp_prepare_cpus(unsigned int); | ||
72 | 63 | ||
73 | /* | 64 | /* |
74 | * Initial data for bringing up a secondary CPU. | 65 | * Initial data for bringing up a secondary CPU. |
@@ -79,18 +70,47 @@ struct secondary_data { | |||
79 | void *stack; | 70 | void *stack; |
80 | }; | 71 | }; |
81 | extern struct secondary_data secondary_data; | 72 | extern struct secondary_data secondary_data; |
73 | extern volatile int pen_release; | ||
82 | 74 | ||
83 | extern int __cpu_disable(void); | 75 | extern int __cpu_disable(void); |
84 | extern int platform_cpu_disable(unsigned int cpu); | ||
85 | 76 | ||
86 | extern void __cpu_die(unsigned int cpu); | 77 | extern void __cpu_die(unsigned int cpu); |
87 | extern void cpu_die(void); | 78 | extern void cpu_die(void); |
88 | 79 | ||
89 | extern void platform_cpu_die(unsigned int cpu); | ||
90 | extern int platform_cpu_kill(unsigned int cpu); | ||
91 | extern void platform_cpu_enable(unsigned int cpu); | ||
92 | |||
93 | extern void arch_send_call_function_single_ipi(int cpu); | 80 | extern void arch_send_call_function_single_ipi(int cpu); |
94 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 81 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
95 | 82 | ||
83 | struct smp_operations { | ||
84 | #ifdef CONFIG_SMP | ||
85 | /* | ||
86 | * Setup the set of possible CPUs (via set_cpu_possible) | ||
87 | */ | ||
88 | void (*smp_init_cpus)(void); | ||
89 | /* | ||
90 | * Initialize cpu_possible map, and enable coherency | ||
91 | */ | ||
92 | void (*smp_prepare_cpus)(unsigned int max_cpus); | ||
93 | |||
94 | /* | ||
95 | * Perform platform specific initialisation of the specified CPU. | ||
96 | */ | ||
97 | void (*smp_secondary_init)(unsigned int cpu); | ||
98 | /* | ||
99 | * Boot a secondary CPU, and assign it the specified idle task. | ||
100 | * This also gives us the initial stack to use for this CPU. | ||
101 | */ | ||
102 | int (*smp_boot_secondary)(unsigned int cpu, struct task_struct *idle); | ||
103 | #ifdef CONFIG_HOTPLUG_CPU | ||
104 | int (*cpu_kill)(unsigned int cpu); | ||
105 | void (*cpu_die)(unsigned int cpu); | ||
106 | int (*cpu_disable)(unsigned int cpu); | ||
107 | #endif | ||
108 | #endif | ||
109 | }; | ||
110 | |||
111 | /* | ||
112 | * set platform specific SMP operations | ||
113 | */ | ||
114 | extern void smp_set_ops(struct smp_operations *); | ||
115 | |||
96 | #endif /* ifndef __ASM_ARM_SMP_H */ | 116 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/arch/arm/include/asm/socket.h b/arch/arm/include/asm/socket.h deleted file mode 100644 index 6433cadb6ed4..000000000000 --- a/arch/arm/include/asm/socket.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | #ifndef _ASMARM_SOCKET_H | ||
2 | #define _ASMARM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockopt(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | /* To add :#define SO_REUSEPORT 15 */ | ||
26 | #define SO_PASSCRED 16 | ||
27 | #define SO_PEERCRED 17 | ||
28 | #define SO_RCVLOWAT 18 | ||
29 | #define SO_SNDLOWAT 19 | ||
30 | #define SO_RCVTIMEO 20 | ||
31 | #define SO_SNDTIMEO 21 | ||
32 | |||
33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
37 | |||
38 | #define SO_BINDTODEVICE 25 | ||
39 | |||
40 | /* Socket filtering */ | ||
41 | #define SO_ATTACH_FILTER 26 | ||
42 | #define SO_DETACH_FILTER 27 | ||
43 | |||
44 | #define SO_PEERNAME 28 | ||
45 | #define SO_TIMESTAMP 29 | ||
46 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
47 | |||
48 | #define SO_ACCEPTCONN 30 | ||
49 | |||
50 | #define SO_PEERSEC 31 | ||
51 | #define SO_PASSSEC 34 | ||
52 | #define SO_TIMESTAMPNS 35 | ||
53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
54 | |||
55 | #define SO_MARK 36 | ||
56 | |||
57 | #define SO_TIMESTAMPING 37 | ||
58 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
59 | |||
60 | #define SO_PROTOCOL 38 | ||
61 | #define SO_DOMAIN 39 | ||
62 | |||
63 | #define SO_RXQ_OVFL 40 | ||
64 | |||
65 | #define SO_WIFI_STATUS 41 | ||
66 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
67 | #define SO_PEEK_OFF 42 | ||
68 | |||
69 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
70 | #define SO_NOFCS 43 | ||
71 | |||
72 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/arm/include/asm/sockios.h b/arch/arm/include/asm/sockios.h deleted file mode 100644 index a2588a2512df..000000000000 --- a/arch/arm/include/asm/sockios.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ARCH_ARM_SOCKIOS_H | ||
2 | #define __ARCH_ARM_SOCKIOS_H | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index b859d82e30ca..537fc9b91889 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -15,14 +15,8 @@ | |||
15 | #ifndef __ASM_ARM_SWAB_H | 15 | #ifndef __ASM_ARM_SWAB_H |
16 | #define __ASM_ARM_SWAB_H | 16 | #define __ASM_ARM_SWAB_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <uapi/asm/swab.h> |
19 | #include <linux/types.h> | ||
20 | 19 | ||
21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
22 | # define __SWAB_64_THRU_32__ | ||
23 | #endif | ||
24 | |||
25 | #if defined(__KERNEL__) | ||
26 | #if __LINUX_ARM_ARCH__ >= 6 | 20 | #if __LINUX_ARM_ARCH__ >= 6 |
27 | 21 | ||
28 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) | 22 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) |
@@ -42,32 +36,3 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
42 | 36 | ||
43 | #endif | 37 | #endif |
44 | #endif | 38 | #endif |
45 | |||
46 | #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 | ||
47 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
48 | { | ||
49 | __u32 t; | ||
50 | |||
51 | #ifndef __thumb__ | ||
52 | if (!__builtin_constant_p(x)) { | ||
53 | /* | ||
54 | * The compiler needs a bit of a hint here to always do the | ||
55 | * right thing and not screw it up to different degrees | ||
56 | * depending on the gcc version. | ||
57 | */ | ||
58 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); | ||
59 | } else | ||
60 | #endif | ||
61 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | ||
62 | |||
63 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ | ||
64 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ | ||
65 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ | ||
66 | |||
67 | return x; | ||
68 | } | ||
69 | #define __arch_swab32 __arch_swab32 | ||
70 | |||
71 | #endif | ||
72 | |||
73 | #endif | ||
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index c334a23ddf75..9fdded6b1089 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h | |||
@@ -8,6 +8,11 @@ | |||
8 | #define _ASM_ARM_SYSCALL_H | 8 | #define _ASM_ARM_SYSCALL_H |
9 | 9 | ||
10 | #include <linux/err.h> | 10 | #include <linux/err.h> |
11 | #include <linux/sched.h> | ||
12 | |||
13 | #include <asm/unistd.h> | ||
14 | |||
15 | #define NR_syscalls (__NR_syscalls) | ||
11 | 16 | ||
12 | extern const unsigned long sys_call_table[]; | 17 | extern const unsigned long sys_call_table[]; |
13 | 18 | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 74542c52f9be..368165e33c1c 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <asm/barrier.h> | 2 | #include <asm/barrier.h> |
3 | #include <asm/compiler.h> | 3 | #include <asm/compiler.h> |
4 | #include <asm/cmpxchg.h> | 4 | #include <asm/cmpxchg.h> |
5 | #include <asm/exec.h> | ||
6 | #include <asm/switch_to.h> | 5 | #include <asm/switch_to.h> |
7 | #include <asm/system_info.h> | 6 | #include <asm/system_info.h> |
8 | #include <asm/system_misc.h> | 7 | #include <asm/system_misc.h> |
diff --git a/arch/arm/include/asm/termbits.h b/arch/arm/include/asm/termbits.h deleted file mode 100644 index 704135d28d1d..000000000000 --- a/arch/arm/include/asm/termbits.h +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TERMBITS_H | ||
2 | #define __ASM_ARM_TERMBITS_H | ||
3 | |||
4 | typedef unsigned char cc_t; | ||
5 | typedef unsigned int speed_t; | ||
6 | typedef unsigned int tcflag_t; | ||
7 | |||
8 | #define NCCS 19 | ||
9 | struct termios { | ||
10 | tcflag_t c_iflag; /* input mode flags */ | ||
11 | tcflag_t c_oflag; /* output mode flags */ | ||
12 | tcflag_t c_cflag; /* control mode flags */ | ||
13 | tcflag_t c_lflag; /* local mode flags */ | ||
14 | cc_t c_line; /* line discipline */ | ||
15 | cc_t c_cc[NCCS]; /* control characters */ | ||
16 | }; | ||
17 | |||
18 | struct termios2 { | ||
19 | tcflag_t c_iflag; /* input mode flags */ | ||
20 | tcflag_t c_oflag; /* output mode flags */ | ||
21 | tcflag_t c_cflag; /* control mode flags */ | ||
22 | tcflag_t c_lflag; /* local mode flags */ | ||
23 | cc_t c_line; /* line discipline */ | ||
24 | cc_t c_cc[NCCS]; /* control characters */ | ||
25 | speed_t c_ispeed; /* input speed */ | ||
26 | speed_t c_ospeed; /* output speed */ | ||
27 | }; | ||
28 | |||
29 | struct ktermios { | ||
30 | tcflag_t c_iflag; /* input mode flags */ | ||
31 | tcflag_t c_oflag; /* output mode flags */ | ||
32 | tcflag_t c_cflag; /* control mode flags */ | ||
33 | tcflag_t c_lflag; /* local mode flags */ | ||
34 | cc_t c_line; /* line discipline */ | ||
35 | cc_t c_cc[NCCS]; /* control characters */ | ||
36 | speed_t c_ispeed; /* input speed */ | ||
37 | speed_t c_ospeed; /* output speed */ | ||
38 | }; | ||
39 | |||
40 | |||
41 | /* c_cc characters */ | ||
42 | #define VINTR 0 | ||
43 | #define VQUIT 1 | ||
44 | #define VERASE 2 | ||
45 | #define VKILL 3 | ||
46 | #define VEOF 4 | ||
47 | #define VTIME 5 | ||
48 | #define VMIN 6 | ||
49 | #define VSWTC 7 | ||
50 | #define VSTART 8 | ||
51 | #define VSTOP 9 | ||
52 | #define VSUSP 10 | ||
53 | #define VEOL 11 | ||
54 | #define VREPRINT 12 | ||
55 | #define VDISCARD 13 | ||
56 | #define VWERASE 14 | ||
57 | #define VLNEXT 15 | ||
58 | #define VEOL2 16 | ||
59 | |||
60 | /* c_iflag bits */ | ||
61 | #define IGNBRK 0000001 | ||
62 | #define BRKINT 0000002 | ||
63 | #define IGNPAR 0000004 | ||
64 | #define PARMRK 0000010 | ||
65 | #define INPCK 0000020 | ||
66 | #define ISTRIP 0000040 | ||
67 | #define INLCR 0000100 | ||
68 | #define IGNCR 0000200 | ||
69 | #define ICRNL 0000400 | ||
70 | #define IUCLC 0001000 | ||
71 | #define IXON 0002000 | ||
72 | #define IXANY 0004000 | ||
73 | #define IXOFF 0010000 | ||
74 | #define IMAXBEL 0020000 | ||
75 | #define IUTF8 0040000 | ||
76 | |||
77 | /* c_oflag bits */ | ||
78 | #define OPOST 0000001 | ||
79 | #define OLCUC 0000002 | ||
80 | #define ONLCR 0000004 | ||
81 | #define OCRNL 0000010 | ||
82 | #define ONOCR 0000020 | ||
83 | #define ONLRET 0000040 | ||
84 | #define OFILL 0000100 | ||
85 | #define OFDEL 0000200 | ||
86 | #define NLDLY 0000400 | ||
87 | #define NL0 0000000 | ||
88 | #define NL1 0000400 | ||
89 | #define CRDLY 0003000 | ||
90 | #define CR0 0000000 | ||
91 | #define CR1 0001000 | ||
92 | #define CR2 0002000 | ||
93 | #define CR3 0003000 | ||
94 | #define TABDLY 0014000 | ||
95 | #define TAB0 0000000 | ||
96 | #define TAB1 0004000 | ||
97 | #define TAB2 0010000 | ||
98 | #define TAB3 0014000 | ||
99 | #define XTABS 0014000 | ||
100 | #define BSDLY 0020000 | ||
101 | #define BS0 0000000 | ||
102 | #define BS1 0020000 | ||
103 | #define VTDLY 0040000 | ||
104 | #define VT0 0000000 | ||
105 | #define VT1 0040000 | ||
106 | #define FFDLY 0100000 | ||
107 | #define FF0 0000000 | ||
108 | #define FF1 0100000 | ||
109 | |||
110 | /* c_cflag bit meaning */ | ||
111 | #define CBAUD 0010017 | ||
112 | #define B0 0000000 /* hang up */ | ||
113 | #define B50 0000001 | ||
114 | #define B75 0000002 | ||
115 | #define B110 0000003 | ||
116 | #define B134 0000004 | ||
117 | #define B150 0000005 | ||
118 | #define B200 0000006 | ||
119 | #define B300 0000007 | ||
120 | #define B600 0000010 | ||
121 | #define B1200 0000011 | ||
122 | #define B1800 0000012 | ||
123 | #define B2400 0000013 | ||
124 | #define B4800 0000014 | ||
125 | #define B9600 0000015 | ||
126 | #define B19200 0000016 | ||
127 | #define B38400 0000017 | ||
128 | #define EXTA B19200 | ||
129 | #define EXTB B38400 | ||
130 | #define CSIZE 0000060 | ||
131 | #define CS5 0000000 | ||
132 | #define CS6 0000020 | ||
133 | #define CS7 0000040 | ||
134 | #define CS8 0000060 | ||
135 | #define CSTOPB 0000100 | ||
136 | #define CREAD 0000200 | ||
137 | #define PARENB 0000400 | ||
138 | #define PARODD 0001000 | ||
139 | #define HUPCL 0002000 | ||
140 | #define CLOCAL 0004000 | ||
141 | #define CBAUDEX 0010000 | ||
142 | #define BOTHER 0010000 | ||
143 | #define B57600 0010001 | ||
144 | #define B115200 0010002 | ||
145 | #define B230400 0010003 | ||
146 | #define B460800 0010004 | ||
147 | #define B500000 0010005 | ||
148 | #define B576000 0010006 | ||
149 | #define B921600 0010007 | ||
150 | #define B1000000 0010010 | ||
151 | #define B1152000 0010011 | ||
152 | #define B1500000 0010012 | ||
153 | #define B2000000 0010013 | ||
154 | #define B2500000 0010014 | ||
155 | #define B3000000 0010015 | ||
156 | #define B3500000 0010016 | ||
157 | #define B4000000 0010017 | ||
158 | #define CIBAUD 002003600000 /* input baud rate */ | ||
159 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
160 | #define CRTSCTS 020000000000 /* flow control */ | ||
161 | |||
162 | #define IBSHIFT 16 | ||
163 | |||
164 | /* c_lflag bits */ | ||
165 | #define ISIG 0000001 | ||
166 | #define ICANON 0000002 | ||
167 | #define XCASE 0000004 | ||
168 | #define ECHO 0000010 | ||
169 | #define ECHOE 0000020 | ||
170 | #define ECHOK 0000040 | ||
171 | #define ECHONL 0000100 | ||
172 | #define NOFLSH 0000200 | ||
173 | #define TOSTOP 0000400 | ||
174 | #define ECHOCTL 0001000 | ||
175 | #define ECHOPRT 0002000 | ||
176 | #define ECHOKE 0004000 | ||
177 | #define FLUSHO 0010000 | ||
178 | #define PENDIN 0040000 | ||
179 | #define IEXTEN 0100000 | ||
180 | #define EXTPROC 0200000 | ||
181 | |||
182 | /* tcflow() and TCXONC use these */ | ||
183 | #define TCOOFF 0 | ||
184 | #define TCOON 1 | ||
185 | #define TCIOFF 2 | ||
186 | #define TCION 3 | ||
187 | |||
188 | /* tcflush() and TCFLSH use these */ | ||
189 | #define TCIFLUSH 0 | ||
190 | #define TCOFLUSH 1 | ||
191 | #define TCIOFLUSH 2 | ||
192 | |||
193 | /* tcsetattr uses these */ | ||
194 | #define TCSANOW 0 | ||
195 | #define TCSADRAIN 1 | ||
196 | #define TCSAFLUSH 2 | ||
197 | |||
198 | #endif /* __ASM_ARM_TERMBITS_H */ | ||
diff --git a/arch/arm/include/asm/termios.h b/arch/arm/include/asm/termios.h deleted file mode 100644 index 293e3f1bc3f2..000000000000 --- a/arch/arm/include/asm/termios.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TERMIOS_H | ||
2 | #define __ASM_ARM_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | ||
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
27 | start=^Q stop=^S susp=^Z eol=\0 | ||
28 | reprint=^R discard=^U werase=^W lnext=^V | ||
29 | eol2=\0 | ||
30 | */ | ||
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
53 | |||
54 | /* | ||
55 | * Translate a "termio" structure into a "termios". Ugh. | ||
56 | */ | ||
57 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
58 | unsigned short __tmp; \ | ||
59 | get_user(__tmp,&(termio)->x); \ | ||
60 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
61 | } | ||
62 | |||
63 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
64 | ({ \ | ||
65 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
66 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
67 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
68 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
69 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
70 | }) | ||
71 | |||
72 | /* | ||
73 | * Translate a "termios" structure into a "termio". Ugh. | ||
74 | */ | ||
75 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
76 | ({ \ | ||
77 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
78 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
79 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
80 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
81 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
83 | }) | ||
84 | |||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
89 | |||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #endif /* __ASM_ARM_TERMIOS_H */ | ||
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index af7b0bda3355..8477b4c1d39f 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -59,7 +59,9 @@ struct thread_info { | |||
59 | __u32 syscall; /* syscall number */ | 59 | __u32 syscall; /* syscall number */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | #ifdef CONFIG_CRUNCH | ||
62 | struct crunch_state crunchstate; | 63 | struct crunch_state crunchstate; |
64 | #endif | ||
63 | union fp_state fpstate __attribute__((aligned(8))); | 65 | union fp_state fpstate __attribute__((aligned(8))); |
64 | union vfp_state vfpstate; | 66 | union vfp_state vfpstate; |
65 | #ifdef CONFIG_ARM_THUMBEE | 67 | #ifdef CONFIG_ARM_THUMBEE |
@@ -148,7 +150,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
148 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ | 150 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ |
149 | #define TIF_SYSCALL_TRACE 8 | 151 | #define TIF_SYSCALL_TRACE 8 |
150 | #define TIF_SYSCALL_AUDIT 9 | 152 | #define TIF_SYSCALL_AUDIT 9 |
151 | #define TIF_POLLING_NRFLAG 16 | 153 | #define TIF_SYSCALL_TRACEPOINT 10 |
152 | #define TIF_USING_IWMMXT 17 | 154 | #define TIF_USING_IWMMXT 17 |
153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 155 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
154 | #define TIF_RESTORE_SIGMASK 20 | 156 | #define TIF_RESTORE_SIGMASK 20 |
@@ -160,12 +162,12 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
160 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 162 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
161 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 163 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
162 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 164 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
163 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 165 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
164 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | 166 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
165 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 167 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
166 | 168 | ||
167 | /* Checks for any syscall work in entry-common.S */ | 169 | /* Checks for any syscall work in entry-common.S */ |
168 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT) | 170 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT) |
169 | 171 | ||
170 | /* | 172 | /* |
171 | * Change these and you break ASM code in entry-common.S | 173 | * Change these and you break ASM code in entry-common.S |
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index ce119442277c..83f2aa83899c 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h | |||
@@ -12,15 +12,13 @@ | |||
12 | #ifndef _ASMARM_TIMEX_H | 12 | #ifndef _ASMARM_TIMEX_H |
13 | #define _ASMARM_TIMEX_H | 13 | #define _ASMARM_TIMEX_H |
14 | 14 | ||
15 | #include <asm/arch_timer.h> | 15 | #ifdef CONFIG_ARCH_MULTIPLATFORM |
16 | #define CLOCK_TICK_RATE 1000000 | ||
17 | #else | ||
16 | #include <mach/timex.h> | 18 | #include <mach/timex.h> |
19 | #endif | ||
17 | 20 | ||
18 | typedef unsigned long cycles_t; | 21 | typedef unsigned long cycles_t; |
19 | |||
20 | #ifdef ARCH_HAS_READ_CURRENT_TIMER | ||
21 | #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) | 22 | #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) |
22 | #else | ||
23 | #define get_cycles() (0) | ||
24 | #endif | ||
25 | 23 | ||
26 | #endif | 24 | #endif |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 314d4664eae7..99a19512ee26 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -199,6 +199,9 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
199 | { | 199 | { |
200 | pgtable_page_dtor(pte); | 200 | pgtable_page_dtor(pte); |
201 | 201 | ||
202 | #ifdef CONFIG_ARM_LPAE | ||
203 | tlb_add_flush(tlb, addr); | ||
204 | #else | ||
202 | /* | 205 | /* |
203 | * With the classic ARM MMU, a pte page has two corresponding pmd | 206 | * With the classic ARM MMU, a pte page has two corresponding pmd |
204 | * entries, each covering 1MB. | 207 | * entries, each covering 1MB. |
@@ -206,6 +209,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
206 | addr &= PMD_MASK; | 209 | addr &= PMD_MASK; |
207 | tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); | 210 | tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); |
208 | tlb_add_flush(tlb, addr + SZ_1M); | 211 | tlb_add_flush(tlb, addr + SZ_1M); |
212 | #endif | ||
209 | 213 | ||
210 | tlb_remove_page(tlb, pte); | 214 | tlb_remove_page(tlb, pte); |
211 | } | 215 | } |
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h deleted file mode 100644 index 28beab917ffc..000000000000 --- a/arch/arm/include/asm/types.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TYPES_H | ||
2 | #define __ASM_ARM_TYPES_H | ||
3 | |||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
6 | /* | ||
7 | * These aren't exported outside the kernel to avoid name space clashes | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | |||
11 | #define BITS_PER_LONG 32 | ||
12 | |||
13 | #endif /* __KERNEL__ */ | ||
14 | |||
15 | #endif | ||
16 | |||
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 479a6352e0b5..77bd79f2ffdb 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -101,28 +101,39 @@ extern int __get_user_1(void *); | |||
101 | extern int __get_user_2(void *); | 101 | extern int __get_user_2(void *); |
102 | extern int __get_user_4(void *); | 102 | extern int __get_user_4(void *); |
103 | 103 | ||
104 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ | 104 | #define __GUP_CLOBBER_1 "lr", "cc" |
105 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
106 | #define __GUP_CLOBBER_2 "ip", "lr", "cc" | ||
107 | #else | ||
108 | #define __GUP_CLOBBER_2 "lr", "cc" | ||
109 | #endif | ||
110 | #define __GUP_CLOBBER_4 "lr", "cc" | ||
111 | |||
112 | #define __get_user_x(__r2,__p,__e,__l,__s) \ | ||
105 | __asm__ __volatile__ ( \ | 113 | __asm__ __volatile__ ( \ |
106 | __asmeq("%0", "r0") __asmeq("%1", "r2") \ | 114 | __asmeq("%0", "r0") __asmeq("%1", "r2") \ |
115 | __asmeq("%3", "r1") \ | ||
107 | "bl __get_user_" #__s \ | 116 | "bl __get_user_" #__s \ |
108 | : "=&r" (__e), "=r" (__r2) \ | 117 | : "=&r" (__e), "=r" (__r2) \ |
109 | : "0" (__p) \ | 118 | : "0" (__p), "r" (__l) \ |
110 | : __i, "cc") | 119 | : __GUP_CLOBBER_##__s) |
111 | 120 | ||
112 | #define get_user(x,p) \ | 121 | #define __get_user_check(x,p) \ |
113 | ({ \ | 122 | ({ \ |
123 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ | ||
114 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ | 124 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
115 | register unsigned long __r2 asm("r2"); \ | 125 | register unsigned long __r2 asm("r2"); \ |
126 | register unsigned long __l asm("r1") = __limit; \ | ||
116 | register int __e asm("r0"); \ | 127 | register int __e asm("r0"); \ |
117 | switch (sizeof(*(__p))) { \ | 128 | switch (sizeof(*(__p))) { \ |
118 | case 1: \ | 129 | case 1: \ |
119 | __get_user_x(__r2, __p, __e, 1, "lr"); \ | 130 | __get_user_x(__r2, __p, __e, __l, 1); \ |
120 | break; \ | 131 | break; \ |
121 | case 2: \ | 132 | case 2: \ |
122 | __get_user_x(__r2, __p, __e, 2, "r3", "lr"); \ | 133 | __get_user_x(__r2, __p, __e, __l, 2); \ |
123 | break; \ | 134 | break; \ |
124 | case 4: \ | 135 | case 4: \ |
125 | __get_user_x(__r2, __p, __e, 4, "lr"); \ | 136 | __get_user_x(__r2, __p, __e, __l, 4); \ |
126 | break; \ | 137 | break; \ |
127 | default: __e = __get_user_bad(); break; \ | 138 | default: __e = __get_user_bad(); break; \ |
128 | } \ | 139 | } \ |
@@ -130,42 +141,57 @@ extern int __get_user_4(void *); | |||
130 | __e; \ | 141 | __e; \ |
131 | }) | 142 | }) |
132 | 143 | ||
144 | #define get_user(x,p) \ | ||
145 | ({ \ | ||
146 | might_fault(); \ | ||
147 | __get_user_check(x,p); \ | ||
148 | }) | ||
149 | |||
133 | extern int __put_user_1(void *, unsigned int); | 150 | extern int __put_user_1(void *, unsigned int); |
134 | extern int __put_user_2(void *, unsigned int); | 151 | extern int __put_user_2(void *, unsigned int); |
135 | extern int __put_user_4(void *, unsigned int); | 152 | extern int __put_user_4(void *, unsigned int); |
136 | extern int __put_user_8(void *, unsigned long long); | 153 | extern int __put_user_8(void *, unsigned long long); |
137 | 154 | ||
138 | #define __put_user_x(__r2,__p,__e,__s) \ | 155 | #define __put_user_x(__r2,__p,__e,__l,__s) \ |
139 | __asm__ __volatile__ ( \ | 156 | __asm__ __volatile__ ( \ |
140 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | 157 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ |
158 | __asmeq("%3", "r1") \ | ||
141 | "bl __put_user_" #__s \ | 159 | "bl __put_user_" #__s \ |
142 | : "=&r" (__e) \ | 160 | : "=&r" (__e) \ |
143 | : "0" (__p), "r" (__r2) \ | 161 | : "0" (__p), "r" (__r2), "r" (__l) \ |
144 | : "ip", "lr", "cc") | 162 | : "ip", "lr", "cc") |
145 | 163 | ||
146 | #define put_user(x,p) \ | 164 | #define __put_user_check(x,p) \ |
147 | ({ \ | 165 | ({ \ |
166 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ | ||
148 | register const typeof(*(p)) __r2 asm("r2") = (x); \ | 167 | register const typeof(*(p)) __r2 asm("r2") = (x); \ |
149 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ | 168 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
169 | register unsigned long __l asm("r1") = __limit; \ | ||
150 | register int __e asm("r0"); \ | 170 | register int __e asm("r0"); \ |
151 | switch (sizeof(*(__p))) { \ | 171 | switch (sizeof(*(__p))) { \ |
152 | case 1: \ | 172 | case 1: \ |
153 | __put_user_x(__r2, __p, __e, 1); \ | 173 | __put_user_x(__r2, __p, __e, __l, 1); \ |
154 | break; \ | 174 | break; \ |
155 | case 2: \ | 175 | case 2: \ |
156 | __put_user_x(__r2, __p, __e, 2); \ | 176 | __put_user_x(__r2, __p, __e, __l, 2); \ |
157 | break; \ | 177 | break; \ |
158 | case 4: \ | 178 | case 4: \ |
159 | __put_user_x(__r2, __p, __e, 4); \ | 179 | __put_user_x(__r2, __p, __e, __l, 4); \ |
160 | break; \ | 180 | break; \ |
161 | case 8: \ | 181 | case 8: \ |
162 | __put_user_x(__r2, __p, __e, 8); \ | 182 | __put_user_x(__r2, __p, __e, __l, 8); \ |
163 | break; \ | 183 | break; \ |
164 | default: __e = __put_user_bad(); break; \ | 184 | default: __e = __put_user_bad(); break; \ |
165 | } \ | 185 | } \ |
166 | __e; \ | 186 | __e; \ |
167 | }) | 187 | }) |
168 | 188 | ||
189 | #define put_user(x,p) \ | ||
190 | ({ \ | ||
191 | might_fault(); \ | ||
192 | __put_user_check(x,p); \ | ||
193 | }) | ||
194 | |||
169 | #else /* CONFIG_MMU */ | 195 | #else /* CONFIG_MMU */ |
170 | 196 | ||
171 | /* | 197 | /* |
@@ -219,6 +245,7 @@ do { \ | |||
219 | unsigned long __gu_addr = (unsigned long)(ptr); \ | 245 | unsigned long __gu_addr = (unsigned long)(ptr); \ |
220 | unsigned long __gu_val; \ | 246 | unsigned long __gu_val; \ |
221 | __chk_user_ptr(ptr); \ | 247 | __chk_user_ptr(ptr); \ |
248 | might_fault(); \ | ||
222 | switch (sizeof(*(ptr))) { \ | 249 | switch (sizeof(*(ptr))) { \ |
223 | case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \ | 250 | case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \ |
224 | case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \ | 251 | case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \ |
@@ -300,6 +327,7 @@ do { \ | |||
300 | unsigned long __pu_addr = (unsigned long)(ptr); \ | 327 | unsigned long __pu_addr = (unsigned long)(ptr); \ |
301 | __typeof__(*(ptr)) __pu_val = (x); \ | 328 | __typeof__(*(ptr)) __pu_val = (x); \ |
302 | __chk_user_ptr(ptr); \ | 329 | __chk_user_ptr(ptr); \ |
330 | might_fault(); \ | ||
303 | switch (sizeof(*(ptr))) { \ | 331 | switch (sizeof(*(ptr))) { \ |
304 | case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \ | 332 | case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \ |
305 | case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \ | 333 | case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \ |
diff --git a/arch/arm/include/asm/unaligned.h b/arch/arm/include/asm/unaligned.h deleted file mode 100644 index 44593a894903..000000000000 --- a/arch/arm/include/asm/unaligned.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASM_ARM_UNALIGNED_H | ||
2 | #define _ASM_ARM_UNALIGNED_H | ||
3 | |||
4 | #include <linux/unaligned/le_byteshift.h> | ||
5 | #include <linux/unaligned/be_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
7 | |||
8 | /* | ||
9 | * Select endianness | ||
10 | */ | ||
11 | #ifndef __ARMEB__ | ||
12 | #define get_unaligned __get_unaligned_le | ||
13 | #define put_unaligned __put_unaligned_le | ||
14 | #else | ||
15 | #define get_unaligned __get_unaligned_be | ||
16 | #define put_unaligned __put_unaligned_be | ||
17 | #endif | ||
18 | |||
19 | #endif /* _ASM_ARM_UNALIGNED_H */ | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 0cab47d4a83f..8f60b6e6bd41 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -13,438 +13,10 @@ | |||
13 | #ifndef __ASM_ARM_UNISTD_H | 13 | #ifndef __ASM_ARM_UNISTD_H |
14 | #define __ASM_ARM_UNISTD_H | 14 | #define __ASM_ARM_UNISTD_H |
15 | 15 | ||
16 | #define __NR_OABI_SYSCALL_BASE 0x900000 | 16 | #include <uapi/asm/unistd.h> |
17 | 17 | ||
18 | #if defined(__thumb__) || defined(__ARM_EABI__) | 18 | #define __NR_syscalls (380) |
19 | #define __NR_SYSCALL_BASE 0 | ||
20 | #else | ||
21 | #define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE | ||
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * This file contains the system call numbers. | ||
26 | */ | ||
27 | |||
28 | #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) | ||
29 | #define __NR_exit (__NR_SYSCALL_BASE+ 1) | ||
30 | #define __NR_fork (__NR_SYSCALL_BASE+ 2) | ||
31 | #define __NR_read (__NR_SYSCALL_BASE+ 3) | ||
32 | #define __NR_write (__NR_SYSCALL_BASE+ 4) | ||
33 | #define __NR_open (__NR_SYSCALL_BASE+ 5) | ||
34 | #define __NR_close (__NR_SYSCALL_BASE+ 6) | ||
35 | /* 7 was sys_waitpid */ | ||
36 | #define __NR_creat (__NR_SYSCALL_BASE+ 8) | ||
37 | #define __NR_link (__NR_SYSCALL_BASE+ 9) | ||
38 | #define __NR_unlink (__NR_SYSCALL_BASE+ 10) | ||
39 | #define __NR_execve (__NR_SYSCALL_BASE+ 11) | ||
40 | #define __NR_chdir (__NR_SYSCALL_BASE+ 12) | ||
41 | #define __NR_time (__NR_SYSCALL_BASE+ 13) | ||
42 | #define __NR_mknod (__NR_SYSCALL_BASE+ 14) | ||
43 | #define __NR_chmod (__NR_SYSCALL_BASE+ 15) | ||
44 | #define __NR_lchown (__NR_SYSCALL_BASE+ 16) | ||
45 | /* 17 was sys_break */ | ||
46 | /* 18 was sys_stat */ | ||
47 | #define __NR_lseek (__NR_SYSCALL_BASE+ 19) | ||
48 | #define __NR_getpid (__NR_SYSCALL_BASE+ 20) | ||
49 | #define __NR_mount (__NR_SYSCALL_BASE+ 21) | ||
50 | #define __NR_umount (__NR_SYSCALL_BASE+ 22) | ||
51 | #define __NR_setuid (__NR_SYSCALL_BASE+ 23) | ||
52 | #define __NR_getuid (__NR_SYSCALL_BASE+ 24) | ||
53 | #define __NR_stime (__NR_SYSCALL_BASE+ 25) | ||
54 | #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) | ||
55 | #define __NR_alarm (__NR_SYSCALL_BASE+ 27) | ||
56 | /* 28 was sys_fstat */ | ||
57 | #define __NR_pause (__NR_SYSCALL_BASE+ 29) | ||
58 | #define __NR_utime (__NR_SYSCALL_BASE+ 30) | ||
59 | /* 31 was sys_stty */ | ||
60 | /* 32 was sys_gtty */ | ||
61 | #define __NR_access (__NR_SYSCALL_BASE+ 33) | ||
62 | #define __NR_nice (__NR_SYSCALL_BASE+ 34) | ||
63 | /* 35 was sys_ftime */ | ||
64 | #define __NR_sync (__NR_SYSCALL_BASE+ 36) | ||
65 | #define __NR_kill (__NR_SYSCALL_BASE+ 37) | ||
66 | #define __NR_rename (__NR_SYSCALL_BASE+ 38) | ||
67 | #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) | ||
68 | #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) | ||
69 | #define __NR_dup (__NR_SYSCALL_BASE+ 41) | ||
70 | #define __NR_pipe (__NR_SYSCALL_BASE+ 42) | ||
71 | #define __NR_times (__NR_SYSCALL_BASE+ 43) | ||
72 | /* 44 was sys_prof */ | ||
73 | #define __NR_brk (__NR_SYSCALL_BASE+ 45) | ||
74 | #define __NR_setgid (__NR_SYSCALL_BASE+ 46) | ||
75 | #define __NR_getgid (__NR_SYSCALL_BASE+ 47) | ||
76 | /* 48 was sys_signal */ | ||
77 | #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) | ||
78 | #define __NR_getegid (__NR_SYSCALL_BASE+ 50) | ||
79 | #define __NR_acct (__NR_SYSCALL_BASE+ 51) | ||
80 | #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) | ||
81 | /* 53 was sys_lock */ | ||
82 | #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) | ||
83 | #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) | ||
84 | /* 56 was sys_mpx */ | ||
85 | #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) | ||
86 | /* 58 was sys_ulimit */ | ||
87 | /* 59 was sys_olduname */ | ||
88 | #define __NR_umask (__NR_SYSCALL_BASE+ 60) | ||
89 | #define __NR_chroot (__NR_SYSCALL_BASE+ 61) | ||
90 | #define __NR_ustat (__NR_SYSCALL_BASE+ 62) | ||
91 | #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) | ||
92 | #define __NR_getppid (__NR_SYSCALL_BASE+ 64) | ||
93 | #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) | ||
94 | #define __NR_setsid (__NR_SYSCALL_BASE+ 66) | ||
95 | #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) | ||
96 | /* 68 was sys_sgetmask */ | ||
97 | /* 69 was sys_ssetmask */ | ||
98 | #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) | ||
99 | #define __NR_setregid (__NR_SYSCALL_BASE+ 71) | ||
100 | #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) | ||
101 | #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) | ||
102 | #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) | ||
103 | #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) | ||
104 | #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ | ||
105 | #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) | ||
106 | #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) | ||
107 | #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) | ||
108 | #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) | ||
109 | #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) | ||
110 | #define __NR_select (__NR_SYSCALL_BASE+ 82) | ||
111 | #define __NR_symlink (__NR_SYSCALL_BASE+ 83) | ||
112 | /* 84 was sys_lstat */ | ||
113 | #define __NR_readlink (__NR_SYSCALL_BASE+ 85) | ||
114 | #define __NR_uselib (__NR_SYSCALL_BASE+ 86) | ||
115 | #define __NR_swapon (__NR_SYSCALL_BASE+ 87) | ||
116 | #define __NR_reboot (__NR_SYSCALL_BASE+ 88) | ||
117 | #define __NR_readdir (__NR_SYSCALL_BASE+ 89) | ||
118 | #define __NR_mmap (__NR_SYSCALL_BASE+ 90) | ||
119 | #define __NR_munmap (__NR_SYSCALL_BASE+ 91) | ||
120 | #define __NR_truncate (__NR_SYSCALL_BASE+ 92) | ||
121 | #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) | ||
122 | #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) | ||
123 | #define __NR_fchown (__NR_SYSCALL_BASE+ 95) | ||
124 | #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) | ||
125 | #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) | ||
126 | /* 98 was sys_profil */ | ||
127 | #define __NR_statfs (__NR_SYSCALL_BASE+ 99) | ||
128 | #define __NR_fstatfs (__NR_SYSCALL_BASE+100) | ||
129 | /* 101 was sys_ioperm */ | ||
130 | #define __NR_socketcall (__NR_SYSCALL_BASE+102) | ||
131 | #define __NR_syslog (__NR_SYSCALL_BASE+103) | ||
132 | #define __NR_setitimer (__NR_SYSCALL_BASE+104) | ||
133 | #define __NR_getitimer (__NR_SYSCALL_BASE+105) | ||
134 | #define __NR_stat (__NR_SYSCALL_BASE+106) | ||
135 | #define __NR_lstat (__NR_SYSCALL_BASE+107) | ||
136 | #define __NR_fstat (__NR_SYSCALL_BASE+108) | ||
137 | /* 109 was sys_uname */ | ||
138 | /* 110 was sys_iopl */ | ||
139 | #define __NR_vhangup (__NR_SYSCALL_BASE+111) | ||
140 | /* 112 was sys_idle */ | ||
141 | #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ | ||
142 | #define __NR_wait4 (__NR_SYSCALL_BASE+114) | ||
143 | #define __NR_swapoff (__NR_SYSCALL_BASE+115) | ||
144 | #define __NR_sysinfo (__NR_SYSCALL_BASE+116) | ||
145 | #define __NR_ipc (__NR_SYSCALL_BASE+117) | ||
146 | #define __NR_fsync (__NR_SYSCALL_BASE+118) | ||
147 | #define __NR_sigreturn (__NR_SYSCALL_BASE+119) | ||
148 | #define __NR_clone (__NR_SYSCALL_BASE+120) | ||
149 | #define __NR_setdomainname (__NR_SYSCALL_BASE+121) | ||
150 | #define __NR_uname (__NR_SYSCALL_BASE+122) | ||
151 | /* 123 was sys_modify_ldt */ | ||
152 | #define __NR_adjtimex (__NR_SYSCALL_BASE+124) | ||
153 | #define __NR_mprotect (__NR_SYSCALL_BASE+125) | ||
154 | #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) | ||
155 | /* 127 was sys_create_module */ | ||
156 | #define __NR_init_module (__NR_SYSCALL_BASE+128) | ||
157 | #define __NR_delete_module (__NR_SYSCALL_BASE+129) | ||
158 | /* 130 was sys_get_kernel_syms */ | ||
159 | #define __NR_quotactl (__NR_SYSCALL_BASE+131) | ||
160 | #define __NR_getpgid (__NR_SYSCALL_BASE+132) | ||
161 | #define __NR_fchdir (__NR_SYSCALL_BASE+133) | ||
162 | #define __NR_bdflush (__NR_SYSCALL_BASE+134) | ||
163 | #define __NR_sysfs (__NR_SYSCALL_BASE+135) | ||
164 | #define __NR_personality (__NR_SYSCALL_BASE+136) | ||
165 | /* 137 was sys_afs_syscall */ | ||
166 | #define __NR_setfsuid (__NR_SYSCALL_BASE+138) | ||
167 | #define __NR_setfsgid (__NR_SYSCALL_BASE+139) | ||
168 | #define __NR__llseek (__NR_SYSCALL_BASE+140) | ||
169 | #define __NR_getdents (__NR_SYSCALL_BASE+141) | ||
170 | #define __NR__newselect (__NR_SYSCALL_BASE+142) | ||
171 | #define __NR_flock (__NR_SYSCALL_BASE+143) | ||
172 | #define __NR_msync (__NR_SYSCALL_BASE+144) | ||
173 | #define __NR_readv (__NR_SYSCALL_BASE+145) | ||
174 | #define __NR_writev (__NR_SYSCALL_BASE+146) | ||
175 | #define __NR_getsid (__NR_SYSCALL_BASE+147) | ||
176 | #define __NR_fdatasync (__NR_SYSCALL_BASE+148) | ||
177 | #define __NR__sysctl (__NR_SYSCALL_BASE+149) | ||
178 | #define __NR_mlock (__NR_SYSCALL_BASE+150) | ||
179 | #define __NR_munlock (__NR_SYSCALL_BASE+151) | ||
180 | #define __NR_mlockall (__NR_SYSCALL_BASE+152) | ||
181 | #define __NR_munlockall (__NR_SYSCALL_BASE+153) | ||
182 | #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) | ||
183 | #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) | ||
184 | #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) | ||
185 | #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) | ||
186 | #define __NR_sched_yield (__NR_SYSCALL_BASE+158) | ||
187 | #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) | ||
188 | #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) | ||
189 | #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) | ||
190 | #define __NR_nanosleep (__NR_SYSCALL_BASE+162) | ||
191 | #define __NR_mremap (__NR_SYSCALL_BASE+163) | ||
192 | #define __NR_setresuid (__NR_SYSCALL_BASE+164) | ||
193 | #define __NR_getresuid (__NR_SYSCALL_BASE+165) | ||
194 | /* 166 was sys_vm86 */ | ||
195 | /* 167 was sys_query_module */ | ||
196 | #define __NR_poll (__NR_SYSCALL_BASE+168) | ||
197 | #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) | ||
198 | #define __NR_setresgid (__NR_SYSCALL_BASE+170) | ||
199 | #define __NR_getresgid (__NR_SYSCALL_BASE+171) | ||
200 | #define __NR_prctl (__NR_SYSCALL_BASE+172) | ||
201 | #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) | ||
202 | #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) | ||
203 | #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) | ||
204 | #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) | ||
205 | #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) | ||
206 | #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) | ||
207 | #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) | ||
208 | #define __NR_pread64 (__NR_SYSCALL_BASE+180) | ||
209 | #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) | ||
210 | #define __NR_chown (__NR_SYSCALL_BASE+182) | ||
211 | #define __NR_getcwd (__NR_SYSCALL_BASE+183) | ||
212 | #define __NR_capget (__NR_SYSCALL_BASE+184) | ||
213 | #define __NR_capset (__NR_SYSCALL_BASE+185) | ||
214 | #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) | ||
215 | #define __NR_sendfile (__NR_SYSCALL_BASE+187) | ||
216 | /* 188 reserved */ | ||
217 | /* 189 reserved */ | ||
218 | #define __NR_vfork (__NR_SYSCALL_BASE+190) | ||
219 | #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ | ||
220 | #define __NR_mmap2 (__NR_SYSCALL_BASE+192) | ||
221 | #define __NR_truncate64 (__NR_SYSCALL_BASE+193) | ||
222 | #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) | ||
223 | #define __NR_stat64 (__NR_SYSCALL_BASE+195) | ||
224 | #define __NR_lstat64 (__NR_SYSCALL_BASE+196) | ||
225 | #define __NR_fstat64 (__NR_SYSCALL_BASE+197) | ||
226 | #define __NR_lchown32 (__NR_SYSCALL_BASE+198) | ||
227 | #define __NR_getuid32 (__NR_SYSCALL_BASE+199) | ||
228 | #define __NR_getgid32 (__NR_SYSCALL_BASE+200) | ||
229 | #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) | ||
230 | #define __NR_getegid32 (__NR_SYSCALL_BASE+202) | ||
231 | #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) | ||
232 | #define __NR_setregid32 (__NR_SYSCALL_BASE+204) | ||
233 | #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) | ||
234 | #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) | ||
235 | #define __NR_fchown32 (__NR_SYSCALL_BASE+207) | ||
236 | #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) | ||
237 | #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) | ||
238 | #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) | ||
239 | #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) | ||
240 | #define __NR_chown32 (__NR_SYSCALL_BASE+212) | ||
241 | #define __NR_setuid32 (__NR_SYSCALL_BASE+213) | ||
242 | #define __NR_setgid32 (__NR_SYSCALL_BASE+214) | ||
243 | #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) | ||
244 | #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) | ||
245 | #define __NR_getdents64 (__NR_SYSCALL_BASE+217) | ||
246 | #define __NR_pivot_root (__NR_SYSCALL_BASE+218) | ||
247 | #define __NR_mincore (__NR_SYSCALL_BASE+219) | ||
248 | #define __NR_madvise (__NR_SYSCALL_BASE+220) | ||
249 | #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) | ||
250 | /* 222 for tux */ | ||
251 | /* 223 is unused */ | ||
252 | #define __NR_gettid (__NR_SYSCALL_BASE+224) | ||
253 | #define __NR_readahead (__NR_SYSCALL_BASE+225) | ||
254 | #define __NR_setxattr (__NR_SYSCALL_BASE+226) | ||
255 | #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) | ||
256 | #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) | ||
257 | #define __NR_getxattr (__NR_SYSCALL_BASE+229) | ||
258 | #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) | ||
259 | #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) | ||
260 | #define __NR_listxattr (__NR_SYSCALL_BASE+232) | ||
261 | #define __NR_llistxattr (__NR_SYSCALL_BASE+233) | ||
262 | #define __NR_flistxattr (__NR_SYSCALL_BASE+234) | ||
263 | #define __NR_removexattr (__NR_SYSCALL_BASE+235) | ||
264 | #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) | ||
265 | #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) | ||
266 | #define __NR_tkill (__NR_SYSCALL_BASE+238) | ||
267 | #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) | ||
268 | #define __NR_futex (__NR_SYSCALL_BASE+240) | ||
269 | #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) | ||
270 | #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) | ||
271 | #define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
272 | #define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
273 | #define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
274 | #define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
275 | #define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
276 | #define __NR_exit_group (__NR_SYSCALL_BASE+248) | ||
277 | #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) | ||
278 | #define __NR_epoll_create (__NR_SYSCALL_BASE+250) | ||
279 | #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) | ||
280 | #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) | ||
281 | #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) | ||
282 | /* 254 for set_thread_area */ | ||
283 | /* 255 for get_thread_area */ | ||
284 | #define __NR_set_tid_address (__NR_SYSCALL_BASE+256) | ||
285 | #define __NR_timer_create (__NR_SYSCALL_BASE+257) | ||
286 | #define __NR_timer_settime (__NR_SYSCALL_BASE+258) | ||
287 | #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) | ||
288 | #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) | ||
289 | #define __NR_timer_delete (__NR_SYSCALL_BASE+261) | ||
290 | #define __NR_clock_settime (__NR_SYSCALL_BASE+262) | ||
291 | #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) | ||
292 | #define __NR_clock_getres (__NR_SYSCALL_BASE+264) | ||
293 | #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) | ||
294 | #define __NR_statfs64 (__NR_SYSCALL_BASE+266) | ||
295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | ||
296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | ||
297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | ||
298 | #define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) | ||
299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | ||
300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | ||
301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | ||
302 | #define __NR_mq_open (__NR_SYSCALL_BASE+274) | ||
303 | #define __NR_mq_unlink (__NR_SYSCALL_BASE+275) | ||
304 | #define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) | ||
305 | #define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) | ||
306 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | ||
307 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | ||
308 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | ||
309 | #define __NR_socket (__NR_SYSCALL_BASE+281) | ||
310 | #define __NR_bind (__NR_SYSCALL_BASE+282) | ||
311 | #define __NR_connect (__NR_SYSCALL_BASE+283) | ||
312 | #define __NR_listen (__NR_SYSCALL_BASE+284) | ||
313 | #define __NR_accept (__NR_SYSCALL_BASE+285) | ||
314 | #define __NR_getsockname (__NR_SYSCALL_BASE+286) | ||
315 | #define __NR_getpeername (__NR_SYSCALL_BASE+287) | ||
316 | #define __NR_socketpair (__NR_SYSCALL_BASE+288) | ||
317 | #define __NR_send (__NR_SYSCALL_BASE+289) | ||
318 | #define __NR_sendto (__NR_SYSCALL_BASE+290) | ||
319 | #define __NR_recv (__NR_SYSCALL_BASE+291) | ||
320 | #define __NR_recvfrom (__NR_SYSCALL_BASE+292) | ||
321 | #define __NR_shutdown (__NR_SYSCALL_BASE+293) | ||
322 | #define __NR_setsockopt (__NR_SYSCALL_BASE+294) | ||
323 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) | ||
324 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) | ||
325 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | ||
326 | #define __NR_semop (__NR_SYSCALL_BASE+298) | ||
327 | #define __NR_semget (__NR_SYSCALL_BASE+299) | ||
328 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | ||
329 | #define __NR_msgsnd (__NR_SYSCALL_BASE+301) | ||
330 | #define __NR_msgrcv (__NR_SYSCALL_BASE+302) | ||
331 | #define __NR_msgget (__NR_SYSCALL_BASE+303) | ||
332 | #define __NR_msgctl (__NR_SYSCALL_BASE+304) | ||
333 | #define __NR_shmat (__NR_SYSCALL_BASE+305) | ||
334 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) | ||
335 | #define __NR_shmget (__NR_SYSCALL_BASE+307) | ||
336 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) | ||
337 | #define __NR_add_key (__NR_SYSCALL_BASE+309) | ||
338 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | ||
339 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | ||
340 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | ||
341 | #define __NR_vserver (__NR_SYSCALL_BASE+313) | ||
342 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) | ||
343 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) | ||
344 | #define __NR_inotify_init (__NR_SYSCALL_BASE+316) | ||
345 | #define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) | ||
346 | #define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) | ||
347 | #define __NR_mbind (__NR_SYSCALL_BASE+319) | ||
348 | #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) | ||
349 | #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) | ||
350 | #define __NR_openat (__NR_SYSCALL_BASE+322) | ||
351 | #define __NR_mkdirat (__NR_SYSCALL_BASE+323) | ||
352 | #define __NR_mknodat (__NR_SYSCALL_BASE+324) | ||
353 | #define __NR_fchownat (__NR_SYSCALL_BASE+325) | ||
354 | #define __NR_futimesat (__NR_SYSCALL_BASE+326) | ||
355 | #define __NR_fstatat64 (__NR_SYSCALL_BASE+327) | ||
356 | #define __NR_unlinkat (__NR_SYSCALL_BASE+328) | ||
357 | #define __NR_renameat (__NR_SYSCALL_BASE+329) | ||
358 | #define __NR_linkat (__NR_SYSCALL_BASE+330) | ||
359 | #define __NR_symlinkat (__NR_SYSCALL_BASE+331) | ||
360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) | ||
361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) | ||
362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) | ||
363 | #define __NR_pselect6 (__NR_SYSCALL_BASE+335) | ||
364 | #define __NR_ppoll (__NR_SYSCALL_BASE+336) | ||
365 | #define __NR_unshare (__NR_SYSCALL_BASE+337) | ||
366 | #define __NR_set_robust_list (__NR_SYSCALL_BASE+338) | ||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | ||
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | ||
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | ||
370 | #define __NR_sync_file_range2 __NR_arm_sync_file_range | ||
371 | #define __NR_tee (__NR_SYSCALL_BASE+342) | ||
372 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | ||
373 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | ||
374 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | ||
375 | #define __NR_epoll_pwait (__NR_SYSCALL_BASE+346) | ||
376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) | ||
377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) | ||
378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) | ||
379 | #define __NR_timerfd_create (__NR_SYSCALL_BASE+350) | ||
380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) | ||
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | ||
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | ||
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | ||
384 | #define __NR_signalfd4 (__NR_SYSCALL_BASE+355) | ||
385 | #define __NR_eventfd2 (__NR_SYSCALL_BASE+356) | ||
386 | #define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) | ||
387 | #define __NR_dup3 (__NR_SYSCALL_BASE+358) | ||
388 | #define __NR_pipe2 (__NR_SYSCALL_BASE+359) | ||
389 | #define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) | ||
390 | #define __NR_preadv (__NR_SYSCALL_BASE+361) | ||
391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) | ||
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | ||
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | ||
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
395 | #define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) | ||
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | ||
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | ||
399 | #define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) | ||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | ||
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | ||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | ||
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | ||
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | ||
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | ||
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | ||
407 | |||
408 | /* | ||
409 | * The following SWIs are ARM private. | ||
410 | */ | ||
411 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | ||
412 | #define __ARM_NR_breakpoint (__ARM_NR_BASE+1) | ||
413 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | ||
414 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | ||
415 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | ||
416 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | ||
417 | |||
418 | /* | ||
419 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | ||
420 | * __kuser_cmpxchg code in entry-armv.S should be aware of its | ||
421 | * existence. Don't ever use this from user code. | ||
422 | */ | ||
423 | #ifdef __KERNEL__ | ||
424 | #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) | 19 | #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) |
425 | #endif | ||
426 | |||
427 | /* | ||
428 | * The following syscalls are obsolete and no longer available for EABI. | ||
429 | */ | ||
430 | #if !defined(__KERNEL__) | ||
431 | #if defined(__ARM_EABI__) | ||
432 | #undef __NR_time | ||
433 | #undef __NR_umount | ||
434 | #undef __NR_stime | ||
435 | #undef __NR_alarm | ||
436 | #undef __NR_utime | ||
437 | #undef __NR_getrlimit | ||
438 | #undef __NR_select | ||
439 | #undef __NR_readdir | ||
440 | #undef __NR_mmap | ||
441 | #undef __NR_socketcall | ||
442 | #undef __NR_syscall | ||
443 | #undef __NR_ipc | ||
444 | #endif | ||
445 | #endif | ||
446 | |||
447 | #ifdef __KERNEL__ | ||
448 | 20 | ||
449 | #define __ARCH_WANT_STAT64 | 21 | #define __ARCH_WANT_STAT64 |
450 | #define __ARCH_WANT_SYS_GETHOSTNAME | 22 | #define __ARCH_WANT_SYS_GETHOSTNAME |
@@ -469,6 +41,7 @@ | |||
469 | #define __ARCH_WANT_OLD_READDIR | 41 | #define __ARCH_WANT_OLD_READDIR |
470 | #define __ARCH_WANT_SYS_SOCKETCALL | 42 | #define __ARCH_WANT_SYS_SOCKETCALL |
471 | #endif | 43 | #endif |
44 | #define __ARCH_WANT_SYS_EXECVE | ||
472 | 45 | ||
473 | /* | 46 | /* |
474 | * "Conditional" syscalls | 47 | * "Conditional" syscalls |
@@ -483,6 +56,6 @@ | |||
483 | */ | 56 | */ |
484 | #define __IGNORE_fadvise64_64 | 57 | #define __IGNORE_fadvise64_64 |
485 | #define __IGNORE_migrate_pages | 58 | #define __IGNORE_migrate_pages |
59 | #define __IGNORE_kcmp | ||
486 | 60 | ||
487 | #endif /* __KERNEL__ */ | ||
488 | #endif /* __ASM_ARM_UNISTD_H */ | 61 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index 3d5fc41ae8d3..6a6f1e485f41 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <asm/hwcap.h> | 6 | #include <asm/hwcap.h> |
7 | 7 | ||
8 | #include "vfp.h" | 8 | #include <asm/vfp.h> |
9 | 9 | ||
10 | @ Macros to allow building with old toolkits (with no VFP support) | 10 | @ Macros to allow building with old toolkits (with no VFP support) |
11 | .macro VFPFMRX, rd, sysreg, cond | 11 | .macro VFPFMRX, rd, sysreg, cond |
@@ -28,7 +28,7 @@ | |||
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
29 | ldr \tmp, [\tmp, #0] | 29 | ldr \tmp, [\tmp, #0] |
30 | tst \tmp, #HWCAP_VFPv3D16 | 30 | tst \tmp, #HWCAP_VFPv3D16 |
31 | ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 31 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
32 | addne \base, \base, #32*4 @ step over unused register space | 32 | addne \base, \base, #32*4 @ step over unused register space |
33 | #else | 33 | #else |
34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
@@ -52,7 +52,7 @@ | |||
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
53 | ldr \tmp, [\tmp, #0] | 53 | ldr \tmp, [\tmp, #0] |
54 | tst \tmp, #HWCAP_VFPv3D16 | 54 | tst \tmp, #HWCAP_VFPv3D16 |
55 | stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 55 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
56 | addne \base, \base, #32*4 @ step over unused register space | 56 | addne \base, \base, #32*4 @ step over unused register space |
57 | #else | 57 | #else |
58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h new file mode 100644 index 000000000000..86164df86cb4 --- /dev/null +++ b/arch/arm/include/asm/virt.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012 Linaro Limited. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef VIRT_H | ||
20 | #define VIRT_H | ||
21 | |||
22 | #include <asm/ptrace.h> | ||
23 | |||
24 | /* | ||
25 | * Flag indicating that the kernel was not entered in the same mode on every | ||
26 | * CPU. The zImage loader stashes this value in an SPSR, so we need an | ||
27 | * architecturally defined flag bit here (the N flag, as it happens) | ||
28 | */ | ||
29 | #define BOOT_CPU_MODE_MISMATCH (1<<31) | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #ifdef CONFIG_ARM_VIRT_EXT | ||
34 | /* | ||
35 | * __boot_cpu_mode records what mode the primary CPU was booted in. | ||
36 | * A correctly-implemented bootloader must start all CPUs in the same mode: | ||
37 | * if it fails to do this, the flag BOOT_CPU_MODE_MISMATCH is set to indicate | ||
38 | * that some CPU(s) were booted in a different mode. | ||
39 | * | ||
40 | * This allows the kernel to flag an error when the secondaries have come up. | ||
41 | */ | ||
42 | extern int __boot_cpu_mode; | ||
43 | |||
44 | void __hyp_set_vectors(unsigned long phys_vector_base); | ||
45 | unsigned long __hyp_get_vectors(void); | ||
46 | #else | ||
47 | #define __boot_cpu_mode (SVC_MODE) | ||
48 | #endif | ||
49 | |||
50 | #ifndef ZIMAGE | ||
51 | void hyp_mode_check(void); | ||
52 | |||
53 | /* Reports the availability of HYP mode */ | ||
54 | static inline bool is_hyp_mode_available(void) | ||
55 | { | ||
56 | return ((__boot_cpu_mode & MODE_MASK) == HYP_MODE && | ||
57 | !(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH)); | ||
58 | } | ||
59 | |||
60 | /* Check if the bootloader has booted CPUs in different modes */ | ||
61 | static inline bool is_hyp_mode_mismatched(void) | ||
62 | { | ||
63 | return !!(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH); | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | #endif /* __ASSEMBLY__ */ | ||
68 | |||
69 | #endif /* ! VIRT_H */ | ||
diff --git a/arch/arm/include/debug/highbank.S b/arch/arm/include/debug/highbank.S new file mode 100644 index 000000000000..8cad4322a5a2 --- /dev/null +++ b/arch/arm/include/debug/highbank.S | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | .macro addruart,rp,rv,tmp | ||
13 | ldr \rv, =0xfee36000 | ||
14 | ldr \rp, =0xfff36000 | ||
15 | .endm | ||
16 | |||
17 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/icedcc.S b/arch/arm/include/debug/icedcc.S new file mode 100644 index 000000000000..43afcb021fa3 --- /dev/null +++ b/arch/arm/include/debug/icedcc.S | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * arch/arm/include/debug/icedcc.S | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | @@ debug using ARM EmbeddedICE DCC channel | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | .endm | ||
16 | |||
17 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) | ||
18 | |||
19 | .macro senduart, rd, rx | ||
20 | mcr p14, 0, \rd, c0, c5, 0 | ||
21 | .endm | ||
22 | |||
23 | .macro busyuart, rd, rx | ||
24 | 1001: | ||
25 | mrc p14, 0, \rx, c0, c1, 0 | ||
26 | tst \rx, #0x20000000 | ||
27 | beq 1001b | ||
28 | .endm | ||
29 | |||
30 | .macro waituart, rd, rx | ||
31 | mov \rd, #0x2000000 | ||
32 | 1001: | ||
33 | subs \rd, \rd, #1 | ||
34 | bmi 1002f | ||
35 | mrc p14, 0, \rx, c0, c1, 0 | ||
36 | tst \rx, #0x20000000 | ||
37 | bne 1001b | ||
38 | 1002: | ||
39 | .endm | ||
40 | |||
41 | #elif defined(CONFIG_CPU_XSCALE) | ||
42 | |||
43 | .macro senduart, rd, rx | ||
44 | mcr p14, 0, \rd, c8, c0, 0 | ||
45 | .endm | ||
46 | |||
47 | .macro busyuart, rd, rx | ||
48 | 1001: | ||
49 | mrc p14, 0, \rx, c14, c0, 0 | ||
50 | tst \rx, #0x10000000 | ||
51 | beq 1001b | ||
52 | .endm | ||
53 | |||
54 | .macro waituart, rd, rx | ||
55 | mov \rd, #0x10000000 | ||
56 | 1001: | ||
57 | subs \rd, \rd, #1 | ||
58 | bmi 1002f | ||
59 | mrc p14, 0, \rx, c14, c0, 0 | ||
60 | tst \rx, #0x10000000 | ||
61 | bne 1001b | ||
62 | 1002: | ||
63 | .endm | ||
64 | |||
65 | #else | ||
66 | |||
67 | .macro senduart, rd, rx | ||
68 | mcr p14, 0, \rd, c1, c0, 0 | ||
69 | .endm | ||
70 | |||
71 | .macro busyuart, rd, rx | ||
72 | 1001: | ||
73 | mrc p14, 0, \rx, c0, c0, 0 | ||
74 | tst \rx, #2 | ||
75 | beq 1001b | ||
76 | |||
77 | .endm | ||
78 | |||
79 | .macro waituart, rd, rx | ||
80 | mov \rd, #0x2000000 | ||
81 | 1001: | ||
82 | subs \rd, \rd, #1 | ||
83 | bmi 1002f | ||
84 | mrc p14, 0, \rx, c0, c0, 0 | ||
85 | tst \rx, #2 | ||
86 | bne 1001b | ||
87 | 1002: | ||
88 | .endm | ||
89 | |||
90 | #endif /* CONFIG_CPU_V6 */ | ||
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S new file mode 100644 index 000000000000..865c6d02b332 --- /dev/null +++ b/arch/arm/include/debug/mvebu.S | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Marvell SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Lior Amsalem <alior@marvell.com> | ||
7 | * Gregory Clement <gregory.clement@free-electrons.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | ||
15 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfeb00000 | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE | ||
19 | ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE | ||
20 | orr \rp, \rp, #0x00012000 | ||
21 | orr \rv, \rv, #0x00012000 | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S new file mode 100644 index 000000000000..7419deb1b948 --- /dev/null +++ b/arch/arm/include/debug/picoxcell.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | #include <linux/serial_reg.h> | ||
12 | |||
13 | #define UART_SHIFT 2 | ||
14 | #define PICOXCELL_UART1_BASE 0x80230000 | ||
15 | #define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) | ||
19 | ldr \rp, =PICOXCELL_UART1_BASE | ||
20 | .endm | ||
21 | |||
22 | .macro senduart,rd,rx | ||
23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
30 | bne 1002b | ||
31 | .endm | ||
32 | |||
33 | /* The UART's don't have any flow control IO's wired up. */ | ||
34 | .macro waituart,rd,rx | ||
35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S new file mode 100644 index 000000000000..d6f26d23374f --- /dev/null +++ b/arch/arm/include/debug/socfpga.S | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1994-1999 Russell King | ||
3 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | .macro addruart, rp, rv, tmp | ||
11 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
12 | orr \rp, \rp, #0x00c00000 | ||
13 | orr \rv, \rp, #0xfe000000 @ virtual base | ||
14 | orr \rp, \rp, #0xff000000 @ physical base | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S new file mode 100644 index 000000000000..9f509f55d078 --- /dev/null +++ b/arch/arm/include/debug/vexpress.S | |||
@@ -0,0 +1,84 @@ | |||
1 | /* arch/arm/mach-realview/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #define DEBUG_LL_PHYS_BASE 0x10000000 | ||
14 | #define DEBUG_LL_UART_OFFSET 0x00009000 | ||
15 | |||
16 | #define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 | ||
17 | #define DEBUG_LL_UART_OFFSET_RS1 0x00090000 | ||
18 | |||
19 | #define DEBUG_LL_VIRT_BASE 0xf8000000 | ||
20 | |||
21 | #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) | ||
22 | |||
23 | .macro addruart,rp,rv,tmp | ||
24 | |||
25 | @ Make an educated guess regarding the memory map: | ||
26 | @ - the original A9 core tile, which has MPCore peripherals | ||
27 | @ located at 0x1e000000, should use UART at 0x10009000 | ||
28 | @ - all other (RS1 complaint) tiles use UART mapped | ||
29 | @ at 0x1c090000 | ||
30 | mrc p15, 4, \tmp, c15, c0, 0 | ||
31 | cmp \tmp, #0x1e000000 | ||
32 | |||
33 | @ Original memory map | ||
34 | moveq \rp, #DEBUG_LL_UART_OFFSET | ||
35 | orreq \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
36 | orreq \rp, \rp, #DEBUG_LL_PHYS_BASE | ||
37 | |||
38 | @ RS1 memory map | ||
39 | movne \rp, #DEBUG_LL_UART_OFFSET_RS1 | ||
40 | orrne \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
41 | orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 | ||
42 | |||
43 | .endm | ||
44 | |||
45 | #include <asm/hardware/debug-pl01x.S> | ||
46 | |||
47 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) | ||
48 | |||
49 | .macro addruart,rp,rv,tmp | ||
50 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
51 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
52 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE | ||
53 | .endm | ||
54 | |||
55 | #include <asm/hardware/debug-pl01x.S> | ||
56 | |||
57 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) | ||
58 | |||
59 | .macro addruart,rp,rv,tmp | ||
60 | mov \rp, #DEBUG_LL_UART_OFFSET_RS1 | ||
61 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
62 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 | ||
63 | .endm | ||
64 | |||
65 | #include <asm/hardware/debug-pl01x.S> | ||
66 | |||
67 | #else /* CONFIG_DEBUG_LL_UART_NONE */ | ||
68 | |||
69 | .macro addruart, rp, rv, tmp | ||
70 | /* Safe dummy values */ | ||
71 | mov \rp, #0 | ||
72 | mov \rv, #DEBUG_LL_VIRT_BASE | ||
73 | .endm | ||
74 | |||
75 | .macro senduart,rd,rx | ||
76 | .endm | ||
77 | |||
78 | .macro waituart,rd,rx | ||
79 | .endm | ||
80 | |||
81 | .macro busyuart,rd,rx | ||
82 | .endm | ||
83 | |||
84 | #endif | ||
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild new file mode 100644 index 000000000000..47bcb2d254af --- /dev/null +++ b/arch/arm/include/uapi/asm/Kbuild | |||
@@ -0,0 +1,19 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||
4 | header-y += a.out.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += fcntl.h | ||
7 | header-y += hwcap.h | ||
8 | header-y += ioctls.h | ||
9 | header-y += kvm_para.h | ||
10 | header-y += mman.h | ||
11 | header-y += posix_types.h | ||
12 | header-y += ptrace.h | ||
13 | header-y += setup.h | ||
14 | header-y += sigcontext.h | ||
15 | header-y += signal.h | ||
16 | header-y += stat.h | ||
17 | header-y += statfs.h | ||
18 | header-y += swab.h | ||
19 | header-y += unistd.h | ||
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/uapi/asm/a.out.h index 083894b2e3bc..083894b2e3bc 100644 --- a/arch/arm/include/asm/a.out.h +++ b/arch/arm/include/uapi/asm/a.out.h | |||
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/uapi/asm/byteorder.h index 77379748b171..77379748b171 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/uapi/asm/byteorder.h | |||
diff --git a/arch/arm/include/asm/fcntl.h b/arch/arm/include/uapi/asm/fcntl.h index a80b6607b2ef..a80b6607b2ef 100644 --- a/arch/arm/include/asm/fcntl.h +++ b/arch/arm/include/uapi/asm/fcntl.h | |||
diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h new file mode 100644 index 000000000000..f254f6503cce --- /dev/null +++ b/arch/arm/include/uapi/asm/hwcap.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef _UAPI__ASMARM_HWCAP_H | ||
2 | #define _UAPI__ASMARM_HWCAP_H | ||
3 | |||
4 | /* | ||
5 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
6 | */ | ||
7 | #define HWCAP_SWP (1 << 0) | ||
8 | #define HWCAP_HALF (1 << 1) | ||
9 | #define HWCAP_THUMB (1 << 2) | ||
10 | #define HWCAP_26BIT (1 << 3) /* Play it safe */ | ||
11 | #define HWCAP_FAST_MULT (1 << 4) | ||
12 | #define HWCAP_FPA (1 << 5) | ||
13 | #define HWCAP_VFP (1 << 6) | ||
14 | #define HWCAP_EDSP (1 << 7) | ||
15 | #define HWCAP_JAVA (1 << 8) | ||
16 | #define HWCAP_IWMMXT (1 << 9) | ||
17 | #define HWCAP_CRUNCH (1 << 10) | ||
18 | #define HWCAP_THUMBEE (1 << 11) | ||
19 | #define HWCAP_NEON (1 << 12) | ||
20 | #define HWCAP_VFPv3 (1 << 13) | ||
21 | #define HWCAP_VFPv3D16 (1 << 14) | ||
22 | #define HWCAP_TLS (1 << 15) | ||
23 | #define HWCAP_VFPv4 (1 << 16) | ||
24 | #define HWCAP_IDIVA (1 << 17) | ||
25 | #define HWCAP_IDIVT (1 << 18) | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | ||
27 | |||
28 | |||
29 | #endif /* _UAPI__ASMARM_HWCAP_H */ | ||
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/uapi/asm/ioctls.h index 9c9629816128..9c9629816128 100644 --- a/arch/arm/include/asm/ioctls.h +++ b/arch/arm/include/uapi/asm/ioctls.h | |||
diff --git a/arch/arm/include/asm/kvm_para.h b/arch/arm/include/uapi/asm/kvm_para.h index 14fab8f0b957..14fab8f0b957 100644 --- a/arch/arm/include/asm/kvm_para.h +++ b/arch/arm/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/uapi/asm/mman.h index 41f99c573b93..41f99c573b93 100644 --- a/arch/arm/include/asm/mman.h +++ b/arch/arm/include/uapi/asm/mman.h | |||
diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/uapi/asm/posix_types.h index d2de9cbbcd9b..d2de9cbbcd9b 100644 --- a/arch/arm/include/asm/posix_types.h +++ b/arch/arm/include/uapi/asm/posix_types.h | |||
diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..96ee0929790f --- /dev/null +++ b/arch/arm/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/ptrace.h | ||
3 | * | ||
4 | * Copyright (C) 1996-2003 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _UAPI__ASM_ARM_PTRACE_H | ||
11 | #define _UAPI__ASM_ARM_PTRACE_H | ||
12 | |||
13 | #include <asm/hwcap.h> | ||
14 | |||
15 | #define PTRACE_GETREGS 12 | ||
16 | #define PTRACE_SETREGS 13 | ||
17 | #define PTRACE_GETFPREGS 14 | ||
18 | #define PTRACE_SETFPREGS 15 | ||
19 | /* PTRACE_ATTACH is 16 */ | ||
20 | /* PTRACE_DETACH is 17 */ | ||
21 | #define PTRACE_GETWMMXREGS 18 | ||
22 | #define PTRACE_SETWMMXREGS 19 | ||
23 | /* 20 is unused */ | ||
24 | #define PTRACE_OLDSETOPTIONS 21 | ||
25 | #define PTRACE_GET_THREAD_AREA 22 | ||
26 | #define PTRACE_SET_SYSCALL 23 | ||
27 | /* PTRACE_SYSCALL is 24 */ | ||
28 | #define PTRACE_GETCRUNCHREGS 25 | ||
29 | #define PTRACE_SETCRUNCHREGS 26 | ||
30 | #define PTRACE_GETVFPREGS 27 | ||
31 | #define PTRACE_SETVFPREGS 28 | ||
32 | #define PTRACE_GETHBPREGS 29 | ||
33 | #define PTRACE_SETHBPREGS 30 | ||
34 | |||
35 | /* | ||
36 | * PSR bits | ||
37 | */ | ||
38 | #define USR26_MODE 0x00000000 | ||
39 | #define FIQ26_MODE 0x00000001 | ||
40 | #define IRQ26_MODE 0x00000002 | ||
41 | #define SVC26_MODE 0x00000003 | ||
42 | #define USR_MODE 0x00000010 | ||
43 | #define FIQ_MODE 0x00000011 | ||
44 | #define IRQ_MODE 0x00000012 | ||
45 | #define SVC_MODE 0x00000013 | ||
46 | #define ABT_MODE 0x00000017 | ||
47 | #define HYP_MODE 0x0000001a | ||
48 | #define UND_MODE 0x0000001b | ||
49 | #define SYSTEM_MODE 0x0000001f | ||
50 | #define MODE32_BIT 0x00000010 | ||
51 | #define MODE_MASK 0x0000001f | ||
52 | #define PSR_T_BIT 0x00000020 | ||
53 | #define PSR_F_BIT 0x00000040 | ||
54 | #define PSR_I_BIT 0x00000080 | ||
55 | #define PSR_A_BIT 0x00000100 | ||
56 | #define PSR_E_BIT 0x00000200 | ||
57 | #define PSR_J_BIT 0x01000000 | ||
58 | #define PSR_Q_BIT 0x08000000 | ||
59 | #define PSR_V_BIT 0x10000000 | ||
60 | #define PSR_C_BIT 0x20000000 | ||
61 | #define PSR_Z_BIT 0x40000000 | ||
62 | #define PSR_N_BIT 0x80000000 | ||
63 | |||
64 | /* | ||
65 | * Groups of PSR bits | ||
66 | */ | ||
67 | #define PSR_f 0xff000000 /* Flags */ | ||
68 | #define PSR_s 0x00ff0000 /* Status */ | ||
69 | #define PSR_x 0x0000ff00 /* Extension */ | ||
70 | #define PSR_c 0x000000ff /* Control */ | ||
71 | |||
72 | /* | ||
73 | * ARMv7 groups of PSR bits | ||
74 | */ | ||
75 | #define APSR_MASK 0xf80f0000 /* N, Z, C, V, Q and GE flags */ | ||
76 | #define PSR_ISET_MASK 0x01000010 /* ISA state (J, T) mask */ | ||
77 | #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | ||
78 | #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ | ||
79 | |||
80 | /* | ||
81 | * Default endianness state | ||
82 | */ | ||
83 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
84 | #define PSR_ENDSTATE PSR_E_BIT | ||
85 | #else | ||
86 | #define PSR_ENDSTATE 0 | ||
87 | #endif | ||
88 | |||
89 | /* | ||
90 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | ||
91 | * process is located in memory. | ||
92 | */ | ||
93 | #define PT_TEXT_ADDR 0x10000 | ||
94 | #define PT_DATA_ADDR 0x10004 | ||
95 | #define PT_TEXT_END_ADDR 0x10008 | ||
96 | |||
97 | #ifndef __ASSEMBLY__ | ||
98 | |||
99 | /* | ||
100 | * This struct defines the way the registers are stored on the | ||
101 | * stack during a system call. Note that sizeof(struct pt_regs) | ||
102 | * has to be a multiple of 8. | ||
103 | */ | ||
104 | #ifndef __KERNEL__ | ||
105 | struct pt_regs { | ||
106 | long uregs[18]; | ||
107 | }; | ||
108 | #endif /* __KERNEL__ */ | ||
109 | |||
110 | #define ARM_cpsr uregs[16] | ||
111 | #define ARM_pc uregs[15] | ||
112 | #define ARM_lr uregs[14] | ||
113 | #define ARM_sp uregs[13] | ||
114 | #define ARM_ip uregs[12] | ||
115 | #define ARM_fp uregs[11] | ||
116 | #define ARM_r10 uregs[10] | ||
117 | #define ARM_r9 uregs[9] | ||
118 | #define ARM_r8 uregs[8] | ||
119 | #define ARM_r7 uregs[7] | ||
120 | #define ARM_r6 uregs[6] | ||
121 | #define ARM_r5 uregs[5] | ||
122 | #define ARM_r4 uregs[4] | ||
123 | #define ARM_r3 uregs[3] | ||
124 | #define ARM_r2 uregs[2] | ||
125 | #define ARM_r1 uregs[1] | ||
126 | #define ARM_r0 uregs[0] | ||
127 | #define ARM_ORIG_r0 uregs[17] | ||
128 | |||
129 | /* | ||
130 | * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS | ||
131 | * and core dumps. | ||
132 | */ | ||
133 | #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) | ||
134 | |||
135 | |||
136 | #endif /* __ASSEMBLY__ */ | ||
137 | |||
138 | #endif /* _UAPI__ASM_ARM_PTRACE_H */ | ||
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h new file mode 100644 index 000000000000..979ff4016404 --- /dev/null +++ b/arch/arm/include/uapi/asm/setup.h | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * linux/include/asm/setup.h | ||
3 | * | ||
4 | * Copyright (C) 1997-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Structure passed to kernel to tell it about the | ||
11 | * hardware it's running on. See Documentation/arm/Setup | ||
12 | * for more info. | ||
13 | */ | ||
14 | #ifndef _UAPI__ASMARM_SETUP_H | ||
15 | #define _UAPI__ASMARM_SETUP_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | |||
19 | #define COMMAND_LINE_SIZE 1024 | ||
20 | |||
21 | /* The list ends with an ATAG_NONE node. */ | ||
22 | #define ATAG_NONE 0x00000000 | ||
23 | |||
24 | struct tag_header { | ||
25 | __u32 size; | ||
26 | __u32 tag; | ||
27 | }; | ||
28 | |||
29 | /* The list must start with an ATAG_CORE node */ | ||
30 | #define ATAG_CORE 0x54410001 | ||
31 | |||
32 | struct tag_core { | ||
33 | __u32 flags; /* bit 0 = read-only */ | ||
34 | __u32 pagesize; | ||
35 | __u32 rootdev; | ||
36 | }; | ||
37 | |||
38 | /* it is allowed to have multiple ATAG_MEM nodes */ | ||
39 | #define ATAG_MEM 0x54410002 | ||
40 | |||
41 | struct tag_mem32 { | ||
42 | __u32 size; | ||
43 | __u32 start; /* physical start address */ | ||
44 | }; | ||
45 | |||
46 | /* VGA text type displays */ | ||
47 | #define ATAG_VIDEOTEXT 0x54410003 | ||
48 | |||
49 | struct tag_videotext { | ||
50 | __u8 x; | ||
51 | __u8 y; | ||
52 | __u16 video_page; | ||
53 | __u8 video_mode; | ||
54 | __u8 video_cols; | ||
55 | __u16 video_ega_bx; | ||
56 | __u8 video_lines; | ||
57 | __u8 video_isvga; | ||
58 | __u16 video_points; | ||
59 | }; | ||
60 | |||
61 | /* describes how the ramdisk will be used in kernel */ | ||
62 | #define ATAG_RAMDISK 0x54410004 | ||
63 | |||
64 | struct tag_ramdisk { | ||
65 | __u32 flags; /* bit 0 = load, bit 1 = prompt */ | ||
66 | __u32 size; /* decompressed ramdisk size in _kilo_ bytes */ | ||
67 | __u32 start; /* starting block of floppy-based RAM disk image */ | ||
68 | }; | ||
69 | |||
70 | /* describes where the compressed ramdisk image lives (virtual address) */ | ||
71 | /* | ||
72 | * this one accidentally used virtual addresses - as such, | ||
73 | * it's deprecated. | ||
74 | */ | ||
75 | #define ATAG_INITRD 0x54410005 | ||
76 | |||
77 | /* describes where the compressed ramdisk image lives (physical address) */ | ||
78 | #define ATAG_INITRD2 0x54420005 | ||
79 | |||
80 | struct tag_initrd { | ||
81 | __u32 start; /* physical start address */ | ||
82 | __u32 size; /* size of compressed ramdisk image in bytes */ | ||
83 | }; | ||
84 | |||
85 | /* board serial number. "64 bits should be enough for everybody" */ | ||
86 | #define ATAG_SERIAL 0x54410006 | ||
87 | |||
88 | struct tag_serialnr { | ||
89 | __u32 low; | ||
90 | __u32 high; | ||
91 | }; | ||
92 | |||
93 | /* board revision */ | ||
94 | #define ATAG_REVISION 0x54410007 | ||
95 | |||
96 | struct tag_revision { | ||
97 | __u32 rev; | ||
98 | }; | ||
99 | |||
100 | /* initial values for vesafb-type framebuffers. see struct screen_info | ||
101 | * in include/linux/tty.h | ||
102 | */ | ||
103 | #define ATAG_VIDEOLFB 0x54410008 | ||
104 | |||
105 | struct tag_videolfb { | ||
106 | __u16 lfb_width; | ||
107 | __u16 lfb_height; | ||
108 | __u16 lfb_depth; | ||
109 | __u16 lfb_linelength; | ||
110 | __u32 lfb_base; | ||
111 | __u32 lfb_size; | ||
112 | __u8 red_size; | ||
113 | __u8 red_pos; | ||
114 | __u8 green_size; | ||
115 | __u8 green_pos; | ||
116 | __u8 blue_size; | ||
117 | __u8 blue_pos; | ||
118 | __u8 rsvd_size; | ||
119 | __u8 rsvd_pos; | ||
120 | }; | ||
121 | |||
122 | /* command line: \0 terminated string */ | ||
123 | #define ATAG_CMDLINE 0x54410009 | ||
124 | |||
125 | struct tag_cmdline { | ||
126 | char cmdline[1]; /* this is the minimum size */ | ||
127 | }; | ||
128 | |||
129 | /* acorn RiscPC specific information */ | ||
130 | #define ATAG_ACORN 0x41000101 | ||
131 | |||
132 | struct tag_acorn { | ||
133 | __u32 memc_control_reg; | ||
134 | __u32 vram_pages; | ||
135 | __u8 sounddefault; | ||
136 | __u8 adfsdrives; | ||
137 | }; | ||
138 | |||
139 | /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ | ||
140 | #define ATAG_MEMCLK 0x41000402 | ||
141 | |||
142 | struct tag_memclk { | ||
143 | __u32 fmemclk; | ||
144 | }; | ||
145 | |||
146 | struct tag { | ||
147 | struct tag_header hdr; | ||
148 | union { | ||
149 | struct tag_core core; | ||
150 | struct tag_mem32 mem; | ||
151 | struct tag_videotext videotext; | ||
152 | struct tag_ramdisk ramdisk; | ||
153 | struct tag_initrd initrd; | ||
154 | struct tag_serialnr serialnr; | ||
155 | struct tag_revision revision; | ||
156 | struct tag_videolfb videolfb; | ||
157 | struct tag_cmdline cmdline; | ||
158 | |||
159 | /* | ||
160 | * Acorn specific | ||
161 | */ | ||
162 | struct tag_acorn acorn; | ||
163 | |||
164 | /* | ||
165 | * DC21285 specific | ||
166 | */ | ||
167 | struct tag_memclk memclk; | ||
168 | } u; | ||
169 | }; | ||
170 | |||
171 | struct tagtable { | ||
172 | __u32 tag; | ||
173 | int (*parse)(const struct tag *); | ||
174 | }; | ||
175 | |||
176 | #define tag_member_present(tag,member) \ | ||
177 | ((unsigned long)(&((struct tag *)0L)->member + 1) \ | ||
178 | <= (tag)->hdr.size * 4) | ||
179 | |||
180 | #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size)) | ||
181 | #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) | ||
182 | |||
183 | #define for_each_tag(t,base) \ | ||
184 | for (t = base; t->hdr.size; t = tag_next(t)) | ||
185 | |||
186 | |||
187 | #endif /* _UAPI__ASMARM_SETUP_H */ | ||
diff --git a/arch/arm/include/asm/sigcontext.h b/arch/arm/include/uapi/asm/sigcontext.h index fc0b80b6a6fc..fc0b80b6a6fc 100644 --- a/arch/arm/include/asm/sigcontext.h +++ b/arch/arm/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/arm/include/uapi/asm/signal.h b/arch/arm/include/uapi/asm/signal.h new file mode 100644 index 000000000000..921c57fdc52e --- /dev/null +++ b/arch/arm/include/uapi/asm/signal.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef _UAPI_ASMARM_SIGNAL_H | ||
2 | #define _UAPI_ASMARM_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifndef __KERNEL__ | ||
10 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
11 | |||
12 | #define NSIG 32 | ||
13 | typedef unsigned long sigset_t; | ||
14 | |||
15 | #endif /* __KERNEL__ */ | ||
16 | |||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SIGTRAP 5 | ||
22 | #define SIGABRT 6 | ||
23 | #define SIGIOT 6 | ||
24 | #define SIGBUS 7 | ||
25 | #define SIGFPE 8 | ||
26 | #define SIGKILL 9 | ||
27 | #define SIGUSR1 10 | ||
28 | #define SIGSEGV 11 | ||
29 | #define SIGUSR2 12 | ||
30 | #define SIGPIPE 13 | ||
31 | #define SIGALRM 14 | ||
32 | #define SIGTERM 15 | ||
33 | #define SIGSTKFLT 16 | ||
34 | #define SIGCHLD 17 | ||
35 | #define SIGCONT 18 | ||
36 | #define SIGSTOP 19 | ||
37 | #define SIGTSTP 20 | ||
38 | #define SIGTTIN 21 | ||
39 | #define SIGTTOU 22 | ||
40 | #define SIGURG 23 | ||
41 | #define SIGXCPU 24 | ||
42 | #define SIGXFSZ 25 | ||
43 | #define SIGVTALRM 26 | ||
44 | #define SIGPROF 27 | ||
45 | #define SIGWINCH 28 | ||
46 | #define SIGIO 29 | ||
47 | #define SIGPOLL SIGIO | ||
48 | /* | ||
49 | #define SIGLOST 29 | ||
50 | */ | ||
51 | #define SIGPWR 30 | ||
52 | #define SIGSYS 31 | ||
53 | #define SIGUNUSED 31 | ||
54 | |||
55 | /* These should not be considered constants from userland. */ | ||
56 | #define SIGRTMIN 32 | ||
57 | #define SIGRTMAX _NSIG | ||
58 | |||
59 | #define SIGSWI 32 | ||
60 | |||
61 | /* | ||
62 | * SA_FLAGS values: | ||
63 | * | ||
64 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
65 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
66 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
67 | * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task | ||
68 | * is running in 26-bit. | ||
69 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | ||
70 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
71 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
72 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
73 | * | ||
74 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
75 | * Unix names RESETHAND and NODEFER respectively. | ||
76 | */ | ||
77 | #define SA_NOCLDSTOP 0x00000001 | ||
78 | #define SA_NOCLDWAIT 0x00000002 | ||
79 | #define SA_SIGINFO 0x00000004 | ||
80 | #define SA_THIRTYTWO 0x02000000 | ||
81 | #define SA_RESTORER 0x04000000 | ||
82 | #define SA_ONSTACK 0x08000000 | ||
83 | #define SA_RESTART 0x10000000 | ||
84 | #define SA_NODEFER 0x40000000 | ||
85 | #define SA_RESETHAND 0x80000000 | ||
86 | |||
87 | #define SA_NOMASK SA_NODEFER | ||
88 | #define SA_ONESHOT SA_RESETHAND | ||
89 | |||
90 | |||
91 | /* | ||
92 | * sigaltstack controls | ||
93 | */ | ||
94 | #define SS_ONSTACK 1 | ||
95 | #define SS_DISABLE 2 | ||
96 | |||
97 | #define MINSIGSTKSZ 2048 | ||
98 | #define SIGSTKSZ 8192 | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | #ifndef __KERNEL__ | ||
103 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
104 | |||
105 | struct sigaction { | ||
106 | union { | ||
107 | __sighandler_t _sa_handler; | ||
108 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
109 | } _u; | ||
110 | sigset_t sa_mask; | ||
111 | unsigned long sa_flags; | ||
112 | void (*sa_restorer)(void); | ||
113 | }; | ||
114 | |||
115 | #define sa_handler _u._sa_handler | ||
116 | #define sa_sigaction _u._sa_sigaction | ||
117 | |||
118 | #endif /* __KERNEL__ */ | ||
119 | |||
120 | typedef struct sigaltstack { | ||
121 | void __user *ss_sp; | ||
122 | int ss_flags; | ||
123 | size_t ss_size; | ||
124 | } stack_t; | ||
125 | |||
126 | |||
127 | #endif /* _UAPI_ASMARM_SIGNAL_H */ | ||
diff --git a/arch/arm/include/asm/stat.h b/arch/arm/include/uapi/asm/stat.h index 42c0c13999d5..42c0c13999d5 100644 --- a/arch/arm/include/asm/stat.h +++ b/arch/arm/include/uapi/asm/stat.h | |||
diff --git a/arch/arm/include/asm/statfs.h b/arch/arm/include/uapi/asm/statfs.h index 079447c05ba7..079447c05ba7 100644 --- a/arch/arm/include/asm/statfs.h +++ b/arch/arm/include/uapi/asm/statfs.h | |||
diff --git a/arch/arm/include/uapi/asm/swab.h b/arch/arm/include/uapi/asm/swab.h new file mode 100644 index 000000000000..6fcb32a5c453 --- /dev/null +++ b/arch/arm/include/uapi/asm/swab.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/byteorder.h | ||
3 | * | ||
4 | * ARM Endian-ness. In little endian mode, the data bus is connected such | ||
5 | * that byte accesses appear as: | ||
6 | * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 | ||
7 | * and word accesses (data or instruction) appear as: | ||
8 | * d0...d31 | ||
9 | * | ||
10 | * When in big endian mode, byte accesses appear as: | ||
11 | * 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7 | ||
12 | * and word accesses (data or instruction) appear as: | ||
13 | * d0...d31 | ||
14 | */ | ||
15 | #ifndef _UAPI__ASM_ARM_SWAB_H | ||
16 | #define _UAPI__ASM_ARM_SWAB_H | ||
17 | |||
18 | #include <linux/compiler.h> | ||
19 | #include <linux/types.h> | ||
20 | |||
21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
22 | # define __SWAB_64_THRU_32__ | ||
23 | #endif | ||
24 | |||
25 | |||
26 | #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 | ||
27 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
28 | { | ||
29 | __u32 t; | ||
30 | |||
31 | #ifndef __thumb__ | ||
32 | if (!__builtin_constant_p(x)) { | ||
33 | /* | ||
34 | * The compiler needs a bit of a hint here to always do the | ||
35 | * right thing and not screw it up to different degrees | ||
36 | * depending on the gcc version. | ||
37 | */ | ||
38 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); | ||
39 | } else | ||
40 | #endif | ||
41 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | ||
42 | |||
43 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ | ||
44 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ | ||
45 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ | ||
46 | |||
47 | return x; | ||
48 | } | ||
49 | #define __arch_swab32 __arch_swab32 | ||
50 | |||
51 | #endif | ||
52 | |||
53 | #endif /* _UAPI__ASM_ARM_SWAB_H */ | ||
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..ac03bdb4ae44 --- /dev/null +++ b/arch/arm/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,450 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/unistd.h | ||
3 | * | ||
4 | * Copyright (C) 2001-2005 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, | ||
11 | * no matter what the change is. Thanks! | ||
12 | */ | ||
13 | #ifndef _UAPI__ASM_ARM_UNISTD_H | ||
14 | #define _UAPI__ASM_ARM_UNISTD_H | ||
15 | |||
16 | #define __NR_OABI_SYSCALL_BASE 0x900000 | ||
17 | |||
18 | #if defined(__thumb__) || defined(__ARM_EABI__) | ||
19 | #define __NR_SYSCALL_BASE 0 | ||
20 | #else | ||
21 | #define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE | ||
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * This file contains the system call numbers. | ||
26 | */ | ||
27 | |||
28 | #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) | ||
29 | #define __NR_exit (__NR_SYSCALL_BASE+ 1) | ||
30 | #define __NR_fork (__NR_SYSCALL_BASE+ 2) | ||
31 | #define __NR_read (__NR_SYSCALL_BASE+ 3) | ||
32 | #define __NR_write (__NR_SYSCALL_BASE+ 4) | ||
33 | #define __NR_open (__NR_SYSCALL_BASE+ 5) | ||
34 | #define __NR_close (__NR_SYSCALL_BASE+ 6) | ||
35 | /* 7 was sys_waitpid */ | ||
36 | #define __NR_creat (__NR_SYSCALL_BASE+ 8) | ||
37 | #define __NR_link (__NR_SYSCALL_BASE+ 9) | ||
38 | #define __NR_unlink (__NR_SYSCALL_BASE+ 10) | ||
39 | #define __NR_execve (__NR_SYSCALL_BASE+ 11) | ||
40 | #define __NR_chdir (__NR_SYSCALL_BASE+ 12) | ||
41 | #define __NR_time (__NR_SYSCALL_BASE+ 13) | ||
42 | #define __NR_mknod (__NR_SYSCALL_BASE+ 14) | ||
43 | #define __NR_chmod (__NR_SYSCALL_BASE+ 15) | ||
44 | #define __NR_lchown (__NR_SYSCALL_BASE+ 16) | ||
45 | /* 17 was sys_break */ | ||
46 | /* 18 was sys_stat */ | ||
47 | #define __NR_lseek (__NR_SYSCALL_BASE+ 19) | ||
48 | #define __NR_getpid (__NR_SYSCALL_BASE+ 20) | ||
49 | #define __NR_mount (__NR_SYSCALL_BASE+ 21) | ||
50 | #define __NR_umount (__NR_SYSCALL_BASE+ 22) | ||
51 | #define __NR_setuid (__NR_SYSCALL_BASE+ 23) | ||
52 | #define __NR_getuid (__NR_SYSCALL_BASE+ 24) | ||
53 | #define __NR_stime (__NR_SYSCALL_BASE+ 25) | ||
54 | #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) | ||
55 | #define __NR_alarm (__NR_SYSCALL_BASE+ 27) | ||
56 | /* 28 was sys_fstat */ | ||
57 | #define __NR_pause (__NR_SYSCALL_BASE+ 29) | ||
58 | #define __NR_utime (__NR_SYSCALL_BASE+ 30) | ||
59 | /* 31 was sys_stty */ | ||
60 | /* 32 was sys_gtty */ | ||
61 | #define __NR_access (__NR_SYSCALL_BASE+ 33) | ||
62 | #define __NR_nice (__NR_SYSCALL_BASE+ 34) | ||
63 | /* 35 was sys_ftime */ | ||
64 | #define __NR_sync (__NR_SYSCALL_BASE+ 36) | ||
65 | #define __NR_kill (__NR_SYSCALL_BASE+ 37) | ||
66 | #define __NR_rename (__NR_SYSCALL_BASE+ 38) | ||
67 | #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) | ||
68 | #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) | ||
69 | #define __NR_dup (__NR_SYSCALL_BASE+ 41) | ||
70 | #define __NR_pipe (__NR_SYSCALL_BASE+ 42) | ||
71 | #define __NR_times (__NR_SYSCALL_BASE+ 43) | ||
72 | /* 44 was sys_prof */ | ||
73 | #define __NR_brk (__NR_SYSCALL_BASE+ 45) | ||
74 | #define __NR_setgid (__NR_SYSCALL_BASE+ 46) | ||
75 | #define __NR_getgid (__NR_SYSCALL_BASE+ 47) | ||
76 | /* 48 was sys_signal */ | ||
77 | #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) | ||
78 | #define __NR_getegid (__NR_SYSCALL_BASE+ 50) | ||
79 | #define __NR_acct (__NR_SYSCALL_BASE+ 51) | ||
80 | #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) | ||
81 | /* 53 was sys_lock */ | ||
82 | #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) | ||
83 | #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) | ||
84 | /* 56 was sys_mpx */ | ||
85 | #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) | ||
86 | /* 58 was sys_ulimit */ | ||
87 | /* 59 was sys_olduname */ | ||
88 | #define __NR_umask (__NR_SYSCALL_BASE+ 60) | ||
89 | #define __NR_chroot (__NR_SYSCALL_BASE+ 61) | ||
90 | #define __NR_ustat (__NR_SYSCALL_BASE+ 62) | ||
91 | #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) | ||
92 | #define __NR_getppid (__NR_SYSCALL_BASE+ 64) | ||
93 | #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) | ||
94 | #define __NR_setsid (__NR_SYSCALL_BASE+ 66) | ||
95 | #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) | ||
96 | /* 68 was sys_sgetmask */ | ||
97 | /* 69 was sys_ssetmask */ | ||
98 | #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) | ||
99 | #define __NR_setregid (__NR_SYSCALL_BASE+ 71) | ||
100 | #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) | ||
101 | #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) | ||
102 | #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) | ||
103 | #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) | ||
104 | #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ | ||
105 | #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) | ||
106 | #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) | ||
107 | #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) | ||
108 | #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) | ||
109 | #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) | ||
110 | #define __NR_select (__NR_SYSCALL_BASE+ 82) | ||
111 | #define __NR_symlink (__NR_SYSCALL_BASE+ 83) | ||
112 | /* 84 was sys_lstat */ | ||
113 | #define __NR_readlink (__NR_SYSCALL_BASE+ 85) | ||
114 | #define __NR_uselib (__NR_SYSCALL_BASE+ 86) | ||
115 | #define __NR_swapon (__NR_SYSCALL_BASE+ 87) | ||
116 | #define __NR_reboot (__NR_SYSCALL_BASE+ 88) | ||
117 | #define __NR_readdir (__NR_SYSCALL_BASE+ 89) | ||
118 | #define __NR_mmap (__NR_SYSCALL_BASE+ 90) | ||
119 | #define __NR_munmap (__NR_SYSCALL_BASE+ 91) | ||
120 | #define __NR_truncate (__NR_SYSCALL_BASE+ 92) | ||
121 | #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) | ||
122 | #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) | ||
123 | #define __NR_fchown (__NR_SYSCALL_BASE+ 95) | ||
124 | #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) | ||
125 | #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) | ||
126 | /* 98 was sys_profil */ | ||
127 | #define __NR_statfs (__NR_SYSCALL_BASE+ 99) | ||
128 | #define __NR_fstatfs (__NR_SYSCALL_BASE+100) | ||
129 | /* 101 was sys_ioperm */ | ||
130 | #define __NR_socketcall (__NR_SYSCALL_BASE+102) | ||
131 | #define __NR_syslog (__NR_SYSCALL_BASE+103) | ||
132 | #define __NR_setitimer (__NR_SYSCALL_BASE+104) | ||
133 | #define __NR_getitimer (__NR_SYSCALL_BASE+105) | ||
134 | #define __NR_stat (__NR_SYSCALL_BASE+106) | ||
135 | #define __NR_lstat (__NR_SYSCALL_BASE+107) | ||
136 | #define __NR_fstat (__NR_SYSCALL_BASE+108) | ||
137 | /* 109 was sys_uname */ | ||
138 | /* 110 was sys_iopl */ | ||
139 | #define __NR_vhangup (__NR_SYSCALL_BASE+111) | ||
140 | /* 112 was sys_idle */ | ||
141 | #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ | ||
142 | #define __NR_wait4 (__NR_SYSCALL_BASE+114) | ||
143 | #define __NR_swapoff (__NR_SYSCALL_BASE+115) | ||
144 | #define __NR_sysinfo (__NR_SYSCALL_BASE+116) | ||
145 | #define __NR_ipc (__NR_SYSCALL_BASE+117) | ||
146 | #define __NR_fsync (__NR_SYSCALL_BASE+118) | ||
147 | #define __NR_sigreturn (__NR_SYSCALL_BASE+119) | ||
148 | #define __NR_clone (__NR_SYSCALL_BASE+120) | ||
149 | #define __NR_setdomainname (__NR_SYSCALL_BASE+121) | ||
150 | #define __NR_uname (__NR_SYSCALL_BASE+122) | ||
151 | /* 123 was sys_modify_ldt */ | ||
152 | #define __NR_adjtimex (__NR_SYSCALL_BASE+124) | ||
153 | #define __NR_mprotect (__NR_SYSCALL_BASE+125) | ||
154 | #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) | ||
155 | /* 127 was sys_create_module */ | ||
156 | #define __NR_init_module (__NR_SYSCALL_BASE+128) | ||
157 | #define __NR_delete_module (__NR_SYSCALL_BASE+129) | ||
158 | /* 130 was sys_get_kernel_syms */ | ||
159 | #define __NR_quotactl (__NR_SYSCALL_BASE+131) | ||
160 | #define __NR_getpgid (__NR_SYSCALL_BASE+132) | ||
161 | #define __NR_fchdir (__NR_SYSCALL_BASE+133) | ||
162 | #define __NR_bdflush (__NR_SYSCALL_BASE+134) | ||
163 | #define __NR_sysfs (__NR_SYSCALL_BASE+135) | ||
164 | #define __NR_personality (__NR_SYSCALL_BASE+136) | ||
165 | /* 137 was sys_afs_syscall */ | ||
166 | #define __NR_setfsuid (__NR_SYSCALL_BASE+138) | ||
167 | #define __NR_setfsgid (__NR_SYSCALL_BASE+139) | ||
168 | #define __NR__llseek (__NR_SYSCALL_BASE+140) | ||
169 | #define __NR_getdents (__NR_SYSCALL_BASE+141) | ||
170 | #define __NR__newselect (__NR_SYSCALL_BASE+142) | ||
171 | #define __NR_flock (__NR_SYSCALL_BASE+143) | ||
172 | #define __NR_msync (__NR_SYSCALL_BASE+144) | ||
173 | #define __NR_readv (__NR_SYSCALL_BASE+145) | ||
174 | #define __NR_writev (__NR_SYSCALL_BASE+146) | ||
175 | #define __NR_getsid (__NR_SYSCALL_BASE+147) | ||
176 | #define __NR_fdatasync (__NR_SYSCALL_BASE+148) | ||
177 | #define __NR__sysctl (__NR_SYSCALL_BASE+149) | ||
178 | #define __NR_mlock (__NR_SYSCALL_BASE+150) | ||
179 | #define __NR_munlock (__NR_SYSCALL_BASE+151) | ||
180 | #define __NR_mlockall (__NR_SYSCALL_BASE+152) | ||
181 | #define __NR_munlockall (__NR_SYSCALL_BASE+153) | ||
182 | #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) | ||
183 | #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) | ||
184 | #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) | ||
185 | #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) | ||
186 | #define __NR_sched_yield (__NR_SYSCALL_BASE+158) | ||
187 | #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) | ||
188 | #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) | ||
189 | #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) | ||
190 | #define __NR_nanosleep (__NR_SYSCALL_BASE+162) | ||
191 | #define __NR_mremap (__NR_SYSCALL_BASE+163) | ||
192 | #define __NR_setresuid (__NR_SYSCALL_BASE+164) | ||
193 | #define __NR_getresuid (__NR_SYSCALL_BASE+165) | ||
194 | /* 166 was sys_vm86 */ | ||
195 | /* 167 was sys_query_module */ | ||
196 | #define __NR_poll (__NR_SYSCALL_BASE+168) | ||
197 | #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) | ||
198 | #define __NR_setresgid (__NR_SYSCALL_BASE+170) | ||
199 | #define __NR_getresgid (__NR_SYSCALL_BASE+171) | ||
200 | #define __NR_prctl (__NR_SYSCALL_BASE+172) | ||
201 | #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) | ||
202 | #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) | ||
203 | #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) | ||
204 | #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) | ||
205 | #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) | ||
206 | #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) | ||
207 | #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) | ||
208 | #define __NR_pread64 (__NR_SYSCALL_BASE+180) | ||
209 | #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) | ||
210 | #define __NR_chown (__NR_SYSCALL_BASE+182) | ||
211 | #define __NR_getcwd (__NR_SYSCALL_BASE+183) | ||
212 | #define __NR_capget (__NR_SYSCALL_BASE+184) | ||
213 | #define __NR_capset (__NR_SYSCALL_BASE+185) | ||
214 | #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) | ||
215 | #define __NR_sendfile (__NR_SYSCALL_BASE+187) | ||
216 | /* 188 reserved */ | ||
217 | /* 189 reserved */ | ||
218 | #define __NR_vfork (__NR_SYSCALL_BASE+190) | ||
219 | #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ | ||
220 | #define __NR_mmap2 (__NR_SYSCALL_BASE+192) | ||
221 | #define __NR_truncate64 (__NR_SYSCALL_BASE+193) | ||
222 | #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) | ||
223 | #define __NR_stat64 (__NR_SYSCALL_BASE+195) | ||
224 | #define __NR_lstat64 (__NR_SYSCALL_BASE+196) | ||
225 | #define __NR_fstat64 (__NR_SYSCALL_BASE+197) | ||
226 | #define __NR_lchown32 (__NR_SYSCALL_BASE+198) | ||
227 | #define __NR_getuid32 (__NR_SYSCALL_BASE+199) | ||
228 | #define __NR_getgid32 (__NR_SYSCALL_BASE+200) | ||
229 | #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) | ||
230 | #define __NR_getegid32 (__NR_SYSCALL_BASE+202) | ||
231 | #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) | ||
232 | #define __NR_setregid32 (__NR_SYSCALL_BASE+204) | ||
233 | #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) | ||
234 | #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) | ||
235 | #define __NR_fchown32 (__NR_SYSCALL_BASE+207) | ||
236 | #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) | ||
237 | #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) | ||
238 | #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) | ||
239 | #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) | ||
240 | #define __NR_chown32 (__NR_SYSCALL_BASE+212) | ||
241 | #define __NR_setuid32 (__NR_SYSCALL_BASE+213) | ||
242 | #define __NR_setgid32 (__NR_SYSCALL_BASE+214) | ||
243 | #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) | ||
244 | #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) | ||
245 | #define __NR_getdents64 (__NR_SYSCALL_BASE+217) | ||
246 | #define __NR_pivot_root (__NR_SYSCALL_BASE+218) | ||
247 | #define __NR_mincore (__NR_SYSCALL_BASE+219) | ||
248 | #define __NR_madvise (__NR_SYSCALL_BASE+220) | ||
249 | #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) | ||
250 | /* 222 for tux */ | ||
251 | /* 223 is unused */ | ||
252 | #define __NR_gettid (__NR_SYSCALL_BASE+224) | ||
253 | #define __NR_readahead (__NR_SYSCALL_BASE+225) | ||
254 | #define __NR_setxattr (__NR_SYSCALL_BASE+226) | ||
255 | #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) | ||
256 | #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) | ||
257 | #define __NR_getxattr (__NR_SYSCALL_BASE+229) | ||
258 | #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) | ||
259 | #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) | ||
260 | #define __NR_listxattr (__NR_SYSCALL_BASE+232) | ||
261 | #define __NR_llistxattr (__NR_SYSCALL_BASE+233) | ||
262 | #define __NR_flistxattr (__NR_SYSCALL_BASE+234) | ||
263 | #define __NR_removexattr (__NR_SYSCALL_BASE+235) | ||
264 | #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) | ||
265 | #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) | ||
266 | #define __NR_tkill (__NR_SYSCALL_BASE+238) | ||
267 | #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) | ||
268 | #define __NR_futex (__NR_SYSCALL_BASE+240) | ||
269 | #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) | ||
270 | #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) | ||
271 | #define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
272 | #define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
273 | #define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
274 | #define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
275 | #define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
276 | #define __NR_exit_group (__NR_SYSCALL_BASE+248) | ||
277 | #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) | ||
278 | #define __NR_epoll_create (__NR_SYSCALL_BASE+250) | ||
279 | #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) | ||
280 | #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) | ||
281 | #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) | ||
282 | /* 254 for set_thread_area */ | ||
283 | /* 255 for get_thread_area */ | ||
284 | #define __NR_set_tid_address (__NR_SYSCALL_BASE+256) | ||
285 | #define __NR_timer_create (__NR_SYSCALL_BASE+257) | ||
286 | #define __NR_timer_settime (__NR_SYSCALL_BASE+258) | ||
287 | #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) | ||
288 | #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) | ||
289 | #define __NR_timer_delete (__NR_SYSCALL_BASE+261) | ||
290 | #define __NR_clock_settime (__NR_SYSCALL_BASE+262) | ||
291 | #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) | ||
292 | #define __NR_clock_getres (__NR_SYSCALL_BASE+264) | ||
293 | #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) | ||
294 | #define __NR_statfs64 (__NR_SYSCALL_BASE+266) | ||
295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | ||
296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | ||
297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | ||
298 | #define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) | ||
299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | ||
300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | ||
301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | ||
302 | #define __NR_mq_open (__NR_SYSCALL_BASE+274) | ||
303 | #define __NR_mq_unlink (__NR_SYSCALL_BASE+275) | ||
304 | #define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) | ||
305 | #define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) | ||
306 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | ||
307 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | ||
308 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | ||
309 | #define __NR_socket (__NR_SYSCALL_BASE+281) | ||
310 | #define __NR_bind (__NR_SYSCALL_BASE+282) | ||
311 | #define __NR_connect (__NR_SYSCALL_BASE+283) | ||
312 | #define __NR_listen (__NR_SYSCALL_BASE+284) | ||
313 | #define __NR_accept (__NR_SYSCALL_BASE+285) | ||
314 | #define __NR_getsockname (__NR_SYSCALL_BASE+286) | ||
315 | #define __NR_getpeername (__NR_SYSCALL_BASE+287) | ||
316 | #define __NR_socketpair (__NR_SYSCALL_BASE+288) | ||
317 | #define __NR_send (__NR_SYSCALL_BASE+289) | ||
318 | #define __NR_sendto (__NR_SYSCALL_BASE+290) | ||
319 | #define __NR_recv (__NR_SYSCALL_BASE+291) | ||
320 | #define __NR_recvfrom (__NR_SYSCALL_BASE+292) | ||
321 | #define __NR_shutdown (__NR_SYSCALL_BASE+293) | ||
322 | #define __NR_setsockopt (__NR_SYSCALL_BASE+294) | ||
323 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) | ||
324 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) | ||
325 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | ||
326 | #define __NR_semop (__NR_SYSCALL_BASE+298) | ||
327 | #define __NR_semget (__NR_SYSCALL_BASE+299) | ||
328 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | ||
329 | #define __NR_msgsnd (__NR_SYSCALL_BASE+301) | ||
330 | #define __NR_msgrcv (__NR_SYSCALL_BASE+302) | ||
331 | #define __NR_msgget (__NR_SYSCALL_BASE+303) | ||
332 | #define __NR_msgctl (__NR_SYSCALL_BASE+304) | ||
333 | #define __NR_shmat (__NR_SYSCALL_BASE+305) | ||
334 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) | ||
335 | #define __NR_shmget (__NR_SYSCALL_BASE+307) | ||
336 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) | ||
337 | #define __NR_add_key (__NR_SYSCALL_BASE+309) | ||
338 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | ||
339 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | ||
340 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | ||
341 | #define __NR_vserver (__NR_SYSCALL_BASE+313) | ||
342 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) | ||
343 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) | ||
344 | #define __NR_inotify_init (__NR_SYSCALL_BASE+316) | ||
345 | #define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) | ||
346 | #define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) | ||
347 | #define __NR_mbind (__NR_SYSCALL_BASE+319) | ||
348 | #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) | ||
349 | #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) | ||
350 | #define __NR_openat (__NR_SYSCALL_BASE+322) | ||
351 | #define __NR_mkdirat (__NR_SYSCALL_BASE+323) | ||
352 | #define __NR_mknodat (__NR_SYSCALL_BASE+324) | ||
353 | #define __NR_fchownat (__NR_SYSCALL_BASE+325) | ||
354 | #define __NR_futimesat (__NR_SYSCALL_BASE+326) | ||
355 | #define __NR_fstatat64 (__NR_SYSCALL_BASE+327) | ||
356 | #define __NR_unlinkat (__NR_SYSCALL_BASE+328) | ||
357 | #define __NR_renameat (__NR_SYSCALL_BASE+329) | ||
358 | #define __NR_linkat (__NR_SYSCALL_BASE+330) | ||
359 | #define __NR_symlinkat (__NR_SYSCALL_BASE+331) | ||
360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) | ||
361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) | ||
362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) | ||
363 | #define __NR_pselect6 (__NR_SYSCALL_BASE+335) | ||
364 | #define __NR_ppoll (__NR_SYSCALL_BASE+336) | ||
365 | #define __NR_unshare (__NR_SYSCALL_BASE+337) | ||
366 | #define __NR_set_robust_list (__NR_SYSCALL_BASE+338) | ||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | ||
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | ||
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | ||
370 | #define __NR_sync_file_range2 __NR_arm_sync_file_range | ||
371 | #define __NR_tee (__NR_SYSCALL_BASE+342) | ||
372 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | ||
373 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | ||
374 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | ||
375 | #define __NR_epoll_pwait (__NR_SYSCALL_BASE+346) | ||
376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) | ||
377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) | ||
378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) | ||
379 | #define __NR_timerfd_create (__NR_SYSCALL_BASE+350) | ||
380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) | ||
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | ||
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | ||
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | ||
384 | #define __NR_signalfd4 (__NR_SYSCALL_BASE+355) | ||
385 | #define __NR_eventfd2 (__NR_SYSCALL_BASE+356) | ||
386 | #define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) | ||
387 | #define __NR_dup3 (__NR_SYSCALL_BASE+358) | ||
388 | #define __NR_pipe2 (__NR_SYSCALL_BASE+359) | ||
389 | #define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) | ||
390 | #define __NR_preadv (__NR_SYSCALL_BASE+361) | ||
391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) | ||
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | ||
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | ||
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
395 | #define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) | ||
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | ||
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | ||
399 | #define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) | ||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | ||
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | ||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | ||
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | ||
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | ||
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | ||
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | ||
407 | /* 378 for kcmp */ | ||
408 | |||
409 | /* | ||
410 | * This may need to be greater than __NR_last_syscall+1 in order to | ||
411 | * account for the padding in the syscall table | ||
412 | */ | ||
413 | |||
414 | /* | ||
415 | * The following SWIs are ARM private. | ||
416 | */ | ||
417 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | ||
418 | #define __ARM_NR_breakpoint (__ARM_NR_BASE+1) | ||
419 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | ||
420 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | ||
421 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | ||
422 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | ||
423 | |||
424 | /* | ||
425 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | ||
426 | * __kuser_cmpxchg code in entry-armv.S should be aware of its | ||
427 | * existence. Don't ever use this from user code. | ||
428 | */ | ||
429 | |||
430 | /* | ||
431 | * The following syscalls are obsolete and no longer available for EABI. | ||
432 | */ | ||
433 | #if !defined(__KERNEL__) | ||
434 | #if defined(__ARM_EABI__) | ||
435 | #undef __NR_time | ||
436 | #undef __NR_umount | ||
437 | #undef __NR_stime | ||
438 | #undef __NR_alarm | ||
439 | #undef __NR_utime | ||
440 | #undef __NR_getrlimit | ||
441 | #undef __NR_select | ||
442 | #undef __NR_readdir | ||
443 | #undef __NR_mmap | ||
444 | #undef __NR_socketcall | ||
445 | #undef __NR_syscall | ||
446 | #undef __NR_ipc | ||
447 | #endif | ||
448 | #endif | ||
449 | |||
450 | #endif /* _UAPI__ASM_ARM_UNISTD_H */ | ||