Merge branch 'stable/autoballoon.v5.2' into stable/for-linus-3.5
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / xen / enlighten.c
index ac90e5629508bd2b1d5999d65d7effa78dd43ee4..d1f9a0472d44cb088a9aab1011e6cf08010aa4b9 100644 (file)
@@ -42,6 +42,7 @@
 #include <xen/page.h>
 #include <xen/hvm.h>
 #include <xen/hvc-console.h>
+#include <xen/acpi.h>
 
 #include <asm/paravirt.h>
 #include <asm/apic.h>
@@ -74,6 +75,7 @@
 
 #include "xen-ops.h"
 #include "mmu.h"
+#include "smp.h"
 #include "multicalls.h"
 
 EXPORT_SYMBOL_GPL(hypercall_page);
@@ -849,6 +851,14 @@ static void set_xen_basic_apic_ops(void)
        apic->icr_write = xen_apic_icr_write;
        apic->wait_icr_idle = xen_apic_wait_icr_idle;
        apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle;
+
+#ifdef CONFIG_SMP
+       apic->send_IPI_allbutself = xen_send_IPI_allbutself;
+       apic->send_IPI_mask_allbutself = xen_send_IPI_mask_allbutself;
+       apic->send_IPI_mask = xen_send_IPI_mask;
+       apic->send_IPI_all = xen_send_IPI_all;
+       apic->send_IPI_self = xen_send_IPI_self;
+#endif
 }
 
 #endif
@@ -967,7 +977,7 @@ void xen_setup_shared_info(void)
        xen_setup_mfn_list_list();
 }
 
-/* This is called once we have the cpu_possible_map */
+/* This is called once we have the cpu_possible_mask */
 void xen_setup_vcpu_info_placement(void)
 {
        int cpu;
@@ -1232,7 +1242,9 @@ asmlinkage void __init xen_start_kernel(void)
 
        /* Prevent unwanted bits from being set in PTEs. */
        __supported_pte_mask &= ~_PAGE_GLOBAL;
+#if 0
        if (!xen_initial_domain())
+#endif
                __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
 
        __supported_pte_mask |= _PAGE_IOMAP;
@@ -1295,10 +1307,6 @@ asmlinkage void __init xen_start_kernel(void)
 
        pgd = (pgd_t *)xen_start_info->pt_base;
 
-       if (!xen_initial_domain())
-               __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
-
-       __supported_pte_mask |= _PAGE_IOMAP;
        /* Don't do the full vcpu_info placement stuff until we have a
           possible map and a non-dummy shared_info. */
        per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
@@ -1365,6 +1373,8 @@ asmlinkage void __init xen_start_kernel(void)
 
                /* Make sure ACS will be enabled */
                pci_request_acs();
+
+               xen_acpi_sleep_register();
        }