diff options
Diffstat (limited to 'arch/x86/xen/smp.c')
-rw-r--r-- | arch/x86/xen/smp.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 233156f39b7f..91fae8ff756e 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -152,7 +152,7 @@ void __init xen_fill_possible_map(void) | |||
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
155 | void __init xen_smp_prepare_boot_cpu(void) | 155 | static void __init xen_smp_prepare_boot_cpu(void) |
156 | { | 156 | { |
157 | int cpu; | 157 | int cpu; |
158 | 158 | ||
@@ -176,7 +176,7 @@ void __init xen_smp_prepare_boot_cpu(void) | |||
176 | xen_setup_vcpu_info_placement(); | 176 | xen_setup_vcpu_info_placement(); |
177 | } | 177 | } |
178 | 178 | ||
179 | void __init xen_smp_prepare_cpus(unsigned int max_cpus) | 179 | static void __init xen_smp_prepare_cpus(unsigned int max_cpus) |
180 | { | 180 | { |
181 | unsigned cpu; | 181 | unsigned cpu; |
182 | 182 | ||
@@ -276,7 +276,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
278 | 278 | ||
279 | int __cpuinit xen_cpu_up(unsigned int cpu) | 279 | static int __cpuinit xen_cpu_up(unsigned int cpu) |
280 | { | 280 | { |
281 | struct task_struct *idle = idle_task(cpu); | 281 | struct task_struct *idle = idle_task(cpu); |
282 | int rc; | 282 | int rc; |
@@ -319,7 +319,7 @@ int __cpuinit xen_cpu_up(unsigned int cpu) | |||
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
321 | 321 | ||
322 | void xen_smp_cpus_done(unsigned int max_cpus) | 322 | static void xen_smp_cpus_done(unsigned int max_cpus) |
323 | { | 323 | { |
324 | } | 324 | } |
325 | 325 | ||
@@ -335,12 +335,12 @@ static void stop_self(void *v) | |||
335 | BUG(); | 335 | BUG(); |
336 | } | 336 | } |
337 | 337 | ||
338 | void xen_smp_send_stop(void) | 338 | static void xen_smp_send_stop(void) |
339 | { | 339 | { |
340 | smp_call_function(stop_self, NULL, 0); | 340 | smp_call_function(stop_self, NULL, 0); |
341 | } | 341 | } |
342 | 342 | ||
343 | void xen_smp_send_reschedule(int cpu) | 343 | static void xen_smp_send_reschedule(int cpu) |
344 | { | 344 | { |
345 | xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR); | 345 | xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR); |
346 | } | 346 | } |
@@ -355,7 +355,7 @@ static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector) | |||
355 | xen_send_IPI_one(cpu, vector); | 355 | xen_send_IPI_one(cpu, vector); |
356 | } | 356 | } |
357 | 357 | ||
358 | void xen_smp_send_call_function_ipi(cpumask_t mask) | 358 | static void xen_smp_send_call_function_ipi(cpumask_t mask) |
359 | { | 359 | { |
360 | int cpu; | 360 | int cpu; |
361 | 361 | ||
@@ -370,7 +370,7 @@ void xen_smp_send_call_function_ipi(cpumask_t mask) | |||
370 | } | 370 | } |
371 | } | 371 | } |
372 | 372 | ||
373 | void xen_smp_send_call_function_single_ipi(int cpu) | 373 | static void xen_smp_send_call_function_single_ipi(int cpu) |
374 | { | 374 | { |
375 | xen_send_IPI_mask(cpumask_of_cpu(cpu), XEN_CALL_FUNCTION_SINGLE_VECTOR); | 375 | xen_send_IPI_mask(cpumask_of_cpu(cpu), XEN_CALL_FUNCTION_SINGLE_VECTOR); |
376 | } | 376 | } |
@@ -394,3 +394,21 @@ static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id) | |||
394 | 394 | ||
395 | return IRQ_HANDLED; | 395 | return IRQ_HANDLED; |
396 | } | 396 | } |
397 | |||
398 | static const struct smp_ops xen_smp_ops __initdata = { | ||
399 | .smp_prepare_boot_cpu = xen_smp_prepare_boot_cpu, | ||
400 | .smp_prepare_cpus = xen_smp_prepare_cpus, | ||
401 | .cpu_up = xen_cpu_up, | ||
402 | .smp_cpus_done = xen_smp_cpus_done, | ||
403 | |||
404 | .smp_send_stop = xen_smp_send_stop, | ||
405 | .smp_send_reschedule = xen_smp_send_reschedule, | ||
406 | |||
407 | .send_call_func_ipi = xen_smp_send_call_function_ipi, | ||
408 | .send_call_func_single_ipi = xen_smp_send_call_function_single_ipi, | ||
409 | }; | ||
410 | |||
411 | void __init xen_smp_init(void) | ||
412 | { | ||
413 | smp_ops = xen_smp_ops; | ||
414 | } | ||