Fix put_pte_flags() for Xen PAE.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 20 Aug 2005 11:14:28 +0000 (11:14 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 20 Aug 2005 11:14:28 +0000 (11:14 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/include/asm-x86/page.h
xen/include/asm-x86/x86_32/page-3level.h

index 71edad153029a55e96bc5f8ea433db2829782813..c242722888523b3b78abec540a7d1cd0c5c5a1d5 100644 (file)
@@ -6,11 +6,7 @@
  * It is important that the masks are signed quantities. This ensures that
  * the compiler sign-extends a 32-bit mask to 64 bits if that is required.
  */
-#ifndef __ASSEMBLY__
-#define PAGE_SIZE           (1L << PAGE_SHIFT)
-#else
 #define PAGE_SIZE           (1 << PAGE_SHIFT)
-#endif
 #define PAGE_MASK           (~(PAGE_SIZE-1))
 #define PAGE_FLAG_MASK      (~0)
 
index 79b14169e947a7a15a2f1777b5ff8ddea66d3102..46234c43d947b7412eaf45966bb90f032b8f98f1 100644 (file)
@@ -63,7 +63,7 @@ typedef l3_pgentry_t root_pgentry_t;
 
 /* Extract flags into 32-bit integer, or turn 32-bit flags into a pte mask. */
 #define get_pte_flags(x) (((int)((x) >> 32) & ~0xFFF) | ((int)(x) & 0xFFF))
-#define put_pte_flags(x) (((intpte_t)((x) & ~0xFFF) << 40) | ((x) & 0xFFF))
+#define put_pte_flags(x) (((intpte_t)((x) & ~0xFFF) << 32) | ((x) & 0xFFF))
 
 #define L1_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* PAT/GLOBAL */
 #define L2_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) /* PSE/GLOBAL */