diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2006-04-11 01:53:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:34 -0400 |
commit | 7c1c4e541888947947bc46a18a9a5543a259ed62 (patch) | |
tree | b2484781dd89aea63fb0e66702f0ec1b9ad491c0 /arch/m32r/kernel/setup.c | |
parent | 917b1f78a9871a1985004df09ed1eb2e0dc3bf4f (diff) |
[PATCH] m32r: Fix cpu_possible_map and cpu_present_map initialization for SMP kernel
This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
later.
In this patch, cpu_possible_map is statically initialized, and cpu_present_map
is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
architecture has not supported CPU hotplug yet.
Signed-off-by: Hayato Fujiwara <fujiwara.hayato@renesas.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m32r/kernel/setup.c')
-rw-r--r-- | arch/m32r/kernel/setup.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 | } |