From: Simon Horman <horms@verge.net.au>
Subject: [IA64] Kdump: pass control page to hypervisor
Date: Thu, 12 Jul 2007 15:45:24 +0900

On ia64 the control page needs to be passed down to the hypervisor
on kexec.

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6.18-xen.hg/arch/ia64/kernel/machine_kexec.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/kernel/machine_kexec.c	2007-07-09 15:21:11.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/kernel/machine_kexec.c	2007-07-09 15:28:53.000000000 +0900
@@ -18,6 +18,10 @@
 #include <asm/setup.h>
 #include <asm/delay.h>
 #include <asm/meminit.h>
+#ifdef CONFIG_XEN
+#include <xen/interface/kexec.h>
+#include <asm/kexec.h>
+#endif
 
 typedef void (*relocate_new_kernel_t)(unsigned long, unsigned long,
 		struct ia64_boot_param *, unsigned long);
@@ -80,6 +80,12 @@ void machine_shutdown(void)
 	}
 	kexec_disable_iosapic();
 }
+#else /* CONFIG_XEN */
+void machine_kexec_setup_load_arg(xen_kexec_image_t *xki,struct kimage *image)
+{
+	xki->reboot_code_buffer =
+		kexec_page_to_pfn(image->control_code_page) << PAGE_SHIFT;
+}
 #endif /* CONFIG_XEN */
 
 /*
Index: linux-2.6.18-xen.hg/include/xen/interface/kexec.h
===================================================================
--- linux-2.6.18-xen.hg.orig/include/xen/interface/kexec.h	2007-07-10 11:11:56.000000000 +0900
+++ linux-2.6.18-xen.hg/include/xen/interface/kexec.h	2007-07-10 11:12:07.000000000 +0900
@@ -79,6 +79,9 @@ typedef struct xen_kexec_image {
 #if defined(__i386__) || defined(__x86_64__)
     unsigned long page_list[KEXEC_XEN_NO_PAGES];
 #endif
+#if defined(__ia64__)
+    unsigned long reboot_code_buffer;
+#endif
     unsigned long indirection_page;
     unsigned long start_address;
 } xen_kexec_image_t;
