aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/process_32.c4
-rw-r--r--arch/x86/kernel/process_64.c4
-rw-r--r--arch/x86/kernel/smp.c6
-rw-r--r--arch/x86/kernel/smpboot.c8
-rw-r--r--include/asm-x86/smp.h28
5 files changed, 37 insertions, 13 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 3b7a1ddcc0bc..e382fe0ccd66 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -91,7 +91,7 @@ static void cpu_exit_clear(void)
91} 91}
92 92
93/* We don't actually take CPU down, just spin without interrupts. */ 93/* We don't actually take CPU down, just spin without interrupts. */
94static inline void play_dead(void) 94void native_play_dead(void)
95{ 95{
96 /* This must be done before dead CPU ack */ 96 /* This must be done before dead CPU ack */
97 cpu_exit_clear(); 97 cpu_exit_clear();
@@ -107,7 +107,7 @@ static inline void play_dead(void)
107 wbinvd_halt(); 107 wbinvd_halt();
108} 108}
109#else 109#else
110static inline void play_dead(void) 110void native_play_dead(void)
111{ 111{
112 BUG(); 112 BUG();
113} 113}
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 71553b664e2a..dfd3f5752085 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -90,7 +90,7 @@ DECLARE_PER_CPU(int, cpu_state);
90 90
91#include <asm/nmi.h> 91#include <asm/nmi.h>
92/* We halt the CPU with physical CPU hotplug */ 92/* We halt the CPU with physical CPU hotplug */
93static inline void play_dead(void) 93void native_play_dead(void)
94{ 94{
95 idle_task_exit(); 95 idle_task_exit();
96 mb(); 96 mb();
@@ -102,7 +102,7 @@ static inline void play_dead(void)
102 wbinvd_halt(); 102 wbinvd_halt();
103} 103}
104#else 104#else
105static inline void play_dead(void) 105void native_play_dead(void)
106{ 106{
107 BUG(); 107 BUG();
108} 108}
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 361b7a4c640c..18f9b19f5f8f 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -214,12 +214,16 @@ void smp_call_function_single_interrupt(struct pt_regs *regs)
214struct smp_ops smp_ops = { 214struct smp_ops smp_ops = {
215 .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, 215 .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu,
216 .smp_prepare_cpus = native_smp_prepare_cpus, 216 .smp_prepare_cpus = native_smp_prepare_cpus,
217 .cpu_up = native_cpu_up,
218 .smp_cpus_done = native_smp_cpus_done, 217 .smp_cpus_done = native_smp_cpus_done,
219 218
220 .smp_send_stop = native_smp_send_stop, 219 .smp_send_stop = native_smp_send_stop,
221 .smp_send_reschedule = native_smp_send_reschedule, 220 .smp_send_reschedule = native_smp_send_reschedule,
222 221
222 .cpu_up = native_cpu_up,
223 .cpu_die = native_cpu_die,
224 .cpu_disable = native_cpu_disable,
225 .play_dead = native_play_dead,
226
223 .send_call_func_ipi = native_send_call_func_ipi, 227 .send_call_func_ipi = native_send_call_func_ipi,
224 .send_call_func_single_ipi = native_send_call_func_single_ipi, 228 .send_call_func_single_ipi = native_send_call_func_single_ipi,
225}; 229};
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 7985c5b3f916..c414cee296ba 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1346,7 +1346,7 @@ static void __ref remove_cpu_from_maps(int cpu)
1346 numa_remove_cpu(cpu); 1346 numa_remove_cpu(cpu);
1347} 1347}
1348 1348
1349int __cpu_disable(void) 1349int native_cpu_disable(void)
1350{ 1350{
1351 int cpu = smp_processor_id(); 1351 int cpu = smp_processor_id();
1352 1352
@@ -1385,7 +1385,7 @@ int __cpu_disable(void)
1385 return 0; 1385 return 0;
1386} 1386}
1387 1387
1388void __cpu_die(unsigned int cpu) 1388void native_cpu_die(unsigned int cpu)
1389{ 1389{
1390 /* We don't do anything here: idle task is faking death itself. */ 1390 /* We don't do anything here: idle task is faking death itself. */
1391 unsigned int i; 1391 unsigned int i;
@@ -1403,12 +1403,12 @@ void __cpu_die(unsigned int cpu)
1403 printk(KERN_ERR "CPU %u didn't die...\n", cpu); 1403 printk(KERN_ERR "CPU %u didn't die...\n", cpu);
1404} 1404}
1405#else /* ... !CONFIG_HOTPLUG_CPU */ 1405#else /* ... !CONFIG_HOTPLUG_CPU */
1406int __cpu_disable(void) 1406int native_cpu_disable(void)
1407{ 1407{
1408 return -ENOSYS; 1408 return -ENOSYS;
1409} 1409}
1410 1410
1411void __cpu_die(unsigned int cpu) 1411void native_cpu_die(unsigned int cpu)
1412{ 1412{
1413 /* We said "no" in __cpu_disable */ 1413 /* We said "no" in __cpu_disable */
1414 BUG(); 1414 BUG();
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