diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
commit | a890b15c0990cc8d686edcc85f5fccde71ad5ce9 (patch) | |
tree | 73162355b58283a2531f13fbbf663809f95c1483 /arch/m32r | |
parent | 79fa1b677be3a985cc66b9218a4dd09818f1051b (diff) | |
parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) |
Merge branch 'upstream'
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/Kconfig | 5 | ||||
-rw-r--r-- | arch/m32r/kernel/m32r_ksyms.c | 29 | ||||
-rw-r--r-- | arch/m32r/kernel/setup.c | 12 | ||||
-rw-r--r-- | arch/m32r/kernel/smpboot.c | 19 | ||||
-rw-r--r-- | arch/m32r/lib/Makefile | 4 | ||||
-rw-r--r-- | arch/m32r/lib/getuser.S | 88 | ||||
-rw-r--r-- | arch/m32r/lib/putuser.S | 84 |
7 files changed, 22 insertions, 219 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 05c864c6c2d9..41fd490af3b4 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -285,6 +285,11 @@ config NUMA | |||
285 | depends on SMP && BROKEN | 285 | depends on SMP && BROKEN |
286 | default n | 286 | default n |
287 | 287 | ||
288 | config NODES_SHIFT | ||
289 | int | ||
290 | default "1" | ||
291 | depends on NEED_MULTIPLE_NODES | ||
292 | |||
288 | # turning this on wastes a bunch of space. | 293 | # turning this on wastes a bunch of space. |
289 | # Summit needs it only when NUMA is on | 294 | # Summit needs it only when NUMA is on |
290 | config BOOT_IOREMAP | 295 | config BOOT_IOREMAP |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index be8b711367ec..c50330fa83b9 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
@@ -23,9 +23,6 @@ EXPORT_SYMBOL(boot_cpu_data); | |||
23 | EXPORT_SYMBOL(dump_fpu); | 23 | EXPORT_SYMBOL(dump_fpu); |
24 | EXPORT_SYMBOL(__ioremap); | 24 | EXPORT_SYMBOL(__ioremap); |
25 | EXPORT_SYMBOL(iounmap); | 25 | EXPORT_SYMBOL(iounmap); |
26 | EXPORT_SYMBOL(enable_irq); | ||
27 | EXPORT_SYMBOL(disable_irq); | ||
28 | EXPORT_SYMBOL(disable_irq_nosync); | ||
29 | EXPORT_SYMBOL(kernel_thread); | 26 | EXPORT_SYMBOL(kernel_thread); |
30 | EXPORT_SYMBOL(__down); | 27 | EXPORT_SYMBOL(__down); |
31 | EXPORT_SYMBOL(__down_interruptible); | 28 | EXPORT_SYMBOL(__down_interruptible); |
@@ -38,13 +35,6 @@ EXPORT_SYMBOL(__udelay); | |||
38 | EXPORT_SYMBOL(__delay); | 35 | EXPORT_SYMBOL(__delay); |
39 | EXPORT_SYMBOL(__const_udelay); | 36 | EXPORT_SYMBOL(__const_udelay); |
40 | 37 | ||
41 | EXPORT_SYMBOL(__get_user_1); | ||
42 | EXPORT_SYMBOL(__get_user_2); | ||
43 | EXPORT_SYMBOL(__get_user_4); | ||
44 | |||
45 | EXPORT_SYMBOL(strpbrk); | ||
46 | EXPORT_SYMBOL(strstr); | ||
47 | |||
48 | EXPORT_SYMBOL(strncpy_from_user); | 38 | EXPORT_SYMBOL(strncpy_from_user); |
49 | EXPORT_SYMBOL(__strncpy_from_user); | 39 | EXPORT_SYMBOL(__strncpy_from_user); |
50 | EXPORT_SYMBOL(clear_user); | 40 | EXPORT_SYMBOL(clear_user); |
@@ -59,11 +49,8 @@ extern void *dcache_dummy; | |||
59 | EXPORT_SYMBOL(dcache_dummy); | 49 | EXPORT_SYMBOL(dcache_dummy); |
60 | #endif | 50 | #endif |
61 | EXPORT_SYMBOL(cpu_data); | 51 | EXPORT_SYMBOL(cpu_data); |
62 | EXPORT_SYMBOL(cpu_online_map); | ||
63 | EXPORT_SYMBOL(cpu_callout_map); | ||
64 | 52 | ||
65 | /* Global SMP stuff */ | 53 | /* Global SMP stuff */ |
66 | EXPORT_SYMBOL(synchronize_irq); | ||
67 | EXPORT_SYMBOL(smp_call_function); | 54 | EXPORT_SYMBOL(smp_call_function); |
68 | 55 | ||
69 | /* TLB flushing */ | 56 | /* TLB flushing */ |
@@ -83,27 +70,11 @@ EXPORT_SYMBOL(__lshrdi3); | |||
83 | EXPORT_SYMBOL(__muldi3); | 70 | EXPORT_SYMBOL(__muldi3); |
84 | 71 | ||
85 | /* memory and string operations */ | 72 | /* memory and string operations */ |
86 | EXPORT_SYMBOL(memchr); | ||
87 | EXPORT_SYMBOL(memcpy); | 73 | EXPORT_SYMBOL(memcpy); |
88 | /* EXPORT_SYMBOL(memcpy_fromio); // not implement yet */ | ||
89 | /* EXPORT_SYMBOL(memcpy_toio); // not implement yet */ | ||
90 | EXPORT_SYMBOL(memset); | 74 | EXPORT_SYMBOL(memset); |
91 | /* EXPORT_SYMBOL(memset_io); // not implement yet */ | ||
92 | EXPORT_SYMBOL(memmove); | ||
93 | EXPORT_SYMBOL(memcmp); | ||
94 | EXPORT_SYMBOL(memscan); | ||
95 | EXPORT_SYMBOL(copy_page); | 75 | EXPORT_SYMBOL(copy_page); |
96 | EXPORT_SYMBOL(clear_page); | 76 | EXPORT_SYMBOL(clear_page); |
97 | |||
98 | EXPORT_SYMBOL(strcat); | ||
99 | EXPORT_SYMBOL(strchr); | ||
100 | EXPORT_SYMBOL(strcmp); | ||
101 | EXPORT_SYMBOL(strcpy); | ||
102 | EXPORT_SYMBOL(strlen); | 77 | EXPORT_SYMBOL(strlen); |
103 | EXPORT_SYMBOL(strncat); | ||
104 | EXPORT_SYMBOL(strncmp); | ||
105 | EXPORT_SYMBOL(strnlen); | ||
106 | EXPORT_SYMBOL(strncpy); | ||
107 | 78 | ||
108 | EXPORT_SYMBOL(_inb); | 79 | EXPORT_SYMBOL(_inb); |
109 | EXPORT_SYMBOL(_inw); | 80 | EXPORT_SYMBOL(_inw); |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 0d78942b4c76..3cd3c2988a48 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | ||
12 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
@@ -219,8 +220,6 @@ static unsigned long __init setup_memory(void) | |||
219 | extern unsigned long setup_memory(void); | 220 | extern unsigned long setup_memory(void); |
220 | #endif /* CONFIG_DISCONTIGMEM */ | 221 | #endif /* CONFIG_DISCONTIGMEM */ |
221 | 222 | ||
222 | #define M32R_PCC_PCATCR 0x00ef7014 /* will move to m32r.h */ | ||
223 | |||
224 | void __init setup_arch(char **cmdline_p) | 223 | void __init setup_arch(char **cmdline_p) |
225 | { | 224 | { |
226 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 225 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); |
@@ -269,15 +268,14 @@ void __init setup_arch(char **cmdline_p) | |||
269 | paging_init(); | 268 | paging_init(); |
270 | } | 269 | } |
271 | 270 | ||
272 | static struct cpu cpu[NR_CPUS]; | 271 | static struct cpu cpu_devices[NR_CPUS]; |
273 | 272 | ||
274 | static int __init topology_init(void) | 273 | static int __init topology_init(void) |
275 | { | 274 | { |
276 | int cpu_id; | 275 | int i; |
277 | 276 | ||
278 | for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) | 277 | for_each_present_cpu(i) |
279 | if (cpu_possible(cpu_id)) | 278 | register_cpu(&cpu_devices[i], i, NULL); |
280 | register_cpu(&cpu[cpu_id], cpu_id, NULL); | ||
281 | 279 | ||
282 | return 0; | 280 | return 0; |
283 | } | 281 | } |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index d7ec16e7fb25..840b4348bf0c 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -39,8 +39,10 @@ | |||
39 | * Martin J. Bligh : Added support for multi-quad systems | 39 | * Martin J. Bligh : Added support for multi-quad systems |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/module.h> | ||
42 | #include <linux/config.h> | 43 | #include <linux/config.h> |
43 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/kernel.h> | ||
44 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
45 | #include <linux/smp_lock.h> | 47 | #include <linux/smp_lock.h> |
46 | #include <linux/irq.h> | 48 | #include <linux/irq.h> |
@@ -72,11 +74,15 @@ physid_mask_t phys_cpu_present_map; | |||
72 | 74 | ||
73 | /* Bitmask of currently online CPUs */ | 75 | /* Bitmask of currently online CPUs */ |
74 | cpumask_t cpu_online_map; | 76 | cpumask_t cpu_online_map; |
77 | EXPORT_SYMBOL(cpu_online_map); | ||
75 | 78 | ||
76 | cpumask_t cpu_bootout_map; | 79 | cpumask_t cpu_bootout_map; |
77 | cpumask_t cpu_bootin_map; | 80 | cpumask_t cpu_bootin_map; |
78 | cpumask_t cpu_callout_map; | ||
79 | static cpumask_t cpu_callin_map; | 81 | static cpumask_t cpu_callin_map; |
82 | cpumask_t cpu_callout_map; | ||
83 | EXPORT_SYMBOL(cpu_callout_map); | ||
84 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
85 | EXPORT_SYMBOL(cpu_possible_map); | ||
80 | 86 | ||
81 | /* Per CPU bogomips and other parameters */ | 87 | /* Per CPU bogomips and other parameters */ |
82 | struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned; | 88 | struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned; |
@@ -110,7 +116,6 @@ static unsigned int calibration_result; | |||
110 | 116 | ||
111 | void smp_prepare_boot_cpu(void); | 117 | void smp_prepare_boot_cpu(void); |
112 | void smp_prepare_cpus(unsigned int); | 118 | void smp_prepare_cpus(unsigned int); |
113 | static void smp_tune_scheduling(void); | ||
114 | static void init_ipi_lock(void); | 119 | static void init_ipi_lock(void); |
115 | static void do_boot_cpu(int); | 120 | static void do_boot_cpu(int); |
116 | int __cpu_up(unsigned int); | 121 | int __cpu_up(unsigned int); |
@@ -177,6 +182,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
177 | } | 182 | } |
178 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) | 183 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) |
179 | physid_set(phys_id, phys_cpu_present_map); | 184 | physid_set(phys_id, phys_cpu_present_map); |
185 | #ifndef CONFIG_HOTPLUG_CPU | ||
186 | cpu_present_map = cpu_possible_map; | ||
187 | #endif | ||
180 | 188 | ||
181 | show_mp_info(nr_cpu); | 189 | show_mp_info(nr_cpu); |
182 | 190 | ||
@@ -186,7 +194,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
186 | * Setup boot CPU information | 194 | * Setup boot CPU information |
187 | */ | 195 | */ |
188 | smp_store_cpu_info(0); /* Final full version of the data */ | 196 | smp_store_cpu_info(0); /* Final full version of the data */ |
189 | smp_tune_scheduling(); | ||
190 | 197 | ||
191 | /* | 198 | /* |
192 | * If SMP should be disabled, then really disable it! | 199 | * If SMP should be disabled, then really disable it! |
@@ -230,11 +237,6 @@ smp_done: | |||
230 | Dprintk("Boot done.\n"); | 237 | Dprintk("Boot done.\n"); |
231 | } | 238 | } |
232 | 239 | ||
233 | static void __init smp_tune_scheduling(void) | ||
234 | { | ||
235 | /* Nothing to do. */ | ||
236 | } | ||
237 | |||
238 | /* | 240 | /* |
239 | * init_ipi_lock : Initialize IPI locks. | 241 | * init_ipi_lock : Initialize IPI locks. |
240 | */ | 242 | */ |
@@ -629,4 +631,3 @@ static void __init unmap_cpu_to_physid(int cpu_id, int phys_id) | |||
629 | physid_2_cpu[phys_id] = -1; | 631 | physid_2_cpu[phys_id] = -1; |
630 | cpu_2_physid[cpu_id] = -1; | 632 | cpu_2_physid[cpu_id] = -1; |
631 | } | 633 | } |
632 | |||
diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile index e632d10c7d78..d16b4e40d1ae 100644 --- a/arch/m32r/lib/Makefile +++ b/arch/m32r/lib/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for M32R-specific library files.. | 2 | # Makefile for M32R-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := checksum.o ashxdi3.o memset.o memcpy.o getuser.o \ | 5 | lib-y := checksum.o ashxdi3.o memset.o memcpy.o \ |
6 | putuser.o delay.o strlen.o usercopy.o csum_partial_copy.o | 6 | delay.o strlen.o usercopy.o csum_partial_copy.o |
7 | 7 | ||
diff --git a/arch/m32r/lib/getuser.S b/arch/m32r/lib/getuser.S deleted file mode 100644 index 58a0db055c5c..000000000000 --- a/arch/m32r/lib/getuser.S +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /* | ||
2 | * __get_user functions. | ||
3 | * | ||
4 | * (C) Copyright 2001 Hirokazu Takata | ||
5 | * | ||
6 | * These functions have a non-standard call interface | ||
7 | * to make them more efficient, especially as they | ||
8 | * return an error value in addition to the "real" | ||
9 | * return value. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | |||
14 | /* | ||
15 | * __get_user_X | ||
16 | * | ||
17 | * Inputs: r0 contains the address | ||
18 | * | ||
19 | * Outputs: r0 is error code (0 or -EFAULT) | ||
20 | * r1 contains zero-extended value | ||
21 | * | ||
22 | * These functions should not modify any other registers, | ||
23 | * as they get called from within inline assembly. | ||
24 | */ | ||
25 | |||
26 | #ifdef CONFIG_ISA_DUAL_ISSUE | ||
27 | |||
28 | .text | ||
29 | .balign 4 | ||
30 | .globl __get_user_1 | ||
31 | __get_user_1: | ||
32 | 1: ldub r1, @r0 || ldi r0, #0 | ||
33 | jmp r14 | ||
34 | |||
35 | .balign 4 | ||
36 | .globl __get_user_2 | ||
37 | __get_user_2: | ||
38 | 2: lduh r1, @r0 || ldi r0, #0 | ||
39 | jmp r14 | ||
40 | |||
41 | .balign 4 | ||
42 | .globl __get_user_4 | ||
43 | __get_user_4: | ||
44 | 3: ld r1, @r0 || ldi r0, #0 | ||
45 | jmp r14 | ||
46 | |||
47 | bad_get_user: | ||
48 | ldi r1, #0 || ldi r0, #-14 | ||
49 | jmp r14 | ||
50 | |||
51 | #else /* not CONFIG_ISA_DUAL_ISSUE */ | ||
52 | |||
53 | .text | ||
54 | .balign 4 | ||
55 | .globl __get_user_1 | ||
56 | __get_user_1: | ||
57 | 1: ldub r1, @r0 | ||
58 | ldi r0, #0 | ||
59 | jmp r14 | ||
60 | |||
61 | .balign 4 | ||
62 | .globl __get_user_2 | ||
63 | __get_user_2: | ||
64 | 2: lduh r1, @r0 | ||
65 | ldi r0, #0 | ||
66 | jmp r14 | ||
67 | |||
68 | .balign 4 | ||
69 | .globl __get_user_4 | ||
70 | __get_user_4: | ||
71 | 3: ld r1, @r0 | ||
72 | ldi r0, #0 | ||
73 | jmp r14 | ||
74 | |||
75 | bad_get_user: | ||
76 | ldi r1, #0 | ||
77 | ldi r0, #-14 | ||
78 | jmp r14 | ||
79 | |||
80 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | ||
81 | |||
82 | .section __ex_table,"a" | ||
83 | .long 1b,bad_get_user | ||
84 | .long 2b,bad_get_user | ||
85 | .long 3b,bad_get_user | ||
86 | .previous | ||
87 | |||
88 | .end | ||
diff --git a/arch/m32r/lib/putuser.S b/arch/m32r/lib/putuser.S deleted file mode 100644 index 218154cc3890..000000000000 --- a/arch/m32r/lib/putuser.S +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * __put_user functions. | ||
3 | * | ||
4 | * (C) Copyright 1998 Linus Torvalds | ||
5 | * (C) Copyright 2001 Hirokazu Takata | ||
6 | * | ||
7 | * These functions have a non-standard call interface | ||
8 | * to make them more efficient. | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | /* | ||
14 | * __put_user_X | ||
15 | * | ||
16 | * Inputs: r0 contains the address | ||
17 | * r1 contains the value | ||
18 | * | ||
19 | * Outputs: r0 is error code (0 or -EFAULT) | ||
20 | * r1 is corrupted (will contain "current_task"). | ||
21 | * | ||
22 | * These functions should not modify any other registers, | ||
23 | * as they get called from within inline assembly. | ||
24 | */ | ||
25 | |||
26 | #ifdef CONFIG_ISA_DUAL_ISSUE | ||
27 | |||
28 | .text | ||
29 | .balign 4 | ||
30 | .globl __put_user_1 | ||
31 | __put_user_1: | ||
32 | 1: stb r1, @r0 || ldi r0, #0 | ||
33 | jmp r14 | ||
34 | |||
35 | .balign 4 | ||
36 | .globl __put_user_2 | ||
37 | __put_user_2: | ||
38 | 2: sth r1, @r0 || ldi r0, #0 | ||
39 | jmp r14 | ||
40 | |||
41 | .balign 4 | ||
42 | .globl __put_user_4 | ||
43 | __put_user_4: | ||
44 | 3: st r1, @r0 || ldi r0, #0 | ||
45 | jmp r14 | ||
46 | |||
47 | bad_put_user: | ||
48 | ldi r0, #-14 || jmp r14 | ||
49 | |||
50 | #else /* not CONFIG_ISA_DUAL_ISSUE */ | ||
51 | |||
52 | .text | ||
53 | .balign 4 | ||
54 | .globl __put_user_1 | ||
55 | __put_user_1: | ||
56 | 1: stb r1, @r0 | ||
57 | ldi r0, #0 | ||
58 | jmp r14 | ||
59 | |||
60 | .balign 4 | ||
61 | .globl __put_user_2 | ||
62 | __put_user_2: | ||
63 | 2: sth r1, @r0 | ||
64 | ldi r0, #0 | ||
65 | jmp r14 | ||
66 | |||
67 | .balign 4 | ||
68 | .globl __put_user_4 | ||
69 | __put_user_4: | ||
70 | 3: st r1, @r0 | ||
71 | ldi r0, #0 | ||
72 | jmp r14 | ||
73 | |||
74 | bad_put_user: | ||
75 | ldi r0, #-14 | ||
76 | jmp r14 | ||
77 | |||
78 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | ||
79 | |||
80 | .section __ex_table,"a" | ||
81 | .long 1b,bad_put_user | ||
82 | .long 2b,bad_put_user | ||
83 | .long 3b,bad_put_user | ||
84 | .previous | ||