WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] fix __virt_to_maddr()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] fix __virt_to_maddr()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Jan 2009 06:40:17 -0800
Delivery-date: Fri, 30 Jan 2009 06:40:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=