aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlex Nixon <alex.nixon@citrix.com>2008-08-22 06:52:11 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-25 04:59:18 -0400
commit93be71b672f167b1e8c23725114f86305354f0ac (patch)
treee443c353919877853fef4f26128b8747ef5a6908 /include
parente4f807c2b4d81636fc63993368646c5bfd42b22f (diff)
x86: add cpu hotplug hooks into smp_ops
Signed-off-by: Alex Nixon <alex.nixon@citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/smp.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index 3c877f74f279..dbf4249e2a6d 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -47,12 +47,16 @@ extern struct {
47struct smp_ops { 47struct smp_ops {
48 void (*smp_prepare_boot_cpu)(void); 48 void (*smp_prepare_boot_cpu)(void);
49 void (*smp_prepare_cpus)(unsigned max_cpus); 49 void (*smp_prepare_cpus)(unsigned max_cpus);
50 int (*cpu_up)(unsigned cpu);
51 void (*smp_cpus_done)(unsigned max_cpus); 50 void (*smp_cpus_done)(unsigned max_cpus);
52 51
53 void (*smp_send_stop)(void); 52 void (*smp_send_stop)(void);
54 void (*smp_send_reschedule)(int cpu); 53 void (*smp_send_reschedule)(int cpu);
55 54
55 int (*cpu_up)(unsigned cpu);
56 int (*cpu_disable)(void);
57 void (*cpu_die)(unsigned int cpu);
58 void (*play_dead)(void);
59
56 void (*send_call_func_ipi)(cpumask_t mask); 60 void (*send_call_func_ipi)(cpumask_t mask);
57 void (*send_call_func_single_ipi)(int cpu); 61 void (*send_call_func_single_ipi)(int cpu);
58}; 62};
@@ -91,6 +95,21 @@ static inline int __cpu_up(unsigned int cpu)
91 return smp_ops.cpu_up(cpu); 95 return smp_ops.cpu_up(cpu);
92} 96}
93 97
98static inline int __cpu_disable(void)
99{
100 return smp_ops.cpu_disable();
101}
102
103static inline void __cpu_die(unsigned int cpu)
104{
105 smp_ops.cpu_die(cpu);
106}
107
108static inline void play_dead(void)
109{
110 smp_ops.play_dead();
111}
112
94static inline void smp_send_reschedule(int cpu) 113static inline void smp_send_reschedule(int cpu)
95{ 114{
96 smp_ops.smp_send_reschedule(cpu); 115 smp_ops.smp_send_reschedule(cpu);
@@ -110,12 +129,13 @@ void native_smp_prepare_boot_cpu(void);
110void native_smp_prepare_cpus(unsigned int max_cpus); 129void native_smp_prepare_cpus(unsigned int max_cpus);
111void native_smp_cpus_done(unsigned int max_cpus); 130void native_smp_cpus_done(unsigned int max_cpus);
112int native_cpu_up(unsigned int cpunum); 131int native_cpu_up(unsigned int cpunum);
132int native_cpu_disable(void);
133void native_cpu_die(unsigned int cpu);
134void native_play_dead(void);
135
113void native_send_call_func_ipi(cpumask_t mask); 136void native_send_call_func_ipi(cpumask_t mask);
114void native_send_call_func_single_ipi(int cpu); 137void native_send_call_func_single_ipi(int cpu);
115 138
116extern int __cpu_disable(void);
117extern void __cpu_die(unsigned int cpu);
118
119void smp_store_cpu_info(int id); 139void smp_store_cpu_info(int id);
120#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) 140#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
121 141