- patches.arch/x86_mce_intel_decode_physical_address.patch:
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / kernel / machine_kexec_32.c
index 53da615..ecac7ab 100644 (file)
 #include <asm/cacheflush.h>
 #include <asm/debugreg.h>
 
-#ifdef CONFIG_XEN
-#include <xen/interface/kexec.h>
-#endif
-
 static void machine_kexec_free_page_tables(struct kimage *image)
 {
        free_page((unsigned long)image->arch.pgd);
@@ -101,51 +97,6 @@ static void machine_kexec_prepare_page_tables(struct kimage *image)
                __pa(control_page), __pa(control_page));
 }
 
-#ifdef CONFIG_XEN
-
-#define __ma(x) (pfn_to_mfn(__pa((x)) >> PAGE_SHIFT) << PAGE_SHIFT)
-
-#if PAGES_NR > KEXEC_XEN_NO_PAGES
-#error PAGES_NR is greater than KEXEC_XEN_NO_PAGES - Xen support will break
-#endif
-
-#if PA_CONTROL_PAGE != 0
-#error PA_CONTROL_PAGE is non zero - Xen support will break
-#endif
-
-void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)
-{
-       void *control_page;
-
-       memset(xki->page_list, 0, sizeof(xki->page_list));
-
-       control_page = page_address(image->control_code_page);
-       memcpy(control_page, relocate_kernel, PAGE_SIZE);
-
-       xki->page_list[PA_CONTROL_PAGE] = __ma(control_page);
-       xki->page_list[PA_PGD] = __ma(image->arch.pgd);
-
-       if (image->type == KEXEC_TYPE_DEFAULT)
-               xki->page_list[PA_SWAP_PAGE] = page_to_phys(image->swap_page);
-}
-
-int __init machine_kexec_setup_resources(struct resource *hypervisor,
-                                        struct resource *phys_cpus,
-                                        int nr_phys_cpus)
-{
-       int k;
-
-       /* The per-cpu crash note resources belong to the hypervisor resource */
-       for (k = 0; k < nr_phys_cpus; k++)
-               request_resource(hypervisor, phys_cpus + k);
-
-       return 0;
-}
-
-void machine_kexec_register_resources(struct resource *res) { ; }
-
-#endif /* CONFIG_XEN */
-
 /*
  * A architecture hook called to validate the
  * proposed image and prepare the control pages
@@ -183,7 +134,6 @@ void machine_kexec_cleanup(struct kimage *image)
        machine_kexec_free_page_tables(image);
 }
 
-#ifndef CONFIG_XEN
 /*
  * Do not allocate memory (or fail in any way) in machine_kexec().
  * We are past the point of no return, committed to rebooting now.
@@ -249,7 +199,6 @@ void machine_kexec(struct kimage *image)
 
        __ftrace_enabled_restore(save_ftrace_enabled);
 }
-#endif
 
 void arch_crash_save_vmcoreinfo(void)
 {