]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
[IA64] Kexec: machine addresss macros
authorAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 20:34:42 +0000 (14:34 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 27 Sep 2007 20:34:42 +0000 (14:34 -0600)
Define IA64-specific macros for kexec to find the machine address
of a virtual address etc... This abstraction was hammered out
during the merge of the x86 code.

Signed-off-by: Simon Horman <horms@verge.net.au>
include/asm-ia64/kexec.h

index 01c36b0047474c7272a863a5610ad443078c8a20..ff32ca6928a7599d448222284e2709832eda3c78 100644 (file)
@@ -44,4 +44,15 @@ extern int kdump_status[];
 extern atomic_t kdump_cpu_freezed;
 extern atomic_t kdump_in_progress;
 
+/* Kexec needs to know about the actual physical addresss.
+ * But in xen, on some architectures, a physical address is a
+ * pseudo-physical addresss. */
+#ifdef CONFIG_XEN
+#define KEXEC_ARCH_HAS_PAGE_MACROS
+#define kexec_page_to_pfn(page)  pfn_to_mfn_for_dma(page_to_pfn(page))
+#define kexec_pfn_to_page(pfn)   pfn_to_page(mfn_to_pfn_for_dma(pfn))
+#define kexec_virt_to_phys(addr) phys_to_machine_for_dma(__pa(addr))
+#define kexec_phys_to_virt(addr) phys_to_virt(machine_to_phys_for_dma(addr))
+#endif
+
 #endif /* _ASM_IA64_KEXEC_H */