diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 18:06:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 04:57:59 -0400 |
commit | a9e7062d7339f1a1df2b6d7e5d595c7d55b56bfb (patch) | |
tree | 34243fea71942ac2622cbd550b3d985ae0c89bb6 /arch/x86/xen/smp.c | |
parent | ce87b3d326de733c72b47662f106ee6cd699a20f (diff) |
xen: move smp setup into smp.c
Move all the smp_ops setup into smp.c, allowing a lot of things to
become static.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 | } | ||