aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/mach-voyager/voyager_smp.c6
-rw-r--r--include/linux/smp.h2
-rw-r--r--init/main.c7
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index 5b8b579a079f..6e9e494c6c3d 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)
1938{ 1938{
1939 zap_low_mappings(); 1939 zap_low_mappings();
1940} 1940}
1941
1942void __init
1943smp_setup_processor_id(void)
1944{
1945 current_thread_info()->cpu = hard_smp_processor_id();
1946}
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c93c3fe4308c..837e8bce1349 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -125,4 +125,6 @@ static inline void smp_send_reschedule(int cpu) { }
125#define put_cpu() preempt_enable() 125#define put_cpu() preempt_enable()
126#define put_cpu_no_resched() preempt_enable_no_resched() 126#define put_cpu_no_resched() preempt_enable_no_resched()
127 127
128void smp_setup_processor_id(void);
129
128#endif /* __LINUX_SMP_H */ 130#endif /* __LINUX_SMP_H */
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
449void __init __attribute__((weak)) smp_setup_processor_id(void)
450{
451}
452
449asmlinkage void __init start_kernel(void) 453asmlinkage 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