aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/smp.c')
-rw-r--r--arch/i386/kernel/smp.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index b90bebeb1c79..fe38b49a1223 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -483,7 +483,7 @@ void flush_tlb_all(void)
483 * it goes straight through and wastes no time serializing 483 * it goes straight through and wastes no time serializing
484 * anything. Worst case is that we lose a reschedule ... 484 * anything. Worst case is that we lose a reschedule ...
485 */ 485 */
486void smp_send_reschedule(int cpu) 486void native_smp_send_reschedule(int cpu)
487{ 487{
488 WARN_ON(cpu_is_offline(cpu)); 488 WARN_ON(cpu_is_offline(cpu));
489 send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); 489 send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR);
@@ -560,9 +560,9 @@ static void __smp_call_function(void (*func) (void *info), void *info,
560 * You must not call this function with disabled interrupts or from a 560 * You must not call this function with disabled interrupts or from a
561 * hardware interrupt handler or from a bottom half handler. 561 * hardware interrupt handler or from a bottom half handler.
562 */ 562 */
563int smp_call_function_mask(cpumask_t mask, 563int native_smp_call_function_mask(cpumask_t mask,
564 void (*func)(void *), void *info, 564 void (*func)(void *), void *info,
565 int wait) 565 int wait)
566{ 566{
567 struct call_data_struct data; 567 struct call_data_struct data;
568 cpumask_t allbutself; 568 cpumask_t allbutself;
@@ -681,7 +681,7 @@ static void stop_this_cpu (void * dummy)
681 * this function calls the 'stop' function on all other CPUs in the system. 681 * this function calls the 'stop' function on all other CPUs in the system.
682 */ 682 */
683 683
684void smp_send_stop(void) 684void native_smp_send_stop(void)
685{ 685{
686 /* Don't deadlock on the call lock in panic */ 686 /* Don't deadlock on the call lock in panic */
687 int nolock = !spin_trylock(&call_lock); 687 int nolock = !spin_trylock(&call_lock);
@@ -757,3 +757,14 @@ int safe_smp_processor_id(void)
757 757
758 return cpuid >= 0 ? cpuid : 0; 758 return cpuid >= 0 ? cpuid : 0;
759} 759}
760
761struct smp_ops smp_ops = {
762 .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu,
763 .smp_prepare_cpus = native_smp_prepare_cpus,
764 .cpu_up = native_cpu_up,
765 .smp_cpus_done = native_smp_cpus_done,
766
767 .smp_send_stop = native_smp_send_stop,
768 .smp_send_reschedule = native_smp_send_reschedule,
769 .smp_call_function_mask = native_smp_call_function_mask,
770};