diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-04-20 09:05:47 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-04-26 06:06:10 -0400 |
commit | 5cdaf1834f43b0edc4a3aa683aa4ec98f6bfe8a7 (patch) | |
tree | c2ea97e82f7f04eb14d454ea1045f56717d468fd | |
parent | 29d5e0476e1c4a513859e7858845ad172f560389 (diff) |
x86: Add task_struct argument to smp_ops.cpu_up
Preparatory patch to use the generic idle thread allocation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20120420124557.176604405@linutronix.de
-rw-r--r-- | arch/x86/include/asm/smp.h | 6 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/smp.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 4eb3a74bc4b0..f3ed33811c23 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -72,7 +72,7 @@ struct smp_ops { | |||
72 | void (*stop_other_cpus)(int wait); | 72 | void (*stop_other_cpus)(int wait); |
73 | void (*smp_send_reschedule)(int cpu); | 73 | void (*smp_send_reschedule)(int cpu); |
74 | 74 | ||
75 | int (*cpu_up)(unsigned cpu); | 75 | int (*cpu_up)(unsigned cpu, struct task_struct *tidle); |
76 | int (*cpu_disable)(void); | 76 | int (*cpu_disable)(void); |
77 | void (*cpu_die)(unsigned int cpu); | 77 | void (*cpu_die)(unsigned int cpu); |
78 | void (*play_dead)(void); | 78 | void (*play_dead)(void); |
@@ -117,7 +117,7 @@ static inline void smp_cpus_done(unsigned int max_cpus) | |||
117 | 117 | ||
118 | static inline int __cpu_up(unsigned int cpu, struct task_struct *tidle) | 118 | static inline int __cpu_up(unsigned int cpu, struct task_struct *tidle) |
119 | { | 119 | { |
120 | return smp_ops.cpu_up(cpu); | 120 | return smp_ops.cpu_up(cpu, tidle); |
121 | } | 121 | } |
122 | 122 | ||
123 | static inline int __cpu_disable(void) | 123 | static inline int __cpu_disable(void) |
@@ -154,7 +154,7 @@ void cpu_disable_common(void); | |||
154 | void native_smp_prepare_boot_cpu(void); | 154 | void native_smp_prepare_boot_cpu(void); |
155 | void native_smp_prepare_cpus(unsigned int max_cpus); | 155 | void native_smp_prepare_cpus(unsigned int max_cpus); |
156 | void native_smp_cpus_done(unsigned int max_cpus); | 156 | void native_smp_cpus_done(unsigned int max_cpus); |
157 | int native_cpu_up(unsigned int cpunum); | 157 | int native_cpu_up(unsigned int cpunum, struct task_struct *tidle); |
158 | int native_cpu_disable(void); | 158 | int native_cpu_disable(void); |
159 | void native_cpu_die(unsigned int cpu); | 159 | void native_cpu_die(unsigned int cpu); |
160 | void native_play_dead(void); | 160 | void native_play_dead(void); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 6e1e406038c2..def235bf7594 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -818,7 +818,7 @@ do_rest: | |||
818 | return boot_error; | 818 | return boot_error; |
819 | } | 819 | } |
820 | 820 | ||
821 | int __cpuinit native_cpu_up(unsigned int cpu) | 821 | int __cpuinit native_cpu_up(unsigned int cpu, struct task_struct *tidle) |
822 | { | 822 | { |
823 | int apicid = apic->cpu_present_to_apicid(cpu); | 823 | int apicid = apic->cpu_present_to_apicid(cpu); |
824 | unsigned long flags; | 824 | unsigned long flags; |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 5fac6919b957..64d3bbce0b36 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -331,7 +331,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
331 | return 0; | 331 | return 0; |
332 | } | 332 | } |
333 | 333 | ||
334 | static int __cpuinit xen_cpu_up(unsigned int cpu) | 334 | static int __cpuinit xen_cpu_up(unsigned int cpu, struct task_struct *tidle) |
335 | { | 335 | { |
336 | struct task_struct *idle = idle_task(cpu); | 336 | struct task_struct *idle = idle_task(cpu); |
337 | int rc; | 337 | int rc; |
@@ -547,10 +547,10 @@ static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus) | |||
547 | xen_init_lock_cpu(0); | 547 | xen_init_lock_cpu(0); |
548 | } | 548 | } |
549 | 549 | ||
550 | static int __cpuinit xen_hvm_cpu_up(unsigned int cpu) | 550 | static int __cpuinit xen_hvm_cpu_up(unsigned int cpu, struct task_struct *tidle) |
551 | { | 551 | { |
552 | int rc; | 552 | int rc; |
553 | rc = native_cpu_up(cpu); | 553 | rc = native_cpu_up(cpu, tidle); |
554 | WARN_ON (xen_smp_intr_init(cpu)); | 554 | WARN_ON (xen_smp_intr_init(cpu)); |
555 | return rc; | 555 | return rc; |
556 | } | 556 | } |