]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "x86/paravirt: Remove unused pv_apic_ops structure"
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 11 May 2016 18:25:46 +0000 (14:25 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 11 May 2016 18:27:06 +0000 (14:27 -0400)
This reverts commit a3c33f534a6dde2a88cb34e95a94fd2d803cb390.

As it breaks the kABI pv_mmu_ops.

We don't this patch so lets revert.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/include/asm/smp.h
arch/x86/kernel/paravirt.c
arch/x86/kernel/smpboot.c
arch/x86/xen/enlighten.c

index 794525ffde76f815524d188c53d393b1eda28547..a373c59415074de949b6875ffccbeb78d31052e5 100644 (file)
@@ -321,6 +321,15 @@ static inline void slow_down_io(void)
 #endif
 }
 
+#ifdef CONFIG_SMP
+static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
+                                   unsigned long start_esp)
+{
+       PVOP_VCALL3(pv_apic_ops.startup_ipi_hook,
+                   phys_apicid, start_eip, start_esp);
+}
+#endif
+
 static inline void paravirt_activate_mm(struct mm_struct *prev,
                                        struct mm_struct *next)
 {
index 67831a8130eb8eca8e807ca80c8f4e2e56f0de9a..16242da8c27bfb0d0a75ebbb23aec4efe8bb9001 100644 (file)
@@ -222,6 +222,14 @@ struct pv_irq_ops {
 #endif
 };
 
+struct pv_apic_ops {
+#ifdef CONFIG_X86_LOCAL_APIC
+       void (*startup_ipi_hook)(int phys_apicid,
+                                unsigned long start_eip,
+                                unsigned long start_esp);
+#endif
+};
+
 struct pv_mmu_ops {
        unsigned long (*read_cr2)(void);
        void (*write_cr2)(unsigned long);
@@ -337,6 +345,7 @@ struct paravirt_patch_template {
        struct pv_time_ops pv_time_ops;
        struct pv_cpu_ops pv_cpu_ops;
        struct pv_irq_ops pv_irq_ops;
+       struct pv_apic_ops pv_apic_ops;
        struct pv_mmu_ops pv_mmu_ops;
        struct pv_lock_ops pv_lock_ops;
 };
@@ -346,6 +355,7 @@ extern struct pv_init_ops pv_init_ops;
 extern struct pv_time_ops pv_time_ops;
 extern struct pv_cpu_ops pv_cpu_ops;
 extern struct pv_irq_ops pv_irq_ops;
+extern struct pv_apic_ops pv_apic_ops;
 extern struct pv_mmu_ops pv_mmu_ops;
 extern struct pv_lock_ops pv_lock_ops;
 
index 05fb7239576e8ad5e6fbedff5c740fee94eafe25..17a8dced12daef5c9fcc5351c165994225295372 100644 (file)
@@ -84,6 +84,9 @@ struct smp_ops {
 extern void set_cpu_sibling_map(int cpu);
 
 #ifdef CONFIG_SMP
+#ifndef CONFIG_PARAVIRT
+#define startup_ipi_hook(phys_apicid, start_eip, start_esp) do { } while (0)
+#endif
 extern struct smp_ops smp_ops;
 
 static inline void smp_send_stop(void)
index c7151b2a550ba0f047c5a50d20bcb760d49e28f0..5451b5220ed8de9ccf63a5f7b4b2d3ba053b5707 100644 (file)
@@ -125,6 +125,7 @@ static void *get_call_destination(u8 type)
                .pv_time_ops = pv_time_ops,
                .pv_cpu_ops = pv_cpu_ops,
                .pv_irq_ops = pv_irq_ops,
+               .pv_apic_ops = pv_apic_ops,
                .pv_mmu_ops = pv_mmu_ops,
 #ifdef CONFIG_PARAVIRT_SPINLOCKS
                .pv_lock_ops = pv_lock_ops,
@@ -394,6 +395,12 @@ NOKPROBE_SYMBOL(native_get_debugreg);
 NOKPROBE_SYMBOL(native_set_debugreg);
 NOKPROBE_SYMBOL(native_load_idt);
 
+struct pv_apic_ops pv_apic_ops = {
+#ifdef CONFIG_X86_LOCAL_APIC
+       .startup_ipi_hook = paravirt_nop,
+#endif
+};
+
 #if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
 /* 32-bit pagetable entries */
 #define PTE_IDENT      __PV_IS_CALLEE_SAVE(_paravirt_ident_32)
@@ -474,5 +481,6 @@ struct pv_mmu_ops pv_mmu_ops = {
 EXPORT_SYMBOL_GPL(pv_time_ops);
 EXPORT_SYMBOL    (pv_cpu_ops);
 EXPORT_SYMBOL    (pv_mmu_ops);
+EXPORT_SYMBOL_GPL(pv_apic_ops);
 EXPORT_SYMBOL_GPL(pv_info);
 EXPORT_SYMBOL    (pv_irq_ops);
index e7db7ebf5a69643996e858d8f600f073e6e03599..50e547eac8cd4b64e9e6892410366ec3a64a7a13 100644 (file)
@@ -608,6 +608,13 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
        else
                num_starts = 0;
 
+       /*
+        * Paravirt / VMI wants a startup IPI hook here to set up the
+        * target processor state.
+        */
+       startup_ipi_hook(phys_apicid, (unsigned long) start_secondary,
+                        stack_start);
+
        /*
         * Run STARTUP IPI loop.
         */
index 8d50c7b25734adfdf4140d109dadc1b8a580d52e..eb5b8b831d6278d000d3110d1f76d0139b0f1850 100644 (file)
@@ -1238,6 +1238,12 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = {
        .end_context_switch = xen_end_context_switch,
 };
 
+static const struct pv_apic_ops xen_apic_ops __initconst = {
+#ifdef CONFIG_X86_LOCAL_APIC
+       .startup_ipi_hook = paravirt_nop,
+#endif
+};
+
 static void xen_reboot(int reason)
 {
        struct sched_shutdown r = { .reason = reason };
@@ -1504,6 +1510,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
        if (xen_initial_domain())
                pv_info.features |= PV_SUPPORTED_RTC;
        pv_init_ops = xen_init_ops;
+       pv_apic_ops = xen_apic_ops;
        if (!xen_pvh_domain()) {
                pv_cpu_ops = xen_cpu_ops;