|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [IA64] fix __virt_to_maddr()
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1233281523 -32400
# Node ID 4edb72e1d0fed93ef48fc6da4cfe8418db8591d1
# Parent 78bea2f2b0e53e0ebd750b97ccfcdd4ea97f04fe
[IA64] fix __virt_to_maddr()
__virt_to_maddr() should be updated acording to xen relocation.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/include/asm-ia64/linux-xen/linux/efi.h | 3 +++
xen/include/asm-ia64/xenpage.h | 28 ++++++++++++++++------------
2 files changed, 19 insertions(+), 12 deletions(-)
diff -r 78bea2f2b0e5 -r 4edb72e1d0fe xen/include/asm-ia64/linux-xen/linux/efi.h
--- a/xen/include/asm-ia64/linux-xen/linux/efi.h Fri Jan 30 11:11:39
2009 +0900
+++ b/xen/include/asm-ia64/linux-xen/linux/efi.h Fri Jan 30 11:12:03
2009 +0900
@@ -23,6 +23,9 @@
#include <asm/page.h>
#include <asm/system.h>
+#ifdef XEN
+#include <asm/pgtable.h>
+#endif
#define EFI_SUCCESS 0
#define EFI_LOAD_ERROR ( 1 | (1UL << (BITS_PER_LONG-1)))
diff -r 78bea2f2b0e5 -r 4edb72e1d0fe xen/include/asm-ia64/xenpage.h
--- a/xen/include/asm-ia64/xenpage.h Fri Jan 30 11:11:39 2009 +0900
+++ b/xen/include/asm-ia64/xenpage.h Fri Jan 30 11:12:03 2009 +0900
@@ -17,18 +17,22 @@ extern int ia64_mfn_valid (unsigned long
#include <asm/xensystem.h>
-static inline unsigned long __virt_to_maddr(unsigned long va)
-{
- if (va - KERNEL_START < xenheap_size)
- return xen_pstart + (va - KERNEL_START);
- else
- /*
- * Because the significant 8 bits of VA are used by Xen,
- * and xen uses cached/uncached identity mapping.
- * IA64_MAX_PHYS_BITS can't be larger than 56
- */
- return (va & ((1UL << IA64_MAX_PHYS_BITS) - 1));
-}
+/*
+ * macro: avoid header inclustion hell
+ * static inline unsigned long __virt_to_maddr(unsigned long va)
+ */
+/*
+ * Because the significant 8 bits of VA are used by Xen,
+ * and xen uses cached/uncached identity mapping.
+ * IA64_MAX_PHYS_BITS can't be larger than 56
+ */
+#define __virt_to_maddr(va) \
+ ({ \
+ unsigned long __va__ = (va); \
+ (__va__ - KERNEL_START < KERNEL_TR_PAGE_SIZE) ? \
+ xen_pstart + (__va__ - KERNEL_START) : \
+ (__va__ & ((1UL << IA64_MAX_PHYS_BITS) - 1)); \
+ })
#define virt_to_maddr(va) (__virt_to_maddr((unsigned long)va))
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [IA64] fix __virt_to_maddr(),
Xen patchbot-unstable <=
|
|
|
|
|