diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 5b8b579a079fa8a7afdc52e4871aef91b3a94665..6e9e494c6c3d9c6a62328dec1342bea9eed49061 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c @@ -1938,3 +1938,9 @@ smp_cpus_done(unsigned int max_cpus) { zap_low_mappings(); } + +void __init +smp_setup_processor_id(void) +{ + current_thread_info()->cpu = hard_smp_processor_id(); +} diff --git a/include/linux/smp.h b/include/linux/smp.h index c93c3fe4308c898cd2a6fa9939305e9b4203bbc5..837e8bce134930405e98192986c3b4fd10ce4151 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -125,4 +125,6 @@ static inline void smp_send_reschedule(int cpu) { } #define put_cpu() preempt_enable() #define put_cpu_no_resched() preempt_enable_no_resched() +void smp_setup_processor_id(void); + #endif /* __LINUX_SMP_H */ diff --git a/init/main.c b/init/main.c index bce0eb7f4f8fb50413a516b1a3bafbb8ae81b821..ae04eb78a93a6f4db0017ee0e4cbdec0d764e7d7 100644 --- a/init/main.c +++ b/init/main.c @@ -446,10 +446,17 @@ static void __init boot_cpu_init(void) cpu_set(cpu, cpu_possible_map); } +void __init __attribute__((weak)) smp_setup_processor_id(void) +{ +} + asmlinkage void __init start_kernel(void) { char * command_line; extern struct kernel_param __start___param[], __stop___param[]; + + smp_setup_processor_id(); + /* * Interrupts are still disabled. Do necessary setups, then * enable them