diff options
-rw-r--r-- | arch/i386/kernel/paravirt.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 7 | ||||
-rw-r--r-- | include/asm-i386/paravirt.h | 9 | ||||
-rw-r--r-- | include/asm-i386/smp.h | 5 |
4 files changed, 23 insertions, 0 deletions
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index 4dfdac4550dd..5bf81059a7e6 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c | |||
@@ -572,6 +572,8 @@ struct paravirt_ops paravirt_ops = { | |||
572 | 572 | ||
573 | .irq_enable_sysexit = native_irq_enable_sysexit, | 573 | .irq_enable_sysexit = native_irq_enable_sysexit, |
574 | .iret = native_iret, | 574 | .iret = native_iret, |
575 | |||
576 | .startup_ipi_hook = (void *)native_nop, | ||
575 | }; | 577 | }; |
576 | 578 | ||
577 | /* | 579 | /* |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 8c6c8c52b95c..1908afa265b9 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -835,6 +835,13 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | |||
835 | num_starts = 0; | 835 | num_starts = 0; |
836 | 836 | ||
837 | /* | 837 | /* |
838 | * Paravirt / VMI wants a startup IPI hook here to set up the | ||
839 | * target processor state. | ||
840 | */ | ||
841 | startup_ipi_hook(phys_apicid, (unsigned long) start_secondary, | ||
842 | (unsigned long) stack_start.esp); | ||
843 | |||
844 | /* | ||
838 | * Run STARTUP IPI loop. | 845 | * Run STARTUP IPI loop. |
839 | */ | 846 | */ |
840 | Dprintk("#startup loops: %d.\n", num_starts); | 847 | Dprintk("#startup loops: %d.\n", num_starts); |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 38e5164bd0e7..6ccf36499b2a 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -151,6 +151,8 @@ struct paravirt_ops | |||
151 | /* These two are jmp to, not actually called. */ | 151 | /* These two are jmp to, not actually called. */ |
152 | void (fastcall *irq_enable_sysexit)(void); | 152 | void (fastcall *irq_enable_sysexit)(void); |
153 | void (fastcall *iret)(void); | 153 | void (fastcall *iret)(void); |
154 | |||
155 | void (fastcall *startup_ipi_hook)(int phys_apicid, unsigned long start_eip, unsigned long start_esp); | ||
154 | }; | 156 | }; |
155 | 157 | ||
156 | /* Mark a paravirt probe function. */ | 158 | /* Mark a paravirt probe function. */ |
@@ -323,6 +325,13 @@ static inline unsigned long apic_read(unsigned long reg) | |||
323 | } | 325 | } |
324 | #endif | 326 | #endif |
325 | 327 | ||
328 | #ifdef CONFIG_SMP | ||
329 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | ||
330 | unsigned long start_esp) | ||
331 | { | ||
332 | return paravirt_ops.startup_ipi_hook(phys_apicid, start_eip, start_esp); | ||
333 | } | ||
334 | #endif | ||
326 | 335 | ||
327 | #define __flush_tlb() paravirt_ops.flush_tlb_user() | 336 | #define __flush_tlb() paravirt_ops.flush_tlb_user() |
328 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() | 337 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() |
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 64fe624c02ca..6bf0033a301c 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -52,6 +52,11 @@ extern void cpu_exit_clear(void); | |||
52 | extern void cpu_uninit(void); | 52 | extern void cpu_uninit(void); |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #ifndef CONFIG_PARAVIRT | ||
56 | #define startup_ipi_hook(phys_apicid, start_eip, start_esp) \ | ||
57 | do { } while (0) | ||
58 | #endif | ||
59 | |||
55 | /* | 60 | /* |
56 | * This function is needed by all SMP systems. It must _always_ be valid | 61 | * This function is needed by all SMP systems. It must _always_ be valid |
57 | * from the initial startup. We map APIC_BASE very early in page_setup(), | 62 | * from the initial startup. We map APIC_BASE very early in page_setup(), |