diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/m32r | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/m32r')
74 files changed, 903 insertions, 1749 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index f807721e19a..b92b9445255 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -7,14 +7,9 @@ config M32R | |||
7 | select HAVE_KERNEL_GZIP | 7 | select HAVE_KERNEL_GZIP |
8 | select HAVE_KERNEL_BZIP2 | 8 | select HAVE_KERNEL_BZIP2 |
9 | select HAVE_KERNEL_LZMA | 9 | select HAVE_KERNEL_LZMA |
10 | select ARCH_WANT_IPC_PARSE_VERSION | ||
11 | select HAVE_DEBUG_BUGVERBOSE | ||
12 | select HAVE_GENERIC_HARDIRQS | 10 | select HAVE_GENERIC_HARDIRQS |
13 | select GENERIC_IRQ_PROBE | 11 | select GENERIC_IRQ_PROBE |
14 | select GENERIC_IRQ_SHOW | 12 | select GENERIC_IRQ_SHOW |
15 | select GENERIC_ATOMIC64 | ||
16 | select ARCH_USES_GETTIMEOFFSET | ||
17 | select MODULES_USE_ELF_RELA | ||
18 | 13 | ||
19 | config SBUS | 14 | config SBUS |
20 | bool | 15 | bool |
@@ -37,6 +32,9 @@ config HZ | |||
37 | int | 32 | int |
38 | default 100 | 33 | default 100 |
39 | 34 | ||
35 | config ARCH_USES_GETTIMEOFFSET | ||
36 | def_bool y | ||
37 | |||
40 | source "init/Kconfig" | 38 | source "init/Kconfig" |
41 | 39 | ||
42 | source "kernel/Kconfig.freezer" | 40 | source "kernel/Kconfig.freezer" |
@@ -324,6 +322,13 @@ config NODES_SHIFT | |||
324 | default "1" | 322 | default "1" |
325 | depends on NEED_MULTIPLE_NODES | 323 | depends on NEED_MULTIPLE_NODES |
326 | 324 | ||
325 | # turning this on wastes a bunch of space. | ||
326 | # Summit needs it only when NUMA is on | ||
327 | config BOOT_IOREMAP | ||
328 | bool | ||
329 | depends on NUMA | ||
330 | default n | ||
331 | |||
327 | endmenu | 332 | endmenu |
328 | 333 | ||
329 | 334 | ||
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index def8dd0b6bc..8ff5ba0ea26 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile | |||
@@ -31,7 +31,7 @@ KBUILD_AFLAGS += $(aflags-y) | |||
31 | 31 | ||
32 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 | 32 | CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 |
33 | 33 | ||
34 | head-y := arch/m32r/kernel/head.o | 34 | head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o |
35 | 35 | ||
36 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | 36 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
37 | 37 | ||
diff --git a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile index 01729c2979b..177716b1d61 100644 --- a/arch/m32r/boot/compressed/Makefile +++ b/arch/m32r/boot/compressed/Makefile | |||
@@ -43,9 +43,9 @@ endif | |||
43 | 43 | ||
44 | OBJCOPYFLAGS += -R .empty_zero_page | 44 | OBJCOPYFLAGS += -R .empty_zero_page |
45 | 45 | ||
46 | suffix-$(CONFIG_KERNEL_GZIP) = gz | 46 | suffix_$(CONFIG_KERNEL_GZIP) = gz |
47 | suffix-$(CONFIG_KERNEL_BZIP2) = bz2 | 47 | suffix_$(CONFIG_KERNEL_BZIP2) = bz2 |
48 | suffix-$(CONFIG_KERNEL_LZMA) = lzma | 48 | suffix_$(CONFIG_KERNEL_LZMA) = lzma |
49 | 49 | ||
50 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE | 50 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE |
51 | $(call if_changed,ld) | 51 | $(call if_changed,ld) |
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 28a09529f20..370d6088197 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c | |||
@@ -28,7 +28,7 @@ static unsigned long free_mem_ptr; | |||
28 | static unsigned long free_mem_end_ptr; | 28 | static unsigned long free_mem_end_ptr; |
29 | 29 | ||
30 | #ifdef CONFIG_KERNEL_BZIP2 | 30 | #ifdef CONFIG_KERNEL_BZIP2 |
31 | void *memset(void *s, int c, size_t n) | 31 | static void *memset(void *s, int c, size_t n) |
32 | { | 32 | { |
33 | char *ss = s; | 33 | char *ss = s; |
34 | 34 | ||
@@ -39,16 +39,6 @@ void *memset(void *s, int c, size_t n) | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef CONFIG_KERNEL_GZIP | 41 | #ifdef CONFIG_KERNEL_GZIP |
42 | void *memcpy(void *dest, const void *src, size_t n) | ||
43 | { | ||
44 | char *d = dest; | ||
45 | const char *s = src; | ||
46 | while (n--) | ||
47 | *d++ = *s++; | ||
48 | |||
49 | return dest; | ||
50 | } | ||
51 | |||
52 | #define BOOT_HEAP_SIZE 0x10000 | 42 | #define BOOT_HEAP_SIZE 0x10000 |
53 | #include "../../../../lib/decompress_inflate.c" | 43 | #include "../../../../lib/decompress_inflate.c" |
54 | #endif | 44 | #endif |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index bebdc36ebb0..c68e1680da0 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -1,5 +1 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | generic-y += clkdev.h | ||
3 | generic-y += exec.h | ||
4 | generic-y += module.h | ||
5 | generic-y += trace_clock.h | ||
diff --git a/arch/m32r/include/asm/atomic.h b/arch/m32r/include/asm/atomic.h index 0d81697c326..1e7f29fb21f 100644 --- a/arch/m32r/include/asm/atomic.h +++ b/arch/m32r/include/asm/atomic.h | |||
@@ -11,8 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
14 | #include <asm/cmpxchg.h> | 14 | #include <asm/system.h> |
15 | #include <asm/dcache_clear.h> | ||
16 | 15 | ||
17 | /* | 16 | /* |
18 | * Atomic operations that C can't guarantee us. Useful for | 17 | * Atomic operations that C can't guarantee us. Useful for |
diff --git a/arch/m32r/include/asm/barrier.h b/arch/m32r/include/asm/barrier.h deleted file mode 100644 index 6976621efd3..00000000000 --- a/arch/m32r/include/asm/barrier.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2001 Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto | ||
7 | * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> | ||
8 | */ | ||
9 | #ifndef _ASM_M32R_BARRIER_H | ||
10 | #define _ASM_M32R_BARRIER_H | ||
11 | |||
12 | #define nop() __asm__ __volatile__ ("nop" : : ) | ||
13 | |||
14 | /* | ||
15 | * Memory barrier. | ||
16 | * | ||
17 | * mb() prevents loads and stores being reordered across this point. | ||
18 | * rmb() prevents loads being reordered across this point. | ||
19 | * wmb() prevents stores being reordered across this point. | ||
20 | */ | ||
21 | #define mb() barrier() | ||
22 | #define rmb() mb() | ||
23 | #define wmb() mb() | ||
24 | |||
25 | /** | ||
26 | * read_barrier_depends - Flush all pending reads that subsequents reads | ||
27 | * depend on. | ||
28 | * | ||
29 | * No data-dependent reads from memory-like regions are ever reordered | ||
30 | * over this barrier. All reads preceding this primitive are guaranteed | ||
31 | * to access memory (but not necessarily other CPUs' caches) before any | ||
32 | * reads following this primitive that depend on the data return by | ||
33 | * any of the preceding reads. This primitive is much lighter weight than | ||
34 | * rmb() on most CPUs, and is never heavier weight than is | ||
35 | * rmb(). | ||
36 | * | ||
37 | * These ordering constraints are respected by both the local CPU | ||
38 | * and the compiler. | ||
39 | * | ||
40 | * Ordering is not guaranteed by anything other than these primitives, | ||
41 | * not even by data dependencies. See the documentation for | ||
42 | * memory_barrier() for examples and URLs to more information. | ||
43 | * | ||
44 | * For example, the following code would force ordering (the initial | ||
45 | * value of "a" is zero, "b" is one, and "p" is "&a"): | ||
46 | * | ||
47 | * <programlisting> | ||
48 | * CPU 0 CPU 1 | ||
49 | * | ||
50 | * b = 2; | ||
51 | * memory_barrier(); | ||
52 | * p = &b; q = p; | ||
53 | * read_barrier_depends(); | ||
54 | * d = *q; | ||
55 | * </programlisting> | ||
56 | * | ||
57 | * | ||
58 | * because the read of "*q" depends on the read of "p" and these | ||
59 | * two reads are separated by a read_barrier_depends(). However, | ||
60 | * the following code, with the same initial values for "a" and "b": | ||
61 | * | ||
62 | * <programlisting> | ||
63 | * CPU 0 CPU 1 | ||
64 | * | ||
65 | * a = 2; | ||
66 | * memory_barrier(); | ||
67 | * b = 3; y = b; | ||
68 | * read_barrier_depends(); | ||
69 | * x = a; | ||
70 | * </programlisting> | ||
71 | * | ||
72 | * does not enforce ordering, since there is no data dependency between | ||
73 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | ||
74 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | ||
75 | * in cases like this where there are no data dependencies. | ||
76 | **/ | ||
77 | |||
78 | #define read_barrier_depends() do { } while (0) | ||
79 | |||
80 | #ifdef CONFIG_SMP | ||
81 | #define smp_mb() mb() | ||
82 | #define smp_rmb() rmb() | ||
83 | #define smp_wmb() wmb() | ||
84 | #define smp_read_barrier_depends() read_barrier_depends() | ||
85 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) | ||
86 | #else | ||
87 | #define smp_mb() barrier() | ||
88 | #define smp_rmb() barrier() | ||
89 | #define smp_wmb() barrier() | ||
90 | #define smp_read_barrier_depends() do { } while (0) | ||
91 | #define set_mb(var, value) do { var = value; barrier(); } while (0) | ||
92 | #endif | ||
93 | |||
94 | #endif /* _ASM_M32R_BARRIER_H */ | ||
diff --git a/arch/m32r/include/asm/bitops.h b/arch/m32r/include/asm/bitops.h index d3dea9ac7d4..6300f22cdbd 100644 --- a/arch/m32r/include/asm/bitops.h +++ b/arch/m32r/include/asm/bitops.h | |||
@@ -16,10 +16,9 @@ | |||
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <linux/irqflags.h> | ||
20 | #include <asm/assembler.h> | 19 | #include <asm/assembler.h> |
20 | #include <asm/system.h> | ||
21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
22 | #include <asm/dcache_clear.h> | ||
23 | #include <asm/types.h> | 22 | #include <asm/types.h> |
24 | 23 | ||
25 | /* | 24 | /* |
diff --git a/arch/m32r/include/asm/cmpxchg.h b/arch/m32r/include/asm/cmpxchg.h deleted file mode 100644 index de651db20b4..00000000000 --- a/arch/m32r/include/asm/cmpxchg.h +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_CMPXCHG_H | ||
2 | #define _ASM_M32R_CMPXCHG_H | ||
3 | |||
4 | /* | ||
5 | * M32R version: | ||
6 | * Copyright (C) 2001, 2002 Hitoshi Yamamoto | ||
7 | * Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org> | ||
8 | */ | ||
9 | |||
10 | #include <linux/irqflags.h> | ||
11 | #include <asm/assembler.h> | ||
12 | #include <asm/dcache_clear.h> | ||
13 | |||
14 | extern void __xchg_called_with_bad_pointer(void); | ||
15 | |||
16 | static __always_inline unsigned long | ||
17 | __xchg(unsigned long x, volatile void *ptr, int size) | ||
18 | { | ||
19 | unsigned long flags; | ||
20 | unsigned long tmp = 0; | ||
21 | |||
22 | local_irq_save(flags); | ||
23 | |||
24 | switch (size) { | ||
25 | #ifndef CONFIG_SMP | ||
26 | case 1: | ||
27 | __asm__ __volatile__ ( | ||
28 | "ldb %0, @%2 \n\t" | ||
29 | "stb %1, @%2 \n\t" | ||
30 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
31 | break; | ||
32 | case 2: | ||
33 | __asm__ __volatile__ ( | ||
34 | "ldh %0, @%2 \n\t" | ||
35 | "sth %1, @%2 \n\t" | ||
36 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
37 | break; | ||
38 | case 4: | ||
39 | __asm__ __volatile__ ( | ||
40 | "ld %0, @%2 \n\t" | ||
41 | "st %1, @%2 \n\t" | ||
42 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
43 | break; | ||
44 | #else /* CONFIG_SMP */ | ||
45 | case 4: | ||
46 | __asm__ __volatile__ ( | ||
47 | DCACHE_CLEAR("%0", "r4", "%2") | ||
48 | "lock %0, @%2; \n\t" | ||
49 | "unlock %1, @%2; \n\t" | ||
50 | : "=&r" (tmp) : "r" (x), "r" (ptr) | ||
51 | : "memory" | ||
52 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
53 | , "r4" | ||
54 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
55 | ); | ||
56 | break; | ||
57 | #endif /* CONFIG_SMP */ | ||
58 | default: | ||
59 | __xchg_called_with_bad_pointer(); | ||
60 | } | ||
61 | |||
62 | local_irq_restore(flags); | ||
63 | |||
64 | return (tmp); | ||
65 | } | ||
66 | |||
67 | #define xchg(ptr, x) \ | ||
68 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | ||
69 | |||
70 | static __always_inline unsigned long | ||
71 | __xchg_local(unsigned long x, volatile void *ptr, int size) | ||
72 | { | ||
73 | unsigned long flags; | ||
74 | unsigned long tmp = 0; | ||
75 | |||
76 | local_irq_save(flags); | ||
77 | |||
78 | switch (size) { | ||
79 | case 1: | ||
80 | __asm__ __volatile__ ( | ||
81 | "ldb %0, @%2 \n\t" | ||
82 | "stb %1, @%2 \n\t" | ||
83 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
84 | break; | ||
85 | case 2: | ||
86 | __asm__ __volatile__ ( | ||
87 | "ldh %0, @%2 \n\t" | ||
88 | "sth %1, @%2 \n\t" | ||
89 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
90 | break; | ||
91 | case 4: | ||
92 | __asm__ __volatile__ ( | ||
93 | "ld %0, @%2 \n\t" | ||
94 | "st %1, @%2 \n\t" | ||
95 | : "=&r" (tmp) : "r" (x), "r" (ptr) : "memory"); | ||
96 | break; | ||
97 | default: | ||
98 | __xchg_called_with_bad_pointer(); | ||
99 | } | ||
100 | |||
101 | local_irq_restore(flags); | ||
102 | |||
103 | return (tmp); | ||
104 | } | ||
105 | |||
106 | #define xchg_local(ptr, x) \ | ||
107 | ((__typeof__(*(ptr)))__xchg_local((unsigned long)(x), (ptr), \ | ||
108 | sizeof(*(ptr)))) | ||
109 | |||
110 | #define __HAVE_ARCH_CMPXCHG 1 | ||
111 | |||
112 | static inline unsigned long | ||
113 | __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) | ||
114 | { | ||
115 | unsigned long flags; | ||
116 | unsigned int retval; | ||
117 | |||
118 | local_irq_save(flags); | ||
119 | __asm__ __volatile__ ( | ||
120 | DCACHE_CLEAR("%0", "r4", "%1") | ||
121 | M32R_LOCK" %0, @%1; \n" | ||
122 | " bne %0, %2, 1f; \n" | ||
123 | M32R_UNLOCK" %3, @%1; \n" | ||
124 | " bra 2f; \n" | ||
125 | " .fillinsn \n" | ||
126 | "1:" | ||
127 | M32R_UNLOCK" %0, @%1; \n" | ||
128 | " .fillinsn \n" | ||
129 | "2:" | ||
130 | : "=&r" (retval) | ||
131 | : "r" (p), "r" (old), "r" (new) | ||
132 | : "cbit", "memory" | ||
133 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
134 | , "r4" | ||
135 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
136 | ); | ||
137 | local_irq_restore(flags); | ||
138 | |||
139 | return retval; | ||
140 | } | ||
141 | |||
142 | static inline unsigned long | ||
143 | __cmpxchg_local_u32(volatile unsigned int *p, unsigned int old, | ||
144 | unsigned int new) | ||
145 | { | ||
146 | unsigned long flags; | ||
147 | unsigned int retval; | ||
148 | |||
149 | local_irq_save(flags); | ||
150 | __asm__ __volatile__ ( | ||
151 | DCACHE_CLEAR("%0", "r4", "%1") | ||
152 | "ld %0, @%1; \n" | ||
153 | " bne %0, %2, 1f; \n" | ||
154 | "st %3, @%1; \n" | ||
155 | " bra 2f; \n" | ||
156 | " .fillinsn \n" | ||
157 | "1:" | ||
158 | "st %0, @%1; \n" | ||
159 | " .fillinsn \n" | ||
160 | "2:" | ||
161 | : "=&r" (retval) | ||
162 | : "r" (p), "r" (old), "r" (new) | ||
163 | : "cbit", "memory" | ||
164 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
165 | , "r4" | ||
166 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
167 | ); | ||
168 | local_irq_restore(flags); | ||
169 | |||
170 | return retval; | ||
171 | } | ||
172 | |||
173 | /* This function doesn't exist, so you'll get a linker error | ||
174 | if something tries to do an invalid cmpxchg(). */ | ||
175 | extern void __cmpxchg_called_with_bad_pointer(void); | ||
176 | |||
177 | static inline unsigned long | ||
178 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | ||
179 | { | ||
180 | switch (size) { | ||
181 | case 4: | ||
182 | return __cmpxchg_u32(ptr, old, new); | ||
183 | #if 0 /* we don't have __cmpxchg_u64 */ | ||
184 | case 8: | ||
185 | return __cmpxchg_u64(ptr, old, new); | ||
186 | #endif /* 0 */ | ||
187 | } | ||
188 | __cmpxchg_called_with_bad_pointer(); | ||
189 | return old; | ||
190 | } | ||
191 | |||
192 | #define cmpxchg(ptr, o, n) \ | ||
193 | ((__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)(o), \ | ||
194 | (unsigned long)(n), sizeof(*(ptr)))) | ||
195 | |||
196 | #include <asm-generic/cmpxchg-local.h> | ||
197 | |||
198 | static inline unsigned long __cmpxchg_local(volatile void *ptr, | ||
199 | unsigned long old, | ||
200 | unsigned long new, int size) | ||
201 | { | ||
202 | switch (size) { | ||
203 | case 4: | ||
204 | return __cmpxchg_local_u32(ptr, old, new); | ||
205 | default: | ||
206 | return __cmpxchg_local_generic(ptr, old, new, size); | ||
207 | } | ||
208 | |||
209 | return old; | ||
210 | } | ||
211 | |||
212 | /* | ||
213 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
214 | * them available. | ||
215 | */ | ||
216 | #define cmpxchg_local(ptr, o, n) \ | ||
217 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \ | ||
218 | (unsigned long)(n), sizeof(*(ptr)))) | ||
219 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
220 | |||
221 | #endif /* _ASM_M32R_CMPXCHG_H */ | ||
diff --git a/arch/m32r/include/asm/dcache_clear.h b/arch/m32r/include/asm/dcache_clear.h deleted file mode 100644 index a0ae06c2e9e..00000000000 --- a/arch/m32r/include/asm/dcache_clear.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2001 Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto | ||
7 | * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> | ||
8 | */ | ||
9 | #ifndef _ASM_M32R_DCACHE_CLEAR_H | ||
10 | #define _ASM_M32R_DCACHE_CLEAR_H | ||
11 | |||
12 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
13 | #define DCACHE_CLEAR(reg0, reg1, addr) \ | ||
14 | "seth "reg1", #high(dcache_dummy); \n\t" \ | ||
15 | "or3 "reg1", "reg1", #low(dcache_dummy); \n\t" \ | ||
16 | "lock "reg0", @"reg1"; \n\t" \ | ||
17 | "add3 "reg0", "addr", #0x1000; \n\t" \ | ||
18 | "ld "reg0", @"reg0"; \n\t" \ | ||
19 | "add3 "reg0", "addr", #0x2000; \n\t" \ | ||
20 | "ld "reg0", @"reg0"; \n\t" \ | ||
21 | "unlock "reg0", @"reg1"; \n\t" | ||
22 | /* FIXME: This workaround code cannot handle kernel modules | ||
23 | * correctly under SMP environment. | ||
24 | */ | ||
25 | #else /* CONFIG_CHIP_M32700_TS1 */ | ||
26 | #define DCACHE_CLEAR(reg0, reg1, addr) | ||
27 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
28 | |||
29 | #endif /* _ASM_M32R_DCACHE_CLEAR_H */ | ||
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h index 70896161c63..b8da7d0574d 100644 --- a/arch/m32r/include/asm/elf.h +++ b/arch/m32r/include/asm/elf.h | |||
@@ -128,7 +128,6 @@ typedef elf_fpreg_t elf_fpregset_t; | |||
128 | intent than poking at uname or /proc/cpuinfo. */ | 128 | intent than poking at uname or /proc/cpuinfo. */ |
129 | #define ELF_PLATFORM (NULL) | 129 | #define ELF_PLATFORM (NULL) |
130 | 130 | ||
131 | #define SET_PERSONALITY(ex) \ | 131 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) |
132 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
133 | 132 | ||
134 | #endif /* _ASM_M32R__ELF_H */ | 133 | #endif /* _ASM_M32R__ELF_H */ |
diff --git a/arch/m32r/include/asm/local.h b/arch/m32r/include/asm/local.h index 4045db3e4f6..734bca87018 100644 --- a/arch/m32r/include/asm/local.h +++ b/arch/m32r/include/asm/local.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
15 | #include <asm/system.h> | ||
15 | #include <asm/local.h> | 16 | #include <asm/local.h> |
16 | 17 | ||
17 | /* | 18 | /* |
diff --git a/arch/m32r/include/asm/processor.h b/arch/m32r/include/asm/processor.h index 5767367550c..e1f46d75746 100644 --- a/arch/m32r/include/asm/processor.h +++ b/arch/m32r/include/asm/processor.h | |||
@@ -118,6 +118,13 @@ struct mm_struct; | |||
118 | /* Free all resources held by a thread. */ | 118 | /* Free all resources held by a thread. */ |
119 | extern void release_thread(struct task_struct *); | 119 | extern void release_thread(struct task_struct *); |
120 | 120 | ||
121 | #define prepare_to_copy(tsk) do { } while (0) | ||
122 | |||
123 | /* | ||
124 | * create a kernel thread without removing it from tasklists | ||
125 | */ | ||
126 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
127 | |||
121 | /* Copy and release all segment info associated with a VM */ | 128 | /* Copy and release all segment info associated with a VM */ |
122 | extern void copy_segments(struct task_struct *p, struct mm_struct * mm); | 129 | extern void copy_segments(struct task_struct *p, struct mm_struct * mm); |
123 | extern void release_segments(struct mm_struct * mm); | 130 | extern void release_segments(struct mm_struct * mm); |
diff --git a/arch/m32r/include/asm/ptrace.h b/arch/m32r/include/asm/ptrace.h index fa58ccfff86..527527584dd 100644 --- a/arch/m32r/include/asm/ptrace.h +++ b/arch/m32r/include/asm/ptrace.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PTRACE_H | ||
2 | #define _ASM_M32R_PTRACE_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * linux/include/asm-m32r/ptrace.h | 5 | * linux/include/asm-m32r/ptrace.h |
3 | * | 6 | * |
@@ -8,12 +11,114 @@ | |||
8 | * M32R version: | 11 | * M32R version: |
9 | * Copyright (C) 2001-2002, 2004 Hirokazu Takata <takata at linux-m32r.org> | 12 | * Copyright (C) 2001-2002, 2004 Hirokazu Takata <takata at linux-m32r.org> |
10 | */ | 13 | */ |
11 | #ifndef _ASM_M32R_PTRACE_H | 14 | |
12 | #define _ASM_M32R_PTRACE_H | 15 | /* 0 - 13 are integer registers (general purpose registers). */ |
16 | #define PT_R4 0 | ||
17 | #define PT_R5 1 | ||
18 | #define PT_R6 2 | ||
19 | #define PT_REGS 3 | ||
20 | #define PT_R0 4 | ||
21 | #define PT_R1 5 | ||
22 | #define PT_R2 6 | ||
23 | #define PT_R3 7 | ||
24 | #define PT_R7 8 | ||
25 | #define PT_R8 9 | ||
26 | #define PT_R9 10 | ||
27 | #define PT_R10 11 | ||
28 | #define PT_R11 12 | ||
29 | #define PT_R12 13 | ||
30 | #define PT_SYSCNR 14 | ||
31 | #define PT_R13 PT_FP | ||
32 | #define PT_R14 PT_LR | ||
33 | #define PT_R15 PT_SP | ||
34 | |||
35 | /* processor status and miscellaneous context registers. */ | ||
36 | #define PT_ACC0H 15 | ||
37 | #define PT_ACC0L 16 | ||
38 | #define PT_ACC1H 17 /* ISA_DSP_LEVEL2 only */ | ||
39 | #define PT_ACC1L 18 /* ISA_DSP_LEVEL2 only */ | ||
40 | #define PT_PSW 19 | ||
41 | #define PT_BPC 20 | ||
42 | #define PT_BBPSW 21 | ||
43 | #define PT_BBPC 22 | ||
44 | #define PT_SPU 23 | ||
45 | #define PT_FP 24 | ||
46 | #define PT_LR 25 | ||
47 | #define PT_SPI 26 | ||
48 | #define PT_ORIGR0 27 | ||
49 | |||
50 | /* virtual pt_reg entry for gdb */ | ||
51 | #define PT_PC 30 | ||
52 | #define PT_CBR 31 | ||
53 | #define PT_EVB 32 | ||
13 | 54 | ||
14 | 55 | ||
56 | /* Control registers. */ | ||
57 | #define SPR_CR0 PT_PSW | ||
58 | #define SPR_CR1 PT_CBR /* read only */ | ||
59 | #define SPR_CR2 PT_SPI | ||
60 | #define SPR_CR3 PT_SPU | ||
61 | #define SPR_CR4 | ||
62 | #define SPR_CR5 PT_EVB /* part of M32R/E, M32R/I core only */ | ||
63 | #define SPR_CR6 PT_BPC | ||
64 | #define SPR_CR7 | ||
65 | #define SPR_CR8 PT_BBPSW | ||
66 | #define SPR_CR9 | ||
67 | #define SPR_CR10 | ||
68 | #define SPR_CR11 | ||
69 | #define SPR_CR12 | ||
70 | #define SPR_CR13 PT_WR | ||
71 | #define SPR_CR14 PT_BBPC | ||
72 | #define SPR_CR15 | ||
73 | |||
74 | /* this struct defines the way the registers are stored on the | ||
75 | stack during a system call. */ | ||
76 | struct pt_regs { | ||
77 | /* Saved main processor registers. */ | ||
78 | unsigned long r4; | ||
79 | unsigned long r5; | ||
80 | unsigned long r6; | ||
81 | struct pt_regs *pt_regs; | ||
82 | unsigned long r0; | ||
83 | unsigned long r1; | ||
84 | unsigned long r2; | ||
85 | unsigned long r3; | ||
86 | unsigned long r7; | ||
87 | unsigned long r8; | ||
88 | unsigned long r9; | ||
89 | unsigned long r10; | ||
90 | unsigned long r11; | ||
91 | unsigned long r12; | ||
92 | long syscall_nr; | ||
93 | |||
94 | /* Saved main processor status and miscellaneous context registers. */ | ||
95 | unsigned long acc0h; | ||
96 | unsigned long acc0l; | ||
97 | unsigned long acc1h; /* ISA_DSP_LEVEL2 only */ | ||
98 | unsigned long acc1l; /* ISA_DSP_LEVEL2 only */ | ||
99 | unsigned long psw; | ||
100 | unsigned long bpc; /* saved PC for TRAP syscalls */ | ||
101 | unsigned long bbpsw; | ||
102 | unsigned long bbpc; | ||
103 | unsigned long spu; /* saved user stack */ | ||
104 | unsigned long fp; | ||
105 | unsigned long lr; /* saved PC for JL syscalls */ | ||
106 | unsigned long spi; /* saved kernel stack */ | ||
107 | unsigned long orig_r0; | ||
108 | }; | ||
109 | |||
110 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
111 | #define PTRACE_GETREGS 12 | ||
112 | #define PTRACE_SETREGS 13 | ||
113 | |||
114 | #define PTRACE_OLDSETOPTIONS 21 | ||
115 | |||
116 | /* options set using PTRACE_SETOPTIONS */ | ||
117 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | ||
118 | |||
119 | #ifdef __KERNEL__ | ||
120 | |||
15 | #include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */ | 121 | #include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */ |
16 | #include <uapi/asm/ptrace.h> | ||
17 | 122 | ||
18 | #define arch_has_single_step() (1) | 123 | #define arch_has_single_step() (1) |
19 | 124 | ||
@@ -32,13 +137,12 @@ extern void init_debug_traps(struct task_struct *); | |||
32 | 137 | ||
33 | #define instruction_pointer(regs) ((regs)->bpc) | 138 | #define instruction_pointer(regs) ((regs)->bpc) |
34 | #define profile_pc(regs) instruction_pointer(regs) | 139 | #define profile_pc(regs) instruction_pointer(regs) |
35 | #define user_stack_pointer(regs) ((regs)->spu) | ||
36 | 140 | ||
37 | extern void withdraw_debug_trap(struct pt_regs *regs); | 141 | extern void withdraw_debug_trap(struct pt_regs *regs); |
38 | 142 | ||
39 | #define task_pt_regs(task) \ | 143 | #define task_pt_regs(task) \ |
40 | ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1) | 144 | ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1) |
41 | #define current_pt_regs() ((struct pt_regs *) \ | 145 | |
42 | ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | 146 | #endif /* __KERNEL */ |
43 | 147 | ||
44 | #endif /* _ASM_M32R_PTRACE_H */ | 148 | #endif /* _ASM_M32R_PTRACE_H */ |
diff --git a/arch/m32r/include/asm/setup.h b/arch/m32r/include/asm/setup.h index bbe59a9ce8c..c637ab99239 100644 --- a/arch/m32r/include/asm/setup.h +++ b/arch/m32r/include/asm/setup.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #ifndef _ASM_M32R_SETUP_H | 1 | #ifndef _ASM_M32R_SETUP_H |
2 | #define _ASM_M32R_SETUP_H | 2 | #define _ASM_M32R_SETUP_H |
3 | 3 | ||
4 | #include <uapi/asm/setup.h> | 4 | /* |
5 | * This is set up by the setup-routine at boot-time | ||
6 | */ | ||
5 | 7 | ||
8 | #define COMMAND_LINE_SIZE 512 | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
6 | 11 | ||
7 | #define PARAM ((unsigned char *)empty_zero_page) | 12 | #define PARAM ((unsigned char *)empty_zero_page) |
8 | 13 | ||
@@ -28,4 +33,6 @@ | |||
28 | extern unsigned long memory_start; | 33 | extern unsigned long memory_start; |
29 | extern unsigned long memory_end; | 34 | extern unsigned long memory_end; |
30 | 35 | ||
36 | #endif /* __KERNEL__ */ | ||
37 | |||
31 | #endif /* _ASM_M32R_SETUP_H */ | 38 | #endif /* _ASM_M32R_SETUP_H */ |
diff --git a/arch/m32r/include/asm/signal.h b/arch/m32r/include/asm/signal.h index a5ba4a217fb..b2eeb0de1c8 100644 --- a/arch/m32r/include/asm/signal.h +++ b/arch/m32r/include/asm/signal.h | |||
@@ -1,8 +1,14 @@ | |||
1 | #ifndef _ASM_M32R_SIGNAL_H | 1 | #ifndef _ASM_M32R_SIGNAL_H |
2 | #define _ASM_M32R_SIGNAL_H | 2 | #define _ASM_M32R_SIGNAL_H |
3 | 3 | ||
4 | #include <uapi/asm/signal.h> | 4 | #include <linux/types.h> |
5 | #include <linux/time.h> | ||
6 | #include <linux/compiler.h> | ||
5 | 7 | ||
8 | /* Avoid too many header ordering problems. */ | ||
9 | struct siginfo; | ||
10 | |||
11 | #ifdef __KERNEL__ | ||
6 | /* Most things should be clean enough to redefine this at will, if care | 12 | /* Most things should be clean enough to redefine this at will, if care |
7 | is taken to make libc match. */ | 13 | is taken to make libc match. */ |
8 | 14 | ||
@@ -16,6 +22,101 @@ typedef struct { | |||
16 | unsigned long sig[_NSIG_WORDS]; | 22 | unsigned long sig[_NSIG_WORDS]; |
17 | } sigset_t; | 23 | } sigset_t; |
18 | 24 | ||
25 | #else | ||
26 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
27 | |||
28 | #define NSIG 32 | ||
29 | typedef unsigned long sigset_t; | ||
30 | |||
31 | #endif /* __KERNEL__ */ | ||
32 | |||
33 | #define SIGHUP 1 | ||
34 | #define SIGINT 2 | ||
35 | #define SIGQUIT 3 | ||
36 | #define SIGILL 4 | ||
37 | #define SIGTRAP 5 | ||
38 | #define SIGABRT 6 | ||
39 | #define SIGIOT 6 | ||
40 | #define SIGBUS 7 | ||
41 | #define SIGFPE 8 | ||
42 | #define SIGKILL 9 | ||
43 | #define SIGUSR1 10 | ||
44 | #define SIGSEGV 11 | ||
45 | #define SIGUSR2 12 | ||
46 | #define SIGPIPE 13 | ||
47 | #define SIGALRM 14 | ||
48 | #define SIGTERM 15 | ||
49 | #define SIGSTKFLT 16 | ||
50 | #define SIGCHLD 17 | ||
51 | #define SIGCONT 18 | ||
52 | #define SIGSTOP 19 | ||
53 | #define SIGTSTP 20 | ||
54 | #define SIGTTIN 21 | ||
55 | #define SIGTTOU 22 | ||
56 | #define SIGURG 23 | ||
57 | #define SIGXCPU 24 | ||
58 | #define SIGXFSZ 25 | ||
59 | #define SIGVTALRM 26 | ||
60 | #define SIGPROF 27 | ||
61 | #define SIGWINCH 28 | ||
62 | #define SIGIO 29 | ||
63 | #define SIGPOLL SIGIO | ||
64 | /* | ||
65 | #define SIGLOST 29 | ||
66 | */ | ||
67 | #define SIGPWR 30 | ||
68 | #define SIGSYS 31 | ||
69 | #define SIGUNUSED 31 | ||
70 | |||
71 | /* These should not be considered constants from userland. */ | ||
72 | #define SIGRTMIN 32 | ||
73 | #define SIGRTMAX _NSIG | ||
74 | |||
75 | /* | ||
76 | * SA_FLAGS values: | ||
77 | * | ||
78 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
79 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
80 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
81 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
82 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
83 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
84 | * | ||
85 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
86 | * Unix names RESETHAND and NODEFER respectively. | ||
87 | */ | ||
88 | #define SA_NOCLDSTOP 0x00000001u | ||
89 | #define SA_NOCLDWAIT 0x00000002u | ||
90 | #define SA_SIGINFO 0x00000004u | ||
91 | #define SA_ONSTACK 0x08000000u | ||
92 | #define SA_RESTART 0x10000000u | ||
93 | #define SA_NODEFER 0x40000000u | ||
94 | #define SA_RESETHAND 0x80000000u | ||
95 | |||
96 | #define SA_NOMASK SA_NODEFER | ||
97 | #define SA_ONESHOT SA_RESETHAND | ||
98 | |||
99 | #define SA_RESTORER 0x04000000 | ||
100 | |||
101 | /* | ||
102 | * sigaltstack controls | ||
103 | */ | ||
104 | #define SS_ONSTACK 1 | ||
105 | #define SS_DISABLE 2 | ||
106 | |||
107 | #define MINSIGSTKSZ 2048 | ||
108 | #define SIGSTKSZ 8192 | ||
109 | |||
110 | #include <asm-generic/signal-defs.h> | ||
111 | |||
112 | #ifdef __KERNEL__ | ||
113 | struct old_sigaction { | ||
114 | __sighandler_t sa_handler; | ||
115 | old_sigset_t sa_mask; | ||
116 | unsigned long sa_flags; | ||
117 | __sigrestore_t sa_restorer; | ||
118 | }; | ||
119 | |||
19 | struct sigaction { | 120 | struct sigaction { |
20 | __sighandler_t sa_handler; | 121 | __sighandler_t sa_handler; |
21 | unsigned long sa_flags; | 122 | unsigned long sa_flags; |
@@ -26,8 +127,39 @@ struct sigaction { | |||
26 | struct k_sigaction { | 127 | struct k_sigaction { |
27 | struct sigaction sa; | 128 | struct sigaction sa; |
28 | }; | 129 | }; |
130 | #else | ||
131 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
132 | |||
133 | struct sigaction { | ||
134 | union { | ||
135 | __sighandler_t _sa_handler; | ||
136 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
137 | } _u; | ||
138 | sigset_t sa_mask; | ||
139 | unsigned long sa_flags; | ||
140 | void (*sa_restorer)(void); | ||
141 | }; | ||
142 | |||
143 | #define sa_handler _u._sa_handler | ||
144 | #define sa_sigaction _u._sa_sigaction | ||
145 | |||
146 | #endif /* __KERNEL__ */ | ||
147 | |||
148 | typedef struct sigaltstack { | ||
149 | void __user *ss_sp; | ||
150 | int ss_flags; | ||
151 | size_t ss_size; | ||
152 | } stack_t; | ||
153 | |||
154 | #ifdef __KERNEL__ | ||
29 | #include <asm/sigcontext.h> | 155 | #include <asm/sigcontext.h> |
30 | 156 | ||
31 | #undef __HAVE_ARCH_SIG_BITOPS | 157 | #undef __HAVE_ARCH_SIG_BITOPS |
32 | 158 | ||
159 | struct pt_regs; | ||
160 | |||
161 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
162 | |||
163 | #endif /* __KERNEL__ */ | ||
164 | |||
33 | #endif /* _ASM_M32R_SIGNAL_H */ | 165 | #endif /* _ASM_M32R_SIGNAL_H */ |
diff --git a/arch/m32r/include/asm/smp.h b/arch/m32r/include/asm/smp.h index c689b828dfe..cf7829a6155 100644 --- a/arch/m32r/include/asm/smp.h +++ b/arch/m32r/include/asm/smp.h | |||
@@ -79,6 +79,11 @@ static __inline__ int cpu_number_map(int cpu) | |||
79 | return cpu; | 79 | return cpu; |
80 | } | 80 | } |
81 | 81 | ||
82 | static __inline__ unsigned int num_booting_cpus(void) | ||
83 | { | ||
84 | return cpumask_weight(&cpu_callout_map); | ||
85 | } | ||
86 | |||
82 | extern void smp_send_timer(void); | 87 | extern void smp_send_timer(void); |
83 | extern unsigned long send_IPI_mask_phys(const cpumask_t*, int, int); | 88 | extern unsigned long send_IPI_mask_phys(const cpumask_t*, int, int); |
84 | 89 | ||
diff --git a/arch/m32r/include/asm/spinlock.h b/arch/m32r/include/asm/spinlock.h index fa13694eaae..b0ea2f26da3 100644 --- a/arch/m32r/include/asm/spinlock.h +++ b/arch/m32r/include/asm/spinlock.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <asm/dcache_clear.h> | ||
15 | #include <asm/page.h> | 14 | #include <asm/page.h> |
16 | 15 | ||
17 | /* | 16 | /* |
diff --git a/arch/m32r/include/asm/switch_to.h b/arch/m32r/include/asm/switch_to.h deleted file mode 100644 index 4b262f7a8fe..00000000000 --- a/arch/m32r/include/asm/switch_to.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2001 Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto | ||
7 | * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> | ||
8 | */ | ||
9 | #ifndef _ASM_M32R_SWITCH_TO_H | ||
10 | #define _ASM_M32R_SWITCH_TO_H | ||
11 | |||
12 | /* | ||
13 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
14 | * `prev' will never be the same as `next'. | ||
15 | * | ||
16 | * `next' and `prev' should be struct task_struct, but it isn't always defined | ||
17 | */ | ||
18 | |||
19 | #if defined(CONFIG_FRAME_POINTER) || \ | ||
20 | !defined(CONFIG_SCHED_OMIT_FRAME_POINTER) | ||
21 | #define M32R_PUSH_FP " push fp\n" | ||
22 | #define M32R_POP_FP " pop fp\n" | ||
23 | #else | ||
24 | #define M32R_PUSH_FP "" | ||
25 | #define M32R_POP_FP "" | ||
26 | #endif | ||
27 | |||
28 | #define switch_to(prev, next, last) do { \ | ||
29 | __asm__ __volatile__ ( \ | ||
30 | " seth lr, #high(1f) \n" \ | ||
31 | " or3 lr, lr, #low(1f) \n" \ | ||
32 | " st lr, @%4 ; store old LR \n" \ | ||
33 | " ld lr, @%5 ; load new LR \n" \ | ||
34 | M32R_PUSH_FP \ | ||
35 | " st sp, @%2 ; store old SP \n" \ | ||
36 | " ld sp, @%3 ; load new SP \n" \ | ||
37 | " push %1 ; store `prev' on new stack \n" \ | ||
38 | " jmp lr \n" \ | ||
39 | " .fillinsn \n" \ | ||
40 | "1: \n" \ | ||
41 | " pop %0 ; restore `__last' from new stack \n" \ | ||
42 | M32R_POP_FP \ | ||
43 | : "=r" (last) \ | ||
44 | : "0" (prev), \ | ||
45 | "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \ | ||
46 | "r" (&(prev->thread.lr)), "r" (&(next->thread.lr)) \ | ||
47 | : "memory", "lr" \ | ||
48 | ); \ | ||
49 | } while(0) | ||
50 | |||
51 | #endif /* _ASM_M32R_SWITCH_TO_H */ | ||
diff --git a/arch/m32r/include/asm/termios.h b/arch/m32r/include/asm/termios.h index 680898f0b3d..93ce79fd342 100644 --- a/arch/m32r/include/asm/termios.h +++ b/arch/m32r/include/asm/termios.h | |||
@@ -1,8 +1,46 @@ | |||
1 | #ifndef _M32R_TERMIOS_H | 1 | #ifndef _M32R_TERMIOS_H |
2 | #define _M32R_TERMIOS_H | 2 | #define _M32R_TERMIOS_H |
3 | 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 | /* modem lines */ | ||
25 | #define TIOCM_LE 0x001 | ||
26 | #define TIOCM_DTR 0x002 | ||
27 | #define TIOCM_RTS 0x004 | ||
28 | #define TIOCM_ST 0x008 | ||
29 | #define TIOCM_SR 0x010 | ||
30 | #define TIOCM_CTS 0x020 | ||
31 | #define TIOCM_CAR 0x040 | ||
32 | #define TIOCM_RNG 0x080 | ||
33 | #define TIOCM_DSR 0x100 | ||
34 | #define TIOCM_CD TIOCM_CAR | ||
35 | #define TIOCM_RI TIOCM_RNG | ||
36 | #define TIOCM_OUT1 0x2000 | ||
37 | #define TIOCM_OUT2 0x4000 | ||
38 | #define TIOCM_LOOP 0x8000 | ||
39 | |||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
4 | #include <linux/module.h> | 43 | #include <linux/module.h> |
5 | #include <uapi/asm/termios.h> | ||
6 | 44 | ||
7 | /* intr=^C quit=^\ erase=del kill=^U | 45 | /* intr=^C quit=^\ erase=del kill=^U |
8 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 46 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
@@ -48,4 +86,6 @@ | |||
48 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | 86 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) |
49 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | 87 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) |
50 | 88 | ||
89 | #endif /* __KERNEL__ */ | ||
90 | |||
51 | #endif /* _M32R_TERMIOS_H */ | 91 | #endif /* _M32R_TERMIOS_H */ |
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index c074f4c2e85..0227dba4406 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -55,8 +55,8 @@ struct thread_info { | |||
55 | 55 | ||
56 | #define PREEMPT_ACTIVE 0x10000000 | 56 | #define PREEMPT_ACTIVE 0x10000000 |
57 | 57 | ||
58 | #define THREAD_SIZE (PAGE_SIZE << 1) | 58 | #define THREAD_SIZE (PAGE_SIZE << 1) |
59 | #define THREAD_SIZE_ORDER 1 | 59 | |
60 | /* | 60 | /* |
61 | * macros/functions for gaining access to the thread information structure | 61 | * macros/functions for gaining access to the thread information structure |
62 | */ | 62 | */ |
@@ -92,6 +92,19 @@ static inline struct thread_info *current_thread_info(void) | |||
92 | return ti; | 92 | return ti; |
93 | } | 93 | } |
94 | 94 | ||
95 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
96 | |||
97 | /* thread information allocation */ | ||
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
99 | #define alloc_thread_info_node(tsk, node) \ | ||
100 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
101 | #else | ||
102 | #define alloc_thread_info_node(tsk, node) \ | ||
103 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
104 | #endif | ||
105 | |||
106 | #define free_thread_info(info) kfree(info) | ||
107 | |||
95 | #define TI_FLAG_FAULT_CODE_SHIFT 28 | 108 | #define TI_FLAG_FAULT_CODE_SHIFT 28 |
96 | 109 | ||
97 | static inline void set_thread_fault_code(unsigned int val) | 110 | static inline void set_thread_fault_code(unsigned int val) |
@@ -119,20 +132,27 @@ static inline unsigned int get_thread_fault_code(void) | |||
119 | #define TIF_SIGPENDING 1 /* signal pending */ | 132 | #define TIF_SIGPENDING 1 /* signal pending */ |
120 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 133 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
121 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ | 134 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
135 | #define TIF_IRET 4 /* return with iret */ | ||
122 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ | 136 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ |
123 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ | 137 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ |
124 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 138 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
139 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
125 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 140 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
141 | #define TIF_FREEZE 19 /* is freezing for suspend */ | ||
126 | 142 | ||
127 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 143 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
128 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 144 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
129 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 145 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
130 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 146 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
147 | #define _TIF_IRET (1<<TIF_IRET) | ||
131 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 148 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
149 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
132 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 150 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
151 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
152 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
133 | 153 | ||
134 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_NOTIFY_RESUME) | 154 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
135 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | _TIF_SYSCALL_TRACE) | 155 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
136 | 156 | ||
137 | /* | 157 | /* |
138 | * Thread-synchronous status. | 158 | * Thread-synchronous status. |
diff --git a/arch/m32r/include/asm/types.h b/arch/m32r/include/asm/types.h index 04a44c6ee34..bd0035597b3 100644 --- a/arch/m32r/include/asm/types.h +++ b/arch/m32r/include/asm/types.h | |||
@@ -1,12 +1,21 @@ | |||
1 | #ifndef _ASM_M32R_TYPES_H | 1 | #ifndef _ASM_M32R_TYPES_H |
2 | #define _ASM_M32R_TYPES_H | 2 | #define _ASM_M32R_TYPES_H |
3 | 3 | ||
4 | #include <uapi/asm/types.h> | 4 | #include <asm-generic/int-ll64.h> |
5 | |||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | typedef unsigned short umode_t; | ||
9 | |||
10 | #endif /* __ASSEMBLY__ */ | ||
5 | 11 | ||
6 | /* | 12 | /* |
7 | * These aren't exported outside the kernel to avoid name space clashes | 13 | * These aren't exported outside the kernel to avoid name space clashes |
8 | */ | 14 | */ |
15 | #ifdef __KERNEL__ | ||
9 | 16 | ||
10 | #define BITS_PER_LONG 32 | 17 | #define BITS_PER_LONG 32 |
11 | 18 | ||
19 | #endif /* __KERNEL__ */ | ||
20 | |||
12 | #endif /* _ASM_M32R_TYPES_H */ | 21 | #endif /* _ASM_M32R_TYPES_H */ |
diff --git a/arch/m32r/include/asm/unistd.h b/arch/m32r/include/asm/unistd.h index 79b063caec8..3e1db561aac 100644 --- a/arch/m32r/include/asm/unistd.h +++ b/arch/m32r/include/asm/unistd.h | |||
@@ -1,11 +1,342 @@ | |||
1 | #ifndef _ASM_M32R_UNISTD_H | 1 | #ifndef _ASM_M32R_UNISTD_H |
2 | #define _ASM_M32R_UNISTD_H | 2 | #define _ASM_M32R_UNISTD_H |
3 | 3 | ||
4 | #include <uapi/asm/unistd.h> | 4 | /* |
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | /* 16 is unused */ | ||
25 | /* 17 is unused */ | ||
26 | /* 18 is unused */ | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | /* 23 is unused */ | ||
32 | /* 24 is unused */ | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | /* 28 is unused */ | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | /* 31 is unused */ | ||
40 | #define __NR_cachectl 32 /* old #define __NR_gtty 32*/ | ||
41 | #define __NR_access 33 | ||
42 | /* 34 is unused */ | ||
43 | /* 35 is unused */ | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | /* 44 is unused */ | ||
53 | #define __NR_brk 45 | ||
54 | /* 46 is unused */ | ||
55 | /* 47 is unused (getgid16) */ | ||
56 | /* 48 is unused */ | ||
57 | /* 49 is unused */ | ||
58 | /* 50 is unused */ | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | /* 53 is unused */ | ||
62 | #define __NR_ioctl 54 | ||
63 | /* 55 is unused (fcntl) */ | ||
64 | /* 56 is unused */ | ||
65 | #define __NR_setpgid 57 | ||
66 | /* 58 is unused */ | ||
67 | /* 59 is unused */ | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | /* 67 is unused */ | ||
76 | /* 68 is unused*/ | ||
77 | /* 69 is unused*/ | ||
78 | /* 70 is unused */ | ||
79 | /* 71 is unused */ | ||
80 | /* 72 is unused */ | ||
81 | /* 73 is unused */ | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | /* 76 is unused (old getrlimit) */ | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | /* 80 is unused */ | ||
89 | /* 81 is unused */ | ||
90 | /* 82 is unused */ | ||
91 | #define __NR_symlink 83 | ||
92 | /* 84 is unused */ | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | /* 89 is unused */ | ||
98 | /* 90 is unused */ | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | /* 95 is unused */ | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | /* 98 is unused */ | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | /* 101 is unused */ | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | /* 109 is unused */ | ||
118 | /* 110 is unused */ | ||
119 | #define __NR_vhangup 111 | ||
120 | /* 112 is unused */ | ||
121 | /* 113 is unused */ | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | /* 119 is unused */ | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | /* 123 is unused */ | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | /* 126 is unused */ | ||
135 | /* 127 is unused */ | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | /* 130 is unused */ | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | /* 137 is unused */ | ||
146 | /* 138 is unused */ | ||
147 | /* 139 is unused */ | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | /* 164 is unused */ | ||
173 | /* 165 is unused */ | ||
174 | #define __NR_tas 166 | ||
175 | /* 167 is unused */ | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | /* 170 is unused */ | ||
179 | /* 171 is unused */ | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | /* 182 is unused */ | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | /* 188 is unused */ | ||
197 | /* 189 is unused */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_lchown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_chown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | #define __NR_mincore 218 | ||
227 | #define __NR_madvise 219 | ||
228 | #define __NR_getdents64 220 | ||
229 | #define __NR_fcntl64 221 | ||
230 | /* 222 is unused */ | ||
231 | /* 223 is unused */ | ||
232 | #define __NR_gettid 224 | ||
233 | #define __NR_readahead 225 | ||
234 | #define __NR_setxattr 226 | ||
235 | #define __NR_lsetxattr 227 | ||
236 | #define __NR_fsetxattr 228 | ||
237 | #define __NR_getxattr 229 | ||
238 | #define __NR_lgetxattr 230 | ||
239 | #define __NR_fgetxattr 231 | ||
240 | #define __NR_listxattr 232 | ||
241 | #define __NR_llistxattr 233 | ||
242 | #define __NR_flistxattr 234 | ||
243 | #define __NR_removexattr 235 | ||
244 | #define __NR_lremovexattr 236 | ||
245 | #define __NR_fremovexattr 237 | ||
246 | #define __NR_tkill 238 | ||
247 | #define __NR_sendfile64 239 | ||
248 | #define __NR_futex 240 | ||
249 | #define __NR_sched_setaffinity 241 | ||
250 | #define __NR_sched_getaffinity 242 | ||
251 | #define __NR_set_thread_area 243 | ||
252 | #define __NR_get_thread_area 244 | ||
253 | #define __NR_io_setup 245 | ||
254 | #define __NR_io_destroy 246 | ||
255 | #define __NR_io_getevents 247 | ||
256 | #define __NR_io_submit 248 | ||
257 | #define __NR_io_cancel 249 | ||
258 | #define __NR_fadvise64 250 | ||
259 | /* 251 is unused */ | ||
260 | #define __NR_exit_group 252 | ||
261 | #define __NR_lookup_dcookie 253 | ||
262 | #define __NR_epoll_create 254 | ||
263 | #define __NR_epoll_ctl 255 | ||
264 | #define __NR_epoll_wait 256 | ||
265 | #define __NR_remap_file_pages 257 | ||
266 | #define __NR_set_tid_address 258 | ||
267 | #define __NR_timer_create 259 | ||
268 | #define __NR_timer_settime (__NR_timer_create+1) | ||
269 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
270 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
271 | #define __NR_timer_delete (__NR_timer_create+4) | ||
272 | #define __NR_clock_settime (__NR_timer_create+5) | ||
273 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
274 | #define __NR_clock_getres (__NR_timer_create+7) | ||
275 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
276 | #define __NR_statfs64 268 | ||
277 | #define __NR_fstatfs64 269 | ||
278 | #define __NR_tgkill 270 | ||
279 | #define __NR_utimes 271 | ||
280 | #define __NR_fadvise64_64 272 | ||
281 | #define __NR_vserver 273 | ||
282 | #define __NR_mbind 274 | ||
283 | #define __NR_get_mempolicy 275 | ||
284 | #define __NR_set_mempolicy 276 | ||
285 | #define __NR_mq_open 277 | ||
286 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
287 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
289 | #define __NR_mq_notify (__NR_mq_open+4) | ||
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
291 | #define __NR_kexec_load 283 | ||
292 | #define __NR_waitid 284 | ||
293 | /* 285 is unused */ | ||
294 | #define __NR_add_key 286 | ||
295 | #define __NR_request_key 287 | ||
296 | #define __NR_keyctl 288 | ||
297 | #define __NR_ioprio_set 289 | ||
298 | #define __NR_ioprio_get 290 | ||
299 | #define __NR_inotify_init 291 | ||
300 | #define __NR_inotify_add_watch 292 | ||
301 | #define __NR_inotify_rm_watch 293 | ||
302 | #define __NR_migrate_pages 294 | ||
303 | #define __NR_openat 295 | ||
304 | #define __NR_mkdirat 296 | ||
305 | #define __NR_mknodat 297 | ||
306 | #define __NR_fchownat 298 | ||
307 | #define __NR_futimesat 299 | ||
308 | #define __NR_fstatat64 300 | ||
309 | #define __NR_unlinkat 301 | ||
310 | #define __NR_renameat 302 | ||
311 | #define __NR_linkat 303 | ||
312 | #define __NR_symlinkat 304 | ||
313 | #define __NR_readlinkat 305 | ||
314 | #define __NR_fchmodat 306 | ||
315 | #define __NR_faccessat 307 | ||
316 | #define __NR_pselect6 308 | ||
317 | #define __NR_ppoll 309 | ||
318 | #define __NR_unshare 310 | ||
319 | #define __NR_set_robust_list 311 | ||
320 | #define __NR_get_robust_list 312 | ||
321 | #define __NR_splice 313 | ||
322 | #define __NR_sync_file_range 314 | ||
323 | #define __NR_tee 315 | ||
324 | #define __NR_vmsplice 316 | ||
325 | #define __NR_move_pages 317 | ||
326 | #define __NR_getcpu 318 | ||
327 | #define __NR_epoll_pwait 319 | ||
328 | #define __NR_utimensat 320 | ||
329 | #define __NR_signalfd 321 | ||
330 | /* #define __NR_timerfd 322 removed */ | ||
331 | #define __NR_eventfd 323 | ||
332 | #define __NR_fallocate 324 | ||
333 | #define __NR_setns 325 | ||
5 | 334 | ||
335 | #ifdef __KERNEL__ | ||
6 | 336 | ||
7 | #define NR_syscalls 326 | 337 | #define NR_syscalls 326 |
8 | 338 | ||
339 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
9 | #define __ARCH_WANT_STAT64 | 340 | #define __ARCH_WANT_STAT64 |
10 | #define __ARCH_WANT_SYS_ALARM | 341 | #define __ARCH_WANT_SYS_ALARM |
11 | #define __ARCH_WANT_SYS_GETHOSTNAME | 342 | #define __ARCH_WANT_SYS_GETHOSTNAME |
@@ -22,9 +353,6 @@ | |||
22 | #define __ARCH_WANT_SYS_OLDUMOUNT | 353 | #define __ARCH_WANT_SYS_OLDUMOUNT |
23 | #define __ARCH_WANT_SYS_RT_SIGACTION | 354 | #define __ARCH_WANT_SYS_RT_SIGACTION |
24 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 355 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
25 | #define __ARCH_WANT_SYS_CLONE | ||
26 | #define __ARCH_WANT_SYS_FORK | ||
27 | #define __ARCH_WANT_SYS_VFORK | ||
28 | 356 | ||
29 | #define __IGNORE_lchown | 357 | #define __IGNORE_lchown |
30 | #define __IGNORE_setuid | 358 | #define __IGNORE_setuid |
@@ -60,4 +388,5 @@ | |||
60 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 388 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
61 | #endif | 389 | #endif |
62 | 390 | ||
391 | #endif /* __KERNEL__ */ | ||
63 | #endif /* _ASM_M32R_UNISTD_H */ | 392 | #endif /* _ASM_M32R_UNISTD_H */ |
diff --git a/arch/m32r/include/uapi/asm/Kbuild b/arch/m32r/include/uapi/asm/Kbuild deleted file mode 100644 index 43937a61d6c..00000000000 --- a/arch/m32r/include/uapi/asm/Kbuild +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += errno.h | ||
8 | header-y += fcntl.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += mman.h | ||
13 | header-y += msgbuf.h | ||
14 | header-y += param.h | ||
15 | header-y += poll.h | ||
16 | header-y += posix_types.h | ||
17 | header-y += ptrace.h | ||
18 | header-y += resource.h | ||
19 | header-y += sembuf.h | ||
20 | header-y += setup.h | ||
21 | header-y += shmbuf.h | ||
22 | header-y += sigcontext.h | ||
23 | header-y += siginfo.h | ||
24 | header-y += signal.h | ||
25 | header-y += socket.h | ||
26 | header-y += sockios.h | ||
27 | header-y += stat.h | ||
28 | header-y += statfs.h | ||
29 | header-y += swab.h | ||
30 | header-y += termbits.h | ||
31 | header-y += termios.h | ||
32 | header-y += types.h | ||
33 | header-y += unistd.h | ||
diff --git a/arch/m32r/include/uapi/asm/auxvec.h b/arch/m32r/include/uapi/asm/auxvec.h deleted file mode 100644 index f76dcc860fa..00000000000 --- a/arch/m32r/include/uapi/asm/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _ASM_M32R__AUXVEC_H | ||
2 | #define _ASM_M32R__AUXVEC_H | ||
3 | |||
4 | #endif /* _ASM_M32R__AUXVEC_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/bitsperlong.h b/arch/m32r/include/uapi/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b..00000000000 --- a/arch/m32r/include/uapi/asm/bitsperlong.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/m32r/include/uapi/asm/byteorder.h b/arch/m32r/include/uapi/asm/byteorder.h deleted file mode 100644 index 21855d8b028..00000000000 --- a/arch/m32r/include/uapi/asm/byteorder.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_BYTEORDER_H | ||
2 | #define _ASM_M32R_BYTEORDER_H | ||
3 | |||
4 | #if defined(__LITTLE_ENDIAN__) | ||
5 | # include <linux/byteorder/little_endian.h> | ||
6 | #else | ||
7 | # include <linux/byteorder/big_endian.h> | ||
8 | #endif | ||
9 | |||
10 | #endif /* _ASM_M32R_BYTEORDER_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/errno.h b/arch/m32r/include/uapi/asm/errno.h deleted file mode 100644 index 777149262aa..00000000000 --- a/arch/m32r/include/uapi/asm/errno.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_ERRNO_H | ||
2 | #define _ASM_M32R_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno.h> | ||
5 | |||
6 | #endif /* _ASM_M32R_ERRNO_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/fcntl.h b/arch/m32r/include/uapi/asm/fcntl.h deleted file mode 100644 index 46ab12db573..00000000000 --- a/arch/m32r/include/uapi/asm/fcntl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/fcntl.h> | ||
diff --git a/arch/m32r/include/uapi/asm/ioctl.h b/arch/m32r/include/uapi/asm/ioctl.h deleted file mode 100644 index b279fe06dfe..00000000000 --- a/arch/m32r/include/uapi/asm/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/arch/m32r/include/uapi/asm/ioctls.h b/arch/m32r/include/uapi/asm/ioctls.h deleted file mode 100644 index 349bf87bfbd..00000000000 --- a/arch/m32r/include/uapi/asm/ioctls.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARCH_M32R_IOCTLS_H__ | ||
2 | #define __ARCH_M32R_IOCTLS_H__ | ||
3 | |||
4 | #include <asm-generic/ioctls.h> | ||
5 | |||
6 | #endif /* __ARCH_M32R_IOCTLS_H__ */ | ||
diff --git a/arch/m32r/include/uapi/asm/ipcbuf.h b/arch/m32r/include/uapi/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d..00000000000 --- a/arch/m32r/include/uapi/asm/ipcbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/m32r/include/uapi/asm/mman.h b/arch/m32r/include/uapi/asm/mman.h deleted file mode 100644 index 8eebf89f5ab..00000000000 --- a/arch/m32r/include/uapi/asm/mman.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/mman.h> | ||
diff --git a/arch/m32r/include/uapi/asm/msgbuf.h b/arch/m32r/include/uapi/asm/msgbuf.h deleted file mode 100644 index 0d5a877b813..00000000000 --- a/arch/m32r/include/uapi/asm/msgbuf.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_MSGBUF_H | ||
2 | #define _ASM_M32R_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for m32r 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 /* _ASM_M32R_MSGBUF_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/param.h b/arch/m32r/include/uapi/asm/param.h deleted file mode 100644 index fa207bdf96e..00000000000 --- a/arch/m32r/include/uapi/asm/param.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_PARAM_H | ||
2 | #define _ASM_M32R_PARAM_H | ||
3 | |||
4 | #include <asm-generic/param.h> | ||
5 | |||
6 | #endif /* _ASM_M32R_PARAM_H */ | ||
7 | |||
diff --git a/arch/m32r/include/uapi/asm/poll.h b/arch/m32r/include/uapi/asm/poll.h deleted file mode 100644 index c98509d3149..00000000000 --- a/arch/m32r/include/uapi/asm/poll.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/poll.h> | ||
diff --git a/arch/m32r/include/uapi/asm/posix_types.h b/arch/m32r/include/uapi/asm/posix_types.h deleted file mode 100644 index 236de26a409..00000000000 --- a/arch/m32r/include/uapi/asm/posix_types.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_POSIX_TYPES_H | ||
2 | #define _ASM_M32R_POSIX_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This file is generally used by user-level software, so you need to | ||
6 | * be a little careful about namespace pollution etc. Also, we cannot | ||
7 | * assume GCC is being used. | ||
8 | */ | ||
9 | |||
10 | typedef unsigned short __kernel_mode_t; | ||
11 | #define __kernel_mode_t __kernel_mode_t | ||
12 | |||
13 | typedef unsigned short __kernel_ipc_pid_t; | ||
14 | #define __kernel_ipc_pid_t __kernel_ipc_pid_t | ||
15 | |||
16 | typedef unsigned short __kernel_uid_t; | ||
17 | typedef unsigned short __kernel_gid_t; | ||
18 | #define __kernel_uid_t __kernel_uid_t | ||
19 | |||
20 | typedef unsigned short __kernel_old_dev_t; | ||
21 | #define __kernel_old_dev_t __kernel_old_dev_t | ||
22 | |||
23 | #include <asm-generic/posix_types.h> | ||
24 | |||
25 | #endif /* _ASM_M32R_POSIX_TYPES_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/ptrace.h b/arch/m32r/include/uapi/asm/ptrace.h deleted file mode 100644 index f6930a82251..00000000000 --- a/arch/m32r/include/uapi/asm/ptrace.h +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-m32r/ptrace.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * M32R version: | ||
9 | * Copyright (C) 2001-2002, 2004 Hirokazu Takata <takata at linux-m32r.org> | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_M32R_PTRACE_H | ||
12 | #define _UAPI_ASM_M32R_PTRACE_H | ||
13 | |||
14 | |||
15 | /* 0 - 13 are integer registers (general purpose registers). */ | ||
16 | #define PT_R4 0 | ||
17 | #define PT_R5 1 | ||
18 | #define PT_R6 2 | ||
19 | #define PT_REGS 3 | ||
20 | #define PT_R0 4 | ||
21 | #define PT_R1 5 | ||
22 | #define PT_R2 6 | ||
23 | #define PT_R3 7 | ||
24 | #define PT_R7 8 | ||
25 | #define PT_R8 9 | ||
26 | #define PT_R9 10 | ||
27 | #define PT_R10 11 | ||
28 | #define PT_R11 12 | ||
29 | #define PT_R12 13 | ||
30 | #define PT_SYSCNR 14 | ||
31 | #define PT_R13 PT_FP | ||
32 | #define PT_R14 PT_LR | ||
33 | #define PT_R15 PT_SP | ||
34 | |||
35 | /* processor status and miscellaneous context registers. */ | ||
36 | #define PT_ACC0H 15 | ||
37 | #define PT_ACC0L 16 | ||
38 | #define PT_ACC1H 17 /* ISA_DSP_LEVEL2 only */ | ||
39 | #define PT_ACC1L 18 /* ISA_DSP_LEVEL2 only */ | ||
40 | #define PT_PSW 19 | ||
41 | #define PT_BPC 20 | ||
42 | #define PT_BBPSW 21 | ||
43 | #define PT_BBPC 22 | ||
44 | #define PT_SPU 23 | ||
45 | #define PT_FP 24 | ||
46 | #define PT_LR 25 | ||
47 | #define PT_SPI 26 | ||
48 | #define PT_ORIGR0 27 | ||
49 | |||
50 | /* virtual pt_reg entry for gdb */ | ||
51 | #define PT_PC 30 | ||
52 | #define PT_CBR 31 | ||
53 | #define PT_EVB 32 | ||
54 | |||
55 | |||
56 | /* Control registers. */ | ||
57 | #define SPR_CR0 PT_PSW | ||
58 | #define SPR_CR1 PT_CBR /* read only */ | ||
59 | #define SPR_CR2 PT_SPI | ||
60 | #define SPR_CR3 PT_SPU | ||
61 | #define SPR_CR4 | ||
62 | #define SPR_CR5 PT_EVB /* part of M32R/E, M32R/I core only */ | ||
63 | #define SPR_CR6 PT_BPC | ||
64 | #define SPR_CR7 | ||
65 | #define SPR_CR8 PT_BBPSW | ||
66 | #define SPR_CR9 | ||
67 | #define SPR_CR10 | ||
68 | #define SPR_CR11 | ||
69 | #define SPR_CR12 | ||
70 | #define SPR_CR13 PT_WR | ||
71 | #define SPR_CR14 PT_BBPC | ||
72 | #define SPR_CR15 | ||
73 | |||
74 | /* this struct defines the way the registers are stored on the | ||
75 | stack during a system call. */ | ||
76 | struct pt_regs { | ||
77 | /* Saved main processor registers. */ | ||
78 | unsigned long r4; | ||
79 | unsigned long r5; | ||
80 | unsigned long r6; | ||
81 | struct pt_regs *pt_regs; | ||
82 | unsigned long r0; | ||
83 | unsigned long r1; | ||
84 | unsigned long r2; | ||
85 | unsigned long r3; | ||
86 | unsigned long r7; | ||
87 | unsigned long r8; | ||
88 | unsigned long r9; | ||
89 | unsigned long r10; | ||
90 | unsigned long r11; | ||
91 | unsigned long r12; | ||
92 | long syscall_nr; | ||
93 | |||
94 | /* Saved main processor status and miscellaneous context registers. */ | ||
95 | unsigned long acc0h; | ||
96 | unsigned long acc0l; | ||
97 | unsigned long acc1h; /* ISA_DSP_LEVEL2 only */ | ||
98 | unsigned long acc1l; /* ISA_DSP_LEVEL2 only */ | ||
99 | unsigned long psw; | ||
100 | unsigned long bpc; /* saved PC for TRAP syscalls */ | ||
101 | unsigned long bbpsw; | ||
102 | unsigned long bbpc; | ||
103 | unsigned long spu; /* saved user stack */ | ||
104 | unsigned long fp; | ||
105 | unsigned long lr; /* saved PC for JL syscalls */ | ||
106 | unsigned long spi; /* saved kernel stack */ | ||
107 | unsigned long orig_r0; | ||
108 | }; | ||
109 | |||
110 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
111 | #define PTRACE_GETREGS 12 | ||
112 | #define PTRACE_SETREGS 13 | ||
113 | |||
114 | #define PTRACE_OLDSETOPTIONS 21 | ||
115 | |||
116 | |||
117 | #endif /* _UAPI_ASM_M32R_PTRACE_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/resource.h b/arch/m32r/include/uapi/asm/resource.h deleted file mode 100644 index b1ce766e37a..00000000000 --- a/arch/m32r/include/uapi/asm/resource.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_RESOURCE_H | ||
2 | #define _ASM_M32R_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | ||
5 | |||
6 | #endif /* _ASM_M32R_RESOURCE_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/sembuf.h b/arch/m32r/include/uapi/asm/sembuf.h deleted file mode 100644 index c9873d6890e..00000000000 --- a/arch/m32r/include/uapi/asm/sembuf.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SEMBUF_H | ||
2 | #define _ASM_M32R_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for m32r 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 /* _ASM_M32R_SEMBUF_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/setup.h b/arch/m32r/include/uapi/asm/setup.h deleted file mode 100644 index 96961a42e5f..00000000000 --- a/arch/m32r/include/uapi/asm/setup.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _UAPI_ASM_M32R_SETUP_H | ||
2 | #define _UAPI_ASM_M32R_SETUP_H | ||
3 | |||
4 | /* | ||
5 | * This is set up by the setup-routine at boot-time | ||
6 | */ | ||
7 | |||
8 | #define COMMAND_LINE_SIZE 512 | ||
9 | |||
10 | |||
11 | #endif /* _UAPI_ASM_M32R_SETUP_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/shmbuf.h b/arch/m32r/include/uapi/asm/shmbuf.h deleted file mode 100644 index b0cdf0aa7d6..00000000000 --- a/arch/m32r/include/uapi/asm/shmbuf.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SHMBUF_H | ||
2 | #define _ASM_M32R_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for M32R 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 /* _ASM_M32R_SHMBUF_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/sigcontext.h b/arch/m32r/include/uapi/asm/sigcontext.h deleted file mode 100644 index da4a9c36d09..00000000000 --- a/arch/m32r/include/uapi/asm/sigcontext.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SIGCONTEXT_H | ||
2 | #define _ASM_M32R_SIGCONTEXT_H | ||
3 | |||
4 | struct sigcontext { | ||
5 | /* CPU registers */ | ||
6 | /* Saved main processor registers. */ | ||
7 | unsigned long sc_r4; | ||
8 | unsigned long sc_r5; | ||
9 | unsigned long sc_r6; | ||
10 | struct pt_regs *sc_pt_regs; | ||
11 | unsigned long sc_r0; | ||
12 | unsigned long sc_r1; | ||
13 | unsigned long sc_r2; | ||
14 | unsigned long sc_r3; | ||
15 | unsigned long sc_r7; | ||
16 | unsigned long sc_r8; | ||
17 | unsigned long sc_r9; | ||
18 | unsigned long sc_r10; | ||
19 | unsigned long sc_r11; | ||
20 | unsigned long sc_r12; | ||
21 | |||
22 | /* Saved main processor status and miscellaneous context registers. */ | ||
23 | unsigned long sc_acc0h; | ||
24 | unsigned long sc_acc0l; | ||
25 | unsigned long sc_acc1h; /* ISA_DSP_LEVEL2 only */ | ||
26 | unsigned long sc_acc1l; /* ISA_DSP_LEVEL2 only */ | ||
27 | unsigned long sc_psw; | ||
28 | unsigned long sc_bpc; /* saved PC for TRAP syscalls */ | ||
29 | unsigned long sc_bbpsw; | ||
30 | unsigned long sc_bbpc; | ||
31 | unsigned long sc_spu; /* saved user stack */ | ||
32 | unsigned long sc_fp; | ||
33 | unsigned long sc_lr; /* saved PC for JL syscalls */ | ||
34 | unsigned long sc_spi; /* saved kernel stack */ | ||
35 | |||
36 | unsigned long oldmask; | ||
37 | }; | ||
38 | |||
39 | #endif /* _ASM_M32R_SIGCONTEXT_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/siginfo.h b/arch/m32r/include/uapi/asm/siginfo.h deleted file mode 100644 index 7d9cd9ebfd0..00000000000 --- a/arch/m32r/include/uapi/asm/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _M32R_SIGINFO_H | ||
2 | #define _M32R_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif /* _M32R_SIGINFO_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/signal.h b/arch/m32r/include/uapi/asm/signal.h deleted file mode 100644 index 54acacb1f1f..00000000000 --- a/arch/m32r/include/uapi/asm/signal.h +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | #ifndef _UAPI_ASM_M32R_SIGNAL_H | ||
2 | #define _UAPI_ASM_M32R_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/time.h> | ||
6 | #include <linux/compiler.h> | ||
7 | |||
8 | /* Avoid too many header ordering problems. */ | ||
9 | struct siginfo; | ||
10 | |||
11 | #ifndef __KERNEL__ | ||
12 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
13 | |||
14 | #define NSIG 32 | ||
15 | typedef unsigned long sigset_t; | ||
16 | |||
17 | #endif /* __KERNEL__ */ | ||
18 | |||
19 | #define SIGHUP 1 | ||
20 | #define SIGINT 2 | ||
21 | #define SIGQUIT 3 | ||
22 | #define SIGILL 4 | ||
23 | #define SIGTRAP 5 | ||
24 | #define SIGABRT 6 | ||
25 | #define SIGIOT 6 | ||
26 | #define SIGBUS 7 | ||
27 | #define SIGFPE 8 | ||
28 | #define SIGKILL 9 | ||
29 | #define SIGUSR1 10 | ||
30 | #define SIGSEGV 11 | ||
31 | #define SIGUSR2 12 | ||
32 | #define SIGPIPE 13 | ||
33 | #define SIGALRM 14 | ||
34 | #define SIGTERM 15 | ||
35 | #define SIGSTKFLT 16 | ||
36 | #define SIGCHLD 17 | ||
37 | #define SIGCONT 18 | ||
38 | #define SIGSTOP 19 | ||
39 | #define SIGTSTP 20 | ||
40 | #define SIGTTIN 21 | ||
41 | #define SIGTTOU 22 | ||
42 | #define SIGURG 23 | ||
43 | #define SIGXCPU 24 | ||
44 | #define SIGXFSZ 25 | ||
45 | #define SIGVTALRM 26 | ||
46 | #define SIGPROF 27 | ||
47 | #define SIGWINCH 28 | ||
48 | #define SIGIO 29 | ||
49 | #define SIGPOLL SIGIO | ||
50 | /* | ||
51 | #define SIGLOST 29 | ||
52 | */ | ||
53 | #define SIGPWR 30 | ||
54 | #define SIGSYS 31 | ||
55 | #define SIGUNUSED 31 | ||
56 | |||
57 | /* These should not be considered constants from userland. */ | ||
58 | #define SIGRTMIN 32 | ||
59 | #define SIGRTMAX _NSIG | ||
60 | |||
61 | /* | ||
62 | * SA_FLAGS values: | ||
63 | * | ||
64 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
65 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
66 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
67 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
68 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
69 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
70 | * | ||
71 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
72 | * Unix names RESETHAND and NODEFER respectively. | ||
73 | */ | ||
74 | #define SA_NOCLDSTOP 0x00000001u | ||
75 | #define SA_NOCLDWAIT 0x00000002u | ||
76 | #define SA_SIGINFO 0x00000004u | ||
77 | #define SA_ONSTACK 0x08000000u | ||
78 | #define SA_RESTART 0x10000000u | ||
79 | #define SA_NODEFER 0x40000000u | ||
80 | #define SA_RESETHAND 0x80000000u | ||
81 | |||
82 | #define SA_NOMASK SA_NODEFER | ||
83 | #define SA_ONESHOT SA_RESETHAND | ||
84 | |||
85 | #define SA_RESTORER 0x04000000 | ||
86 | |||
87 | #define MINSIGSTKSZ 2048 | ||
88 | #define SIGSTKSZ 8192 | ||
89 | |||
90 | #include <asm-generic/signal-defs.h> | ||
91 | |||
92 | #ifndef __KERNEL__ | ||
93 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
94 | |||
95 | struct sigaction { | ||
96 | union { | ||
97 | __sighandler_t _sa_handler; | ||
98 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
99 | } _u; | ||
100 | sigset_t sa_mask; | ||
101 | unsigned long sa_flags; | ||
102 | void (*sa_restorer)(void); | ||
103 | }; | ||
104 | |||
105 | #define sa_handler _u._sa_handler | ||
106 | #define sa_sigaction _u._sa_sigaction | ||
107 | |||
108 | #endif /* __KERNEL__ */ | ||
109 | |||
110 | typedef struct sigaltstack { | ||
111 | void __user *ss_sp; | ||
112 | int ss_flags; | ||
113 | size_t ss_size; | ||
114 | } stack_t; | ||
115 | |||
116 | |||
117 | #endif /* _UAPI_ASM_M32R_SIGNAL_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/socket.h b/arch/m32r/include/uapi/asm/socket.h deleted file mode 100644 index 5e7088a2672..00000000000 --- a/arch/m32r/include/uapi/asm/socket.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SOCKET_H | ||
2 | #define _ASM_M32R_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockoptions(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 | #define SO_GET_FILTER SO_ATTACH_FILTER | ||
44 | |||
45 | #define SO_PEERNAME 28 | ||
46 | #define SO_TIMESTAMP 29 | ||
47 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
48 | |||
49 | #define SO_ACCEPTCONN 30 | ||
50 | |||
51 | #define SO_PEERSEC 31 | ||
52 | #define SO_PASSSEC 34 | ||
53 | #define SO_TIMESTAMPNS 35 | ||
54 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
55 | |||
56 | #define SO_MARK 36 | ||
57 | |||
58 | #define SO_TIMESTAMPING 37 | ||
59 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
60 | |||
61 | #define SO_PROTOCOL 38 | ||
62 | #define SO_DOMAIN 39 | ||
63 | |||
64 | #define SO_RXQ_OVFL 40 | ||
65 | |||
66 | #define SO_WIFI_STATUS 41 | ||
67 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
68 | #define SO_PEEK_OFF 42 | ||
69 | |||
70 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
71 | #define SO_NOFCS 43 | ||
72 | |||
73 | #endif /* _ASM_M32R_SOCKET_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/sockios.h b/arch/m32r/include/uapi/asm/sockios.h deleted file mode 100644 index 6c1fb9b43bd..00000000000 --- a/arch/m32r/include/uapi/asm/sockios.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SOCKIOS_H | ||
2 | #define _ASM_M32R_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 /* _ASM_M32R_SOCKIOS_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/stat.h b/arch/m32r/include/uapi/asm/stat.h deleted file mode 100644 index da4518f82d6..00000000000 --- a/arch/m32r/include/uapi/asm/stat.h +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_STAT_H | ||
2 | #define _ASM_M32R_STAT_H | ||
3 | |||
4 | #include <asm/byteorder.h> | ||
5 | |||
6 | struct __old_kernel_stat { | ||
7 | unsigned short st_dev; | ||
8 | unsigned short st_ino; | ||
9 | unsigned short st_mode; | ||
10 | unsigned short st_nlink; | ||
11 | unsigned short st_uid; | ||
12 | unsigned short st_gid; | ||
13 | unsigned short st_rdev; | ||
14 | unsigned long st_size; | ||
15 | unsigned long st_atime; | ||
16 | unsigned long st_mtime; | ||
17 | unsigned long st_ctime; | ||
18 | }; | ||
19 | |||
20 | #define STAT_HAVE_NSEC 1 | ||
21 | |||
22 | struct stat { | ||
23 | unsigned short st_dev; | ||
24 | unsigned short __pad1; | ||
25 | unsigned long st_ino; | ||
26 | unsigned short st_mode; | ||
27 | unsigned short st_nlink; | ||
28 | unsigned short st_uid; | ||
29 | unsigned short st_gid; | ||
30 | unsigned short st_rdev; | ||
31 | unsigned short __pad2; | ||
32 | unsigned long st_size; | ||
33 | unsigned long st_blksize; | ||
34 | unsigned long st_blocks; | ||
35 | unsigned long st_atime; | ||
36 | unsigned long st_atime_nsec; | ||
37 | unsigned long st_mtime; | ||
38 | unsigned long st_mtime_nsec; | ||
39 | unsigned long st_ctime; | ||
40 | unsigned long st_ctime_nsec; | ||
41 | unsigned long __unused4; | ||
42 | unsigned long __unused5; | ||
43 | }; | ||
44 | |||
45 | /* This matches struct stat64 in glibc2.1, hence the absolutely | ||
46 | * insane amounts of padding around dev_t's. | ||
47 | */ | ||
48 | struct stat64 { | ||
49 | unsigned long long st_dev; | ||
50 | unsigned char __pad0[4]; | ||
51 | #define STAT64_HAS_BROKEN_ST_INO | ||
52 | unsigned long __st_ino; | ||
53 | |||
54 | unsigned int st_mode; | ||
55 | unsigned int st_nlink; | ||
56 | |||
57 | unsigned long st_uid; | ||
58 | unsigned long st_gid; | ||
59 | |||
60 | unsigned long long st_rdev; | ||
61 | unsigned char __pad3[4]; | ||
62 | |||
63 | long long st_size; | ||
64 | unsigned long st_blksize; | ||
65 | |||
66 | #if defined(__BIG_ENDIAN) | ||
67 | unsigned long __pad4; /* future possible st_blocks high bits */ | ||
68 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
69 | #elif defined(__LITTLE_ENDIAN) | ||
70 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
71 | unsigned long __pad4; /* future possible st_blocks high bits */ | ||
72 | #else | ||
73 | #error no endian defined | ||
74 | #endif | ||
75 | unsigned long st_atime; | ||
76 | unsigned long st_atime_nsec; | ||
77 | |||
78 | unsigned long st_mtime; | ||
79 | unsigned long st_mtime_nsec; | ||
80 | |||
81 | unsigned long st_ctime; | ||
82 | unsigned long st_ctime_nsec; | ||
83 | |||
84 | unsigned long long st_ino; | ||
85 | }; | ||
86 | |||
87 | #endif /* _ASM_M32R_STAT_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/statfs.h b/arch/m32r/include/uapi/asm/statfs.h deleted file mode 100644 index 6eb4c6007e6..00000000000 --- a/arch/m32r/include/uapi/asm/statfs.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_STATFS_H | ||
2 | #define _ASM_M32R_STATFS_H | ||
3 | |||
4 | #include <asm-generic/statfs.h> | ||
5 | |||
6 | #endif /* _ASM_M32R_STATFS_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/swab.h b/arch/m32r/include/uapi/asm/swab.h deleted file mode 100644 index 54dab001d6d..00000000000 --- a/arch/m32r/include/uapi/asm/swab.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_SWAB_H | ||
2 | #define _ASM_M32R_SWAB_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
7 | # define __SWAB_64_THRU_32__ | ||
8 | #endif | ||
9 | |||
10 | #endif /* _ASM_M32R_SWAB_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/termbits.h b/arch/m32r/include/uapi/asm/termbits.h deleted file mode 100644 index 957a3c68854..00000000000 --- a/arch/m32r/include/uapi/asm/termbits.h +++ /dev/null | |||
@@ -1,200 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_TERMBITS_H | ||
2 | #define _ASM_M32R_TERMBITS_H | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | typedef unsigned int tcflag_t; | ||
9 | |||
10 | #define NCCS 19 | ||
11 | struct termios { | ||
12 | tcflag_t c_iflag; /* input mode flags */ | ||
13 | tcflag_t c_oflag; /* output mode flags */ | ||
14 | tcflag_t c_cflag; /* control mode flags */ | ||
15 | tcflag_t c_lflag; /* local mode flags */ | ||
16 | cc_t c_line; /* line discipline */ | ||
17 | cc_t c_cc[NCCS]; /* control characters */ | ||
18 | }; | ||
19 | |||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
31 | struct ktermios { | ||
32 | tcflag_t c_iflag; /* input mode flags */ | ||
33 | tcflag_t c_oflag; /* output mode flags */ | ||
34 | tcflag_t c_cflag; /* control mode flags */ | ||
35 | tcflag_t c_lflag; /* local mode flags */ | ||
36 | cc_t c_line; /* line discipline */ | ||
37 | cc_t c_cc[NCCS]; /* control characters */ | ||
38 | speed_t c_ispeed; /* input speed */ | ||
39 | speed_t c_ospeed; /* output speed */ | ||
40 | }; | ||
41 | |||
42 | /* c_cc characters */ | ||
43 | #define VINTR 0 | ||
44 | #define VQUIT 1 | ||
45 | #define VERASE 2 | ||
46 | #define VKILL 3 | ||
47 | #define VEOF 4 | ||
48 | #define VTIME 5 | ||
49 | #define VMIN 6 | ||
50 | #define VSWTC 7 | ||
51 | #define VSTART 8 | ||
52 | #define VSTOP 9 | ||
53 | #define VSUSP 10 | ||
54 | #define VEOL 11 | ||
55 | #define VREPRINT 12 | ||
56 | #define VDISCARD 13 | ||
57 | #define VWERASE 14 | ||
58 | #define VLNEXT 15 | ||
59 | #define VEOL2 16 | ||
60 | |||
61 | /* c_iflag bits */ | ||
62 | #define IGNBRK 0000001 | ||
63 | #define BRKINT 0000002 | ||
64 | #define IGNPAR 0000004 | ||
65 | #define PARMRK 0000010 | ||
66 | #define INPCK 0000020 | ||
67 | #define ISTRIP 0000040 | ||
68 | #define INLCR 0000100 | ||
69 | #define IGNCR 0000200 | ||
70 | #define ICRNL 0000400 | ||
71 | #define IUCLC 0001000 | ||
72 | #define IXON 0002000 | ||
73 | #define IXANY 0004000 | ||
74 | #define IXOFF 0010000 | ||
75 | #define IMAXBEL 0020000 | ||
76 | #define IUTF8 0040000 | ||
77 | |||
78 | /* c_oflag bits */ | ||
79 | #define OPOST 0000001 | ||
80 | #define OLCUC 0000002 | ||
81 | #define ONLCR 0000004 | ||
82 | #define OCRNL 0000010 | ||
83 | #define ONOCR 0000020 | ||
84 | #define ONLRET 0000040 | ||
85 | #define OFILL 0000100 | ||
86 | #define OFDEL 0000200 | ||
87 | #define NLDLY 0000400 | ||
88 | #define NL0 0000000 | ||
89 | #define NL1 0000400 | ||
90 | #define CRDLY 0003000 | ||
91 | #define CR0 0000000 | ||
92 | #define CR1 0001000 | ||
93 | #define CR2 0002000 | ||
94 | #define CR3 0003000 | ||
95 | #define TABDLY 0014000 | ||
96 | #define TAB0 0000000 | ||
97 | #define TAB1 0004000 | ||
98 | #define TAB2 0010000 | ||
99 | #define TAB3 0014000 | ||
100 | #define XTABS 0014000 | ||
101 | #define BSDLY 0020000 | ||
102 | #define BS0 0000000 | ||
103 | #define BS1 0020000 | ||
104 | #define VTDLY 0040000 | ||
105 | #define VT0 0000000 | ||
106 | #define VT1 0040000 | ||
107 | #define FFDLY 0100000 | ||
108 | #define FF0 0000000 | ||
109 | #define FF1 0100000 | ||
110 | |||
111 | /* c_cflag bit meaning */ | ||
112 | #define CBAUD 0010017 | ||
113 | #define B0 0000000 /* hang up */ | ||
114 | #define B50 0000001 | ||
115 | #define B75 0000002 | ||
116 | #define B110 0000003 | ||
117 | #define B134 0000004 | ||
118 | #define B150 0000005 | ||
119 | #define B200 0000006 | ||
120 | #define B300 0000007 | ||
121 | #define B600 0000010 | ||
122 | #define B1200 0000011 | ||
123 | #define B1800 0000012 | ||
124 | #define B2400 0000013 | ||
125 | #define B4800 0000014 | ||
126 | #define B9600 0000015 | ||
127 | #define B19200 0000016 | ||
128 | #define B38400 0000017 | ||
129 | #define EXTA B19200 | ||
130 | #define EXTB B38400 | ||
131 | #define CSIZE 0000060 | ||
132 | #define CS5 0000000 | ||
133 | #define CS6 0000020 | ||
134 | #define CS7 0000040 | ||
135 | #define CS8 0000060 | ||
136 | #define CSTOPB 0000100 | ||
137 | #define CREAD 0000200 | ||
138 | #define PARENB 0000400 | ||
139 | #define PARODD 0001000 | ||
140 | #define HUPCL 0002000 | ||
141 | #define CLOCAL 0004000 | ||
142 | #define CBAUDEX 0010000 | ||
143 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | ||
145 | #define B115200 0010002 | ||
146 | #define B230400 0010003 | ||
147 | #define B460800 0010004 | ||
148 | #define B500000 0010005 | ||
149 | #define B576000 0010006 | ||
150 | #define B921600 0010007 | ||
151 | #define B1000000 0010010 | ||
152 | #define B1152000 0010011 | ||
153 | #define B1500000 0010012 | ||
154 | #define B2000000 0010013 | ||
155 | #define B2500000 0010014 | ||
156 | #define B3000000 0010015 | ||
157 | #define B3500000 0010016 | ||
158 | #define B4000000 0010017 | ||
159 | #define CIBAUD 002003600000 /** input baud rate */ | ||
160 | #define CTVB 004000000000 /* VisioBraille Terminal flow control */ | ||
161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
162 | #define CRTSCTS 020000000000 /* flow control */ | ||
163 | |||
164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
165 | |||
166 | /* c_lflag bits */ | ||
167 | #define ISIG 0000001 | ||
168 | #define ICANON 0000002 | ||
169 | #define XCASE 0000004 | ||
170 | #define ECHO 0000010 | ||
171 | #define ECHOE 0000020 | ||
172 | #define ECHOK 0000040 | ||
173 | #define ECHONL 0000100 | ||
174 | #define NOFLSH 0000200 | ||
175 | #define TOSTOP 0000400 | ||
176 | #define ECHOCTL 0001000 | ||
177 | #define ECHOPRT 0002000 | ||
178 | #define ECHOKE 0004000 | ||
179 | #define FLUSHO 0010000 | ||
180 | #define PENDIN 0040000 | ||
181 | #define IEXTEN 0100000 | ||
182 | #define EXTPROC 0200000 | ||
183 | |||
184 | /* tcflow() and TCXONC use these */ | ||
185 | #define TCOOFF 0 | ||
186 | #define TCOON 1 | ||
187 | #define TCIOFF 2 | ||
188 | #define TCION 3 | ||
189 | |||
190 | /* tcflush() and TCFLSH use these */ | ||
191 | #define TCIFLUSH 0 | ||
192 | #define TCOFLUSH 1 | ||
193 | #define TCIOFLUSH 2 | ||
194 | |||
195 | /* tcsetattr uses these */ | ||
196 | #define TCSANOW 0 | ||
197 | #define TCSADRAIN 1 | ||
198 | #define TCSAFLUSH 2 | ||
199 | |||
200 | #endif /* _ASM_M32R_TERMBITS_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/termios.h b/arch/m32r/include/uapi/asm/termios.h deleted file mode 100644 index 07ad27b8f7d..00000000000 --- a/arch/m32r/include/uapi/asm/termios.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef _UAPI_M32R_TERMIOS_H | ||
2 | #define _UAPI_M32R_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 | /* modem lines */ | ||
25 | #define TIOCM_LE 0x001 | ||
26 | #define TIOCM_DTR 0x002 | ||
27 | #define TIOCM_RTS 0x004 | ||
28 | #define TIOCM_ST 0x008 | ||
29 | #define TIOCM_SR 0x010 | ||
30 | #define TIOCM_CTS 0x020 | ||
31 | #define TIOCM_CAR 0x040 | ||
32 | #define TIOCM_RNG 0x080 | ||
33 | #define TIOCM_DSR 0x100 | ||
34 | #define TIOCM_CD TIOCM_CAR | ||
35 | #define TIOCM_RI TIOCM_RNG | ||
36 | #define TIOCM_OUT1 0x2000 | ||
37 | #define TIOCM_OUT2 0x4000 | ||
38 | #define TIOCM_LOOP 0x8000 | ||
39 | |||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
41 | |||
42 | |||
43 | #endif /* _UAPI_M32R_TERMIOS_H */ | ||
diff --git a/arch/m32r/include/uapi/asm/types.h b/arch/m32r/include/uapi/asm/types.h deleted file mode 100644 index 9ec9d4c5ac4..00000000000 --- a/arch/m32r/include/uapi/asm/types.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/int-ll64.h> | ||
diff --git a/arch/m32r/include/uapi/asm/unistd.h b/arch/m32r/include/uapi/asm/unistd.h deleted file mode 100644 index 5a54f2ae3b5..00000000000 --- a/arch/m32r/include/uapi/asm/unistd.h +++ /dev/null | |||
@@ -1,335 +0,0 @@ | |||
1 | #ifndef _UAPI_ASM_M32R_UNISTD_H | ||
2 | #define _UAPI_ASM_M32R_UNISTD_H | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | /* 16 is unused */ | ||
25 | /* 17 is unused */ | ||
26 | /* 18 is unused */ | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | /* 23 is unused */ | ||
32 | /* 24 is unused */ | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | /* 28 is unused */ | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | /* 31 is unused */ | ||
40 | #define __NR_cachectl 32 /* old #define __NR_gtty 32*/ | ||
41 | #define __NR_access 33 | ||
42 | /* 34 is unused */ | ||
43 | /* 35 is unused */ | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | /* 44 is unused */ | ||
53 | #define __NR_brk 45 | ||
54 | /* 46 is unused */ | ||
55 | /* 47 is unused (getgid16) */ | ||
56 | /* 48 is unused */ | ||
57 | /* 49 is unused */ | ||
58 | /* 50 is unused */ | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | /* 53 is unused */ | ||
62 | #define __NR_ioctl 54 | ||
63 | /* 55 is unused (fcntl) */ | ||
64 | /* 56 is unused */ | ||
65 | #define __NR_setpgid 57 | ||
66 | /* 58 is unused */ | ||
67 | /* 59 is unused */ | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | /* 67 is unused */ | ||
76 | /* 68 is unused*/ | ||
77 | /* 69 is unused*/ | ||
78 | /* 70 is unused */ | ||
79 | /* 71 is unused */ | ||
80 | /* 72 is unused */ | ||
81 | /* 73 is unused */ | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | /* 76 is unused (old getrlimit) */ | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | /* 80 is unused */ | ||
89 | /* 81 is unused */ | ||
90 | /* 82 is unused */ | ||
91 | #define __NR_symlink 83 | ||
92 | /* 84 is unused */ | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | /* 89 is unused */ | ||
98 | /* 90 is unused */ | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | /* 95 is unused */ | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | /* 98 is unused */ | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | /* 101 is unused */ | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | /* 109 is unused */ | ||
118 | /* 110 is unused */ | ||
119 | #define __NR_vhangup 111 | ||
120 | /* 112 is unused */ | ||
121 | /* 113 is unused */ | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | /* 119 is unused */ | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | /* 123 is unused */ | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | /* 126 is unused */ | ||
135 | /* 127 is unused */ | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | /* 130 is unused */ | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | /* 137 is unused */ | ||
146 | /* 138 is unused */ | ||
147 | /* 139 is unused */ | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | /* 164 is unused */ | ||
173 | /* 165 is unused */ | ||
174 | #define __NR_tas 166 | ||
175 | /* 167 is unused */ | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | /* 170 is unused */ | ||
179 | /* 171 is unused */ | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | /* 182 is unused */ | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | /* 188 is unused */ | ||
197 | /* 189 is unused */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_lchown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_chown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | #define __NR_mincore 218 | ||
227 | #define __NR_madvise 219 | ||
228 | #define __NR_getdents64 220 | ||
229 | #define __NR_fcntl64 221 | ||
230 | /* 222 is unused */ | ||
231 | /* 223 is unused */ | ||
232 | #define __NR_gettid 224 | ||
233 | #define __NR_readahead 225 | ||
234 | #define __NR_setxattr 226 | ||
235 | #define __NR_lsetxattr 227 | ||
236 | #define __NR_fsetxattr 228 | ||
237 | #define __NR_getxattr 229 | ||
238 | #define __NR_lgetxattr 230 | ||
239 | #define __NR_fgetxattr 231 | ||
240 | #define __NR_listxattr 232 | ||
241 | #define __NR_llistxattr 233 | ||
242 | #define __NR_flistxattr 234 | ||
243 | #define __NR_removexattr 235 | ||
244 | #define __NR_lremovexattr 236 | ||
245 | #define __NR_fremovexattr 237 | ||
246 | #define __NR_tkill 238 | ||
247 | #define __NR_sendfile64 239 | ||
248 | #define __NR_futex 240 | ||
249 | #define __NR_sched_setaffinity 241 | ||
250 | #define __NR_sched_getaffinity 242 | ||
251 | #define __NR_set_thread_area 243 | ||
252 | #define __NR_get_thread_area 244 | ||
253 | #define __NR_io_setup 245 | ||
254 | #define __NR_io_destroy 246 | ||
255 | #define __NR_io_getevents 247 | ||
256 | #define __NR_io_submit 248 | ||
257 | #define __NR_io_cancel 249 | ||
258 | #define __NR_fadvise64 250 | ||
259 | /* 251 is unused */ | ||
260 | #define __NR_exit_group 252 | ||
261 | #define __NR_lookup_dcookie 253 | ||
262 | #define __NR_epoll_create 254 | ||
263 | #define __NR_epoll_ctl 255 | ||
264 | #define __NR_epoll_wait 256 | ||
265 | #define __NR_remap_file_pages 257 | ||
266 | #define __NR_set_tid_address 258 | ||
267 | #define __NR_timer_create 259 | ||
268 | #define __NR_timer_settime (__NR_timer_create+1) | ||
269 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
270 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
271 | #define __NR_timer_delete (__NR_timer_create+4) | ||
272 | #define __NR_clock_settime (__NR_timer_create+5) | ||
273 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
274 | #define __NR_clock_getres (__NR_timer_create+7) | ||
275 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
276 | #define __NR_statfs64 268 | ||
277 | #define __NR_fstatfs64 269 | ||
278 | #define __NR_tgkill 270 | ||
279 | #define __NR_utimes 271 | ||
280 | #define __NR_fadvise64_64 272 | ||
281 | #define __NR_vserver 273 | ||
282 | #define __NR_mbind 274 | ||
283 | #define __NR_get_mempolicy 275 | ||
284 | #define __NR_set_mempolicy 276 | ||
285 | #define __NR_mq_open 277 | ||
286 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
287 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
289 | #define __NR_mq_notify (__NR_mq_open+4) | ||
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
291 | #define __NR_kexec_load 283 | ||
292 | #define __NR_waitid 284 | ||
293 | /* 285 is unused */ | ||
294 | #define __NR_add_key 286 | ||
295 | #define __NR_request_key 287 | ||
296 | #define __NR_keyctl 288 | ||
297 | #define __NR_ioprio_set 289 | ||
298 | #define __NR_ioprio_get 290 | ||
299 | #define __NR_inotify_init 291 | ||
300 | #define __NR_inotify_add_watch 292 | ||
301 | #define __NR_inotify_rm_watch 293 | ||
302 | #define __NR_migrate_pages 294 | ||
303 | #define __NR_openat 295 | ||
304 | #define __NR_mkdirat 296 | ||
305 | #define __NR_mknodat 297 | ||
306 | #define __NR_fchownat 298 | ||
307 | #define __NR_futimesat 299 | ||
308 | #define __NR_fstatat64 300 | ||
309 | #define __NR_unlinkat 301 | ||
310 | #define __NR_renameat 302 | ||
311 | #define __NR_linkat 303 | ||
312 | #define __NR_symlinkat 304 | ||
313 | #define __NR_readlinkat 305 | ||
314 | #define __NR_fchmodat 306 | ||
315 | #define __NR_faccessat 307 | ||
316 | #define __NR_pselect6 308 | ||
317 | #define __NR_ppoll 309 | ||
318 | #define __NR_unshare 310 | ||
319 | #define __NR_set_robust_list 311 | ||
320 | #define __NR_get_robust_list 312 | ||
321 | #define __NR_splice 313 | ||
322 | #define __NR_sync_file_range 314 | ||
323 | #define __NR_tee 315 | ||
324 | #define __NR_vmsplice 316 | ||
325 | #define __NR_move_pages 317 | ||
326 | #define __NR_getcpu 318 | ||
327 | #define __NR_epoll_pwait 319 | ||
328 | #define __NR_utimensat 320 | ||
329 | #define __NR_signalfd 321 | ||
330 | /* #define __NR_timerfd 322 removed */ | ||
331 | #define __NR_eventfd 323 | ||
332 | #define __NR_fallocate 324 | ||
333 | #define __NR_setns 325 | ||
334 | |||
335 | #endif /* _UAPI_ASM_M32R_UNISTD_H */ | ||
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile index 0c09dad8b1f..b1a4b603659 100644 --- a/arch/m32r/kernel/Makefile +++ b/arch/m32r/kernel/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux/M32R kernel. | 2 | # Makefile for the Linux/M32R kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head.o vmlinux.lds | 5 | extra-y := head.o init_task.o vmlinux.lds |
6 | 6 | ||
7 | obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \ | 7 | obj-y := process.o entry.o traps.o align.o irq.o setup.o time.o \ |
8 | m32r_ksyms.o sys_m32r.o signal.o ptrace.o | 8 | m32r_ksyms.o sys_m32r.o signal.o ptrace.o |
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 0c01543f10c..225412bc227 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -125,15 +125,6 @@ | |||
125 | and \reg, sp | 125 | and \reg, sp |
126 | .endm | 126 | .endm |
127 | 127 | ||
128 | ENTRY(ret_from_kernel_thread) | ||
129 | pop r0 | ||
130 | bl schedule_tail | ||
131 | GET_THREAD_INFO(r8) | ||
132 | ld r0, R0(r8) | ||
133 | ld r1, R1(r8) | ||
134 | jl r1 | ||
135 | bra syscall_exit | ||
136 | |||
137 | ENTRY(ret_from_fork) | 128 | ENTRY(ret_from_fork) |
138 | pop r0 | 129 | pop r0 |
139 | bl schedule_tail | 130 | bl schedule_tail |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index b727e693c80..700570747a9 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
@@ -21,6 +21,7 @@ EXPORT_SYMBOL(boot_cpu_data); | |||
21 | EXPORT_SYMBOL(dump_fpu); | 21 | EXPORT_SYMBOL(dump_fpu); |
22 | EXPORT_SYMBOL(__ioremap); | 22 | EXPORT_SYMBOL(__ioremap); |
23 | EXPORT_SYMBOL(iounmap); | 23 | EXPORT_SYMBOL(iounmap); |
24 | EXPORT_SYMBOL(kernel_thread); | ||
24 | 25 | ||
25 | EXPORT_SYMBOL(strncpy_from_user); | 26 | EXPORT_SYMBOL(strncpy_from_user); |
26 | EXPORT_SYMBOL(__strncpy_from_user); | 27 | EXPORT_SYMBOL(__strncpy_from_user); |
diff --git a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c index 38233b6596b..3071fe83ffc 100644 --- a/arch/m32r/kernel/module.c +++ b/arch/m32r/kernel/module.c | |||
@@ -201,3 +201,18 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
201 | } | 201 | } |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | |||
205 | int apply_relocate(Elf32_Shdr *sechdrs, | ||
206 | const char *strtab, | ||
207 | unsigned int symindex, | ||
208 | unsigned int relsec, | ||
209 | struct module *me) | ||
210 | { | ||
211 | #if 0 | ||
212 | printk(KERN_ERR "module %s: REL RELOCATION unsupported\n", | ||
213 | me->name); | ||
214 | return -ENOEXEC; | ||
215 | #endif | ||
216 | return 0; | ||
217 | |||
218 | } | ||
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 765d0f57c78..422bea9f1db 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/ptrace.h> | 26 | #include <linux/ptrace.h> |
27 | #include <linux/unistd.h> | 27 | #include <linux/unistd.h> |
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | #include <linux/rcupdate.h> | ||
30 | 29 | ||
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
@@ -83,7 +82,6 @@ void cpu_idle (void) | |||
83 | { | 82 | { |
84 | /* endless idle loop with no priority at all */ | 83 | /* endless idle loop with no priority at all */ |
85 | while (1) { | 84 | while (1) { |
86 | rcu_idle_enter(); | ||
87 | while (!need_resched()) { | 85 | while (!need_resched()) { |
88 | void (*idle)(void) = pm_idle; | 86 | void (*idle)(void) = pm_idle; |
89 | 87 | ||
@@ -92,8 +90,9 @@ void cpu_idle (void) | |||
92 | 90 | ||
93 | idle(); | 91 | idle(); |
94 | } | 92 | } |
95 | rcu_idle_exit(); | 93 | preempt_enable_no_resched(); |
96 | schedule_preempt_disabled(); | 94 | schedule(); |
95 | preempt_disable(); | ||
97 | } | 96 | } |
98 | } | 97 | } |
99 | 98 | ||
@@ -165,6 +164,41 @@ void show_regs(struct pt_regs * regs) | |||
165 | } | 164 | } |
166 | 165 | ||
167 | /* | 166 | /* |
167 | * Create a kernel thread | ||
168 | */ | ||
169 | |||
170 | /* | ||
171 | * This is the mechanism for creating a new kernel thread. | ||
172 | * | ||
173 | * NOTE! Only a kernel-only process(ie the swapper or direct descendants | ||
174 | * who haven't done an "execve()") should use this: it will work within | ||
175 | * a system call from a "real" process, but the process memory space will | ||
176 | * not be free'd until both the parent and the child have exited. | ||
177 | */ | ||
178 | static void kernel_thread_helper(void *nouse, int (*fn)(void *), void *arg) | ||
179 | { | ||
180 | fn(arg); | ||
181 | do_exit(-1); | ||
182 | } | ||
183 | |||
184 | int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | ||
185 | { | ||
186 | struct pt_regs regs; | ||
187 | |||
188 | memset(®s, 0, sizeof (regs)); | ||
189 | regs.r1 = (unsigned long)fn; | ||
190 | regs.r2 = (unsigned long)arg; | ||
191 | |||
192 | regs.bpc = (unsigned long)kernel_thread_helper; | ||
193 | |||
194 | regs.psw = M32R_PSW_BIE; | ||
195 | |||
196 | /* Ok, create the new process. */ | ||
197 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, | ||
198 | NULL); | ||
199 | } | ||
200 | |||
201 | /* | ||
168 | * Free current thread data structures etc.. | 202 | * Free current thread data structures etc.. |
169 | */ | 203 | */ |
170 | void exit_thread(void) | 204 | void exit_thread(void) |
@@ -192,31 +226,88 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
192 | } | 226 | } |
193 | 227 | ||
194 | int copy_thread(unsigned long clone_flags, unsigned long spu, | 228 | int copy_thread(unsigned long clone_flags, unsigned long spu, |
195 | unsigned long arg, struct task_struct *tsk) | 229 | unsigned long unused, struct task_struct *tsk, struct pt_regs *regs) |
196 | { | 230 | { |
197 | struct pt_regs *childregs = task_pt_regs(tsk); | 231 | struct pt_regs *childregs = task_pt_regs(tsk); |
198 | extern void ret_from_fork(void); | 232 | extern void ret_from_fork(void); |
199 | extern void ret_from_kernel_thread(void); | 233 | |
200 | 234 | /* Copy registers */ | |
201 | if (unlikely(tsk->flags & PF_KTHREAD)) { | 235 | *childregs = *regs; |
202 | memset(childregs, 0, sizeof(struct pt_regs)); | 236 | |
203 | childregs->psw = M32R_PSW_BIE; | 237 | childregs->spu = spu; |
204 | childregs->r1 = spu; /* fn */ | 238 | childregs->r0 = 0; /* Child gets zero as return value */ |
205 | childregs->r0 = arg; | 239 | regs->r0 = tsk->pid; |
206 | tsk->thread.lr = (unsigned long)ret_from_kernel_thread; | ||
207 | } else { | ||
208 | /* Copy registers */ | ||
209 | *childregs = *current_pt_regs(); | ||
210 | if (spu) | ||
211 | childregs->spu = spu; | ||
212 | childregs->r0 = 0; /* Child gets zero as return value */ | ||
213 | tsk->thread.lr = (unsigned long)ret_from_fork; | ||
214 | } | ||
215 | tsk->thread.sp = (unsigned long)childregs; | 240 | tsk->thread.sp = (unsigned long)childregs; |
241 | tsk->thread.lr = (unsigned long)ret_from_fork; | ||
216 | 242 | ||
217 | return 0; | 243 | return 0; |
218 | } | 244 | } |
219 | 245 | ||
246 | asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, | ||
247 | unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, | ||
248 | struct pt_regs regs) | ||
249 | { | ||
250 | #ifdef CONFIG_MMU | ||
251 | return do_fork(SIGCHLD, regs.spu, ®s, 0, NULL, NULL); | ||
252 | #else | ||
253 | return -EINVAL; | ||
254 | #endif /* CONFIG_MMU */ | ||
255 | } | ||
256 | |||
257 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
258 | unsigned long parent_tidptr, | ||
259 | unsigned long child_tidptr, | ||
260 | unsigned long r4, unsigned long r5, unsigned long r6, | ||
261 | struct pt_regs regs) | ||
262 | { | ||
263 | if (!newsp) | ||
264 | newsp = regs.spu; | ||
265 | |||
266 | return do_fork(clone_flags, newsp, ®s, 0, | ||
267 | (int __user *)parent_tidptr, (int __user *)child_tidptr); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * This is trivial, and on the face of it looks like it | ||
272 | * could equally well be done in user mode. | ||
273 | * | ||
274 | * Not so, for quite unobvious reasons - register pressure. | ||
275 | * In user mode vfork() cannot have a stack frame, and if | ||
276 | * done by calling the "clone()" system call directly, you | ||
277 | * do not have enough call-clobbered registers to hold all | ||
278 | * the information you need. | ||
279 | */ | ||
280 | asmlinkage int sys_vfork(unsigned long r0, unsigned long r1, unsigned long r2, | ||
281 | unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, | ||
282 | struct pt_regs regs) | ||
283 | { | ||
284 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.spu, ®s, 0, | ||
285 | NULL, NULL); | ||
286 | } | ||
287 | |||
288 | /* | ||
289 | * sys_execve() executes a new program. | ||
290 | */ | ||
291 | asmlinkage int sys_execve(const char __user *ufilename, | ||
292 | const char __user *const __user *uargv, | ||
293 | const char __user *const __user *uenvp, | ||
294 | unsigned long r3, unsigned long r4, unsigned long r5, | ||
295 | unsigned long r6, struct pt_regs regs) | ||
296 | { | ||
297 | int error; | ||
298 | char *filename; | ||
299 | |||
300 | filename = getname(ufilename); | ||
301 | error = PTR_ERR(filename); | ||
302 | if (IS_ERR(filename)) | ||
303 | goto out; | ||
304 | |||
305 | error = do_execve(filename, uargv, uenvp, ®s); | ||
306 | putname(filename); | ||
307 | out: | ||
308 | return error; | ||
309 | } | ||
310 | |||
220 | /* | 311 | /* |
221 | * These bracket the sleeping functions.. | 312 | * These bracket the sleeping functions.. |
222 | */ | 313 | */ |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 51f5e9aa490..20743754f2b 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
31 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
32 | #include <asm/system.h> | ||
32 | #include <asm/processor.h> | 33 | #include <asm/processor.h> |
33 | #include <asm/mmu_context.h> | 34 | #include <asm/mmu_context.h> |
34 | 35 | ||
@@ -591,16 +592,17 @@ void user_enable_single_step(struct task_struct *child) | |||
591 | 592 | ||
592 | if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0) | 593 | if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0) |
593 | != sizeof(insn)) | 594 | != sizeof(insn)) |
594 | return; | 595 | return -EIO; |
595 | 596 | ||
596 | compute_next_pc(insn, pc, &next_pc, child); | 597 | compute_next_pc(insn, pc, &next_pc, child); |
597 | if (next_pc & 0x80000000) | 598 | if (next_pc & 0x80000000) |
598 | return; | 599 | return -EIO; |
599 | 600 | ||
600 | if (embed_debug_trap(child, next_pc)) | 601 | if (embed_debug_trap(child, next_pc)) |
601 | return; | 602 | return -EIO; |
602 | 603 | ||
603 | invalidate_cache(); | 604 | invalidate_cache(); |
605 | return 0; | ||
604 | } | 606 | } |
605 | 607 | ||
606 | void user_disable_single_step(struct task_struct *child) | 608 | void user_disable_single_step(struct task_struct *child) |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 6e3c26a1607..a08697f0886 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/unistd.h> | 20 | #include <linux/unistd.h> |
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/freezer.h> | ||
23 | #include <linux/tracehook.h> | 24 | #include <linux/tracehook.h> |
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
25 | #include <asm/ucontext.h> | 26 | #include <asm/ucontext.h> |
@@ -27,6 +28,8 @@ | |||
27 | 28 | ||
28 | #define DEBUG_SIG 0 | 29 | #define DEBUG_SIG 0 |
29 | 30 | ||
31 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
32 | |||
30 | asmlinkage int | 33 | asmlinkage int |
31 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 34 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
32 | unsigned long r2, unsigned long r3, unsigned long r4, | 35 | unsigned long r2, unsigned long r3, unsigned long r4, |
@@ -108,7 +111,11 @@ sys_rt_sigreturn(unsigned long r0, unsigned long r1, | |||
108 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 111 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
109 | goto badframe; | 112 | goto badframe; |
110 | 113 | ||
111 | set_current_blocked(&set); | 114 | sigdelsetmask(&set, ~_BLOCKABLE); |
115 | spin_lock_irq(¤t->sighand->siglock); | ||
116 | current->blocked = set; | ||
117 | recalc_sigpending(); | ||
118 | spin_unlock_irq(¤t->sighand->siglock); | ||
112 | 119 | ||
113 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result)) | 120 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result)) |
114 | goto badframe; | 121 | goto badframe; |
@@ -263,9 +270,9 @@ static int prev_insn(struct pt_regs *regs) | |||
263 | * OK, we're invoking a handler | 270 | * OK, we're invoking a handler |
264 | */ | 271 | */ |
265 | 272 | ||
266 | static void | 273 | static int |
267 | handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | 274 | handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, |
268 | struct pt_regs *regs) | 275 | sigset_t *oldset, struct pt_regs *regs) |
269 | { | 276 | { |
270 | /* Are we from a system call? */ | 277 | /* Are we from a system call? */ |
271 | if (regs->syscall_nr >= 0) { | 278 | if (regs->syscall_nr >= 0) { |
@@ -285,15 +292,21 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | |||
285 | case -ERESTARTNOINTR: | 292 | case -ERESTARTNOINTR: |
286 | regs->r0 = regs->orig_r0; | 293 | regs->r0 = regs->orig_r0; |
287 | if (prev_insn(regs) < 0) | 294 | if (prev_insn(regs) < 0) |
288 | return; | 295 | return -EFAULT; |
289 | } | 296 | } |
290 | } | 297 | } |
291 | 298 | ||
292 | /* Set up the stack frame */ | 299 | /* Set up the stack frame */ |
293 | if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs)) | 300 | if (setup_rt_frame(sig, ka, info, oldset, regs)) |
294 | return; | 301 | return -EFAULT; |
295 | 302 | ||
296 | signal_delivered(sig, info, ka, regs, 0); | 303 | spin_lock_irq(¤t->sighand->siglock); |
304 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | ||
305 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
306 | sigaddset(¤t->blocked,sig); | ||
307 | recalc_sigpending(); | ||
308 | spin_unlock_irq(¤t->sighand->siglock); | ||
309 | return 0; | ||
297 | } | 310 | } |
298 | 311 | ||
299 | /* | 312 | /* |
@@ -306,6 +319,7 @@ static void do_signal(struct pt_regs *regs) | |||
306 | siginfo_t info; | 319 | siginfo_t info; |
307 | int signr; | 320 | int signr; |
308 | struct k_sigaction ka; | 321 | struct k_sigaction ka; |
322 | sigset_t *oldset; | ||
309 | 323 | ||
310 | /* | 324 | /* |
311 | * We want the common case to go fast, which | 325 | * We want the common case to go fast, which |
@@ -316,6 +330,14 @@ static void do_signal(struct pt_regs *regs) | |||
316 | if (!user_mode(regs)) | 330 | if (!user_mode(regs)) |
317 | return; | 331 | return; |
318 | 332 | ||
333 | if (try_to_freeze()) | ||
334 | goto no_signal; | ||
335 | |||
336 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
337 | oldset = ¤t->saved_sigmask; | ||
338 | else | ||
339 | oldset = ¤t->blocked; | ||
340 | |||
319 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 341 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
320 | if (signr > 0) { | 342 | if (signr > 0) { |
321 | /* Re-enable any watchpoints before delivering the | 343 | /* Re-enable any watchpoints before delivering the |
@@ -325,11 +347,13 @@ static void do_signal(struct pt_regs *regs) | |||
325 | */ | 347 | */ |
326 | 348 | ||
327 | /* Whee! Actually deliver the signal. */ | 349 | /* Whee! Actually deliver the signal. */ |
328 | handle_signal(signr, &ka, &info, regs); | 350 | if (handle_signal(signr, &ka, &info, oldset, regs) == 0) |
351 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
329 | 352 | ||
330 | return; | 353 | return; |
331 | } | 354 | } |
332 | 355 | ||
356 | no_signal: | ||
333 | /* Did we come from a system call? */ | 357 | /* Did we come from a system call? */ |
334 | if (regs->syscall_nr >= 0) { | 358 | if (regs->syscall_nr >= 0) { |
335 | /* Restart the system call - no handlers present */ | 359 | /* Restart the system call - no handlers present */ |
@@ -344,7 +368,10 @@ static void do_signal(struct pt_regs *regs) | |||
344 | prev_insn(regs); | 368 | prev_insn(regs); |
345 | } | 369 | } |
346 | } | 370 | } |
347 | restore_saved_sigmask(); | 371 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { |
372 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
373 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
374 | } | ||
348 | } | 375 | } |
349 | 376 | ||
350 | /* | 377 | /* |
@@ -364,5 +391,9 @@ void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags) | |||
364 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 391 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
365 | clear_thread_flag(TIF_NOTIFY_RESUME); | 392 | clear_thread_flag(TIF_NOTIFY_RESUME); |
366 | tracehook_notify_resume(regs); | 393 | tracehook_notify_resume(regs); |
394 | if (current->replacement_session_keyring) | ||
395 | key_replace_session_keyring(); | ||
367 | } | 396 | } |
397 | |||
398 | clear_thread_flag(TIF_IRET); | ||
368 | } | 399 | } |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 13168a769f8..cfdbe5d1500 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -109,8 +109,12 @@ static unsigned int calibration_result; | |||
109 | /* Function Prototypes */ | 109 | /* Function Prototypes */ |
110 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 110 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
111 | 111 | ||
112 | void smp_prepare_boot_cpu(void); | ||
113 | void smp_prepare_cpus(unsigned int); | ||
112 | static void init_ipi_lock(void); | 114 | static void init_ipi_lock(void); |
113 | static void do_boot_cpu(int); | 115 | static void do_boot_cpu(int); |
116 | int __cpu_up(unsigned int); | ||
117 | void smp_cpus_done(unsigned int); | ||
114 | 118 | ||
115 | int start_secondary(void *); | 119 | int start_secondary(void *); |
116 | static void smp_callin(void); | 120 | static void smp_callin(void); |
@@ -127,7 +131,7 @@ static void unmap_cpu_to_physid(int, int); | |||
127 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 131 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
128 | /* Boot up APs Routines : BSP */ | 132 | /* Boot up APs Routines : BSP */ |
129 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 133 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
130 | void smp_prepare_boot_cpu(void) | 134 | void __devinit smp_prepare_boot_cpu(void) |
131 | { | 135 | { |
132 | bsp_phys_id = hard_smp_processor_id(); | 136 | bsp_phys_id = hard_smp_processor_id(); |
133 | physid_set(bsp_phys_id, phys_cpu_present_map); | 137 | physid_set(bsp_phys_id, phys_cpu_present_map); |
@@ -343,7 +347,7 @@ static void __init do_boot_cpu(int phys_id) | |||
343 | } | 347 | } |
344 | } | 348 | } |
345 | 349 | ||
346 | int __cpuinit __cpu_up(unsigned int cpu_id, struct task_struct *tidle) | 350 | int __cpuinit __cpu_up(unsigned int cpu_id) |
347 | { | 351 | { |
348 | int timeout; | 352 | int timeout; |
349 | 353 | ||
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index c3fdd632fba..d841fb6cc70 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
@@ -88,3 +88,24 @@ asmlinkage int sys_cachectl(char *addr, int nbytes, int op) | |||
88 | /* Not implemented yet. */ | 88 | /* Not implemented yet. */ |
89 | return -ENOSYS; | 89 | return -ENOSYS; |
90 | } | 90 | } |
91 | |||
92 | /* | ||
93 | * Do a system call from kernel instead of calling sys_execve so we | ||
94 | * end up with proper pt_regs. | ||
95 | */ | ||
96 | int kernel_execve(const char *filename, | ||
97 | const char *const argv[], | ||
98 | const char *const envp[]) | ||
99 | { | ||
100 | register long __scno __asm__ ("r7") = __NR_execve; | ||
101 | register long __arg3 __asm__ ("r2") = (long)(envp); | ||
102 | register long __arg2 __asm__ ("r1") = (long)(argv); | ||
103 | register long __res __asm__ ("r0") = (long)(filename); | ||
104 | __asm__ __volatile__ ( | ||
105 | "trap #" SYSCALL_VECTOR "|| nop" | ||
106 | : "=r" (__res) | ||
107 | : "r" (__scno), "0" (__res), "r" (__arg2), | ||
108 | "r" (__arg3) | ||
109 | : "memory"); | ||
110 | return __res; | ||
111 | } | ||
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index 3bcb207e5b6..ee6a9199561 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
20 | 20 | ||
21 | #include <asm/system.h> | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <linux/atomic.h> | 24 | #include <linux/atomic.h> |
diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c index 80f18cc6f54..888aab1157e 100644 --- a/arch/m32r/mm/fault-nommu.c +++ b/arch/m32r/mm/fault-nommu.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/vt_kern.h> /* For unblank_screen() */ | 22 | #include <linux/vt_kern.h> /* For unblank_screen() */ |
23 | 23 | ||
24 | #include <asm/m32r.h> | 24 | #include <asm/m32r.h> |
25 | #include <asm/system.h> | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/pgalloc.h> | 27 | #include <asm/pgalloc.h> |
27 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable.h> |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 3cdfa9c1d09..2c9aeb45384 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | 27 | ||
28 | #include <asm/m32r.h> | 28 | #include <asm/m32r.h> |
29 | #include <asm/system.h> | ||
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/hardirq.h> | 31 | #include <asm/hardirq.h> |
31 | #include <asm/mmu_context.h> | 32 | #include <asm/mmu_context.h> |
diff --git a/arch/m32r/platforms/m32104ut/setup.c b/arch/m32r/platforms/m32104ut/setup.c index e2dd778aeac..34671d32cef 100644 --- a/arch/m32r/platforms/m32104ut/setup.c +++ b/arch/m32r/platforms/m32104ut/setup.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | 15 | ||
16 | #include <asm/system.h> | ||
16 | #include <asm/m32r.h> | 17 | #include <asm/m32r.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | 19 | ||
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c index 9a4ba8a8589..1053e1cb740 100644 --- a/arch/m32r/platforms/m32700ut/setup.c +++ b/arch/m32r/platforms/m32700ut/setup.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | 18 | ||
19 | #include <asm/system.h> | ||
19 | #include <asm/m32r.h> | 20 | #include <asm/m32r.h> |
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | 22 | ||
diff --git a/arch/m32r/platforms/mappi/setup.c b/arch/m32r/platforms/mappi/setup.c index 767d2f4d6de..35130ac3f8d 100644 --- a/arch/m32r/platforms/mappi/setup.c +++ b/arch/m32r/platforms/mappi/setup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | ||
15 | #include <asm/system.h> | ||
15 | #include <asm/m32r.h> | 16 | #include <asm/m32r.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
diff --git a/arch/m32r/platforms/mappi2/setup.c b/arch/m32r/platforms/mappi2/setup.c index 76d665abf51..f3ed6b60a5f 100644 --- a/arch/m32r/platforms/mappi2/setup.c +++ b/arch/m32r/platforms/mappi2/setup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | ||
15 | #include <asm/system.h> | ||
15 | #include <asm/m32r.h> | 16 | #include <asm/m32r.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
diff --git a/arch/m32r/platforms/mappi3/setup.c b/arch/m32r/platforms/mappi3/setup.c index a3646d4b05b..2408e356ad1 100644 --- a/arch/m32r/platforms/mappi3/setup.c +++ b/arch/m32r/platforms/mappi3/setup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | ||
15 | #include <asm/system.h> | ||
15 | #include <asm/m32r.h> | 16 | #include <asm/m32r.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
diff --git a/arch/m32r/platforms/oaks32r/setup.c b/arch/m32r/platforms/oaks32r/setup.c index f8373c06952..83b46b067a1 100644 --- a/arch/m32r/platforms/oaks32r/setup.c +++ b/arch/m32r/platforms/oaks32r/setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | 13 | ||
14 | #include <asm/system.h> | ||
14 | #include <asm/m32r.h> | 15 | #include <asm/m32r.h> |
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | 17 | ||
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c index cd0170483e8..32660705f5f 100644 --- a/arch/m32r/platforms/opsput/setup.c +++ b/arch/m32r/platforms/opsput/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | 19 | ||
20 | #include <asm/system.h> | ||
20 | #include <asm/m32r.h> | 21 | #include <asm/m32r.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
diff --git a/arch/m32r/platforms/usrv/setup.c b/arch/m32r/platforms/usrv/setup.c index dcde0ec777f..0c7a1e8c77b 100644 --- a/arch/m32r/platforms/usrv/setup.c +++ b/arch/m32r/platforms/usrv/setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | 13 | ||
14 | #include <asm/system.h> | ||
14 | #include <asm/m32r.h> | 15 | #include <asm/m32r.h> |
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | 17 | ||