Commit 033ab7f8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[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 <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a1836a42
......@@ -1938,3 +1938,9 @@ smp_cpus_done(unsigned int max_cpus)
void __init
current_thread_info()->cpu = hard_smp_processor_id();
......@@ -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 */
......@@ -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[];
* Interrupts are still disabled. Do necessary setups, then
* enable them
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment