diff options
author | Alex Nixon <alex.nixon@citrix.com> | 2008-08-22 06:52:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-25 04:59:18 -0400 |
commit | 93be71b672f167b1e8c23725114f86305354f0ac (patch) | |
tree | e443c353919877853fef4f26128b8747ef5a6908 /include | |
parent | e4f807c2b4d81636fc63993368646c5bfd42b22f (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.h | 28 |
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 { | |||
47 | struct smp_ops { | 47 | struct 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 | ||
98 | static inline int __cpu_disable(void) | ||
99 | { | ||
100 | return smp_ops.cpu_disable(); | ||
101 | } | ||
102 | |||
103 | static inline void __cpu_die(unsigned int cpu) | ||
104 | { | ||
105 | smp_ops.cpu_die(cpu); | ||
106 | } | ||
107 | |||
108 | static inline void play_dead(void) | ||
109 | { | ||
110 | smp_ops.play_dead(); | ||
111 | } | ||
112 | |||
94 | static inline void smp_send_reschedule(int cpu) | 113 | static 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); | |||
110 | void native_smp_prepare_cpus(unsigned int max_cpus); | 129 | void native_smp_prepare_cpus(unsigned int max_cpus); |
111 | void native_smp_cpus_done(unsigned int max_cpus); | 130 | void native_smp_cpus_done(unsigned int max_cpus); |
112 | int native_cpu_up(unsigned int cpunum); | 131 | int native_cpu_up(unsigned int cpunum); |
132 | int native_cpu_disable(void); | ||
133 | void native_cpu_die(unsigned int cpu); | ||
134 | void native_play_dead(void); | ||
135 | |||
113 | void native_send_call_func_ipi(cpumask_t mask); | 136 | void native_send_call_func_ipi(cpumask_t mask); |
114 | void native_send_call_func_single_ipi(int cpu); | 137 | void native_send_call_func_single_ipi(int cpu); |
115 | 138 | ||
116 | extern int __cpu_disable(void); | ||
117 | extern void __cpu_die(unsigned int cpu); | ||
118 | |||
119 | void smp_store_cpu_info(int id); | 139 | void 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 | ||