diff options
author | Andrew Morton <akpm@osdl.org> | 2006-06-30 04:55:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 14:25:37 -0400 |
commit | 033ab7f8e5c655f49ec8039930b2efd412abbbd7 (patch) | |
tree | 33fd8073e47d88731380d97be8ecdbdbd69b459e /init/main.c | |
parent | a1836a42daf5ddfe9a891973734bd9a7d62eb504 (diff) |
[PATCH] add smp_setup_processor_id()
Presently, smp_processor_id() isn't necessarily set up until setup_arch().
But it's used in boot_cpu_init() and printk() and perhaps in other places,
prior to setup_arch() being called.
So provide a new smp_setup_processor_id() which is called before anything
else, wire it up for Voyager (which boots on a CPU other than #0, and broke).
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index bce0eb7f4f8f..ae04eb78a93a 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -446,10 +446,17 @@ static void __init boot_cpu_init(void) | |||
446 | cpu_set(cpu, cpu_possible_map); | 446 | cpu_set(cpu, cpu_possible_map); |
447 | } | 447 | } |
448 | 448 | ||
449 | void __init __attribute__((weak)) smp_setup_processor_id(void) | ||
450 | { | ||
451 | } | ||
452 | |||
449 | asmlinkage void __init start_kernel(void) | 453 | asmlinkage void __init start_kernel(void) |
450 | { | 454 | { |
451 | char * command_line; | 455 | char * command_line; |
452 | extern struct kernel_param __start___param[], __stop___param[]; | 456 | extern struct kernel_param __start___param[], __stop___param[]; |
457 | |||
458 | smp_setup_processor_id(); | ||
459 | |||
453 | /* | 460 | /* |
454 | * Interrupts are still disabled. Do necessary setups, then | 461 | * Interrupts are still disabled. Do necessary setups, then |
455 | * enable them | 462 | * enable them |