aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h')
-rw-r--r--linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
index 99e149786c..5b86bd7978 100644
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
@@ -275,11 +275,12 @@ static inline unsigned long pud_bad(pud_t pud)
* require. In all the cases we care about, the high bit gets shifted out
* (e.g., phys_to_machine()) so behaviour there is correct.
*/
-#define INVALID_P2M_ENTRY (~0UL)
+#define INVALID_P2M_ENTRY (~0U)
#define FOREIGN_FRAME(_m) ((_m) | (1UL<<((sizeof(unsigned long)*8)-1)))
+#define pte_mfn(_pte) (((_pte).pte & PTE_MASK) >> PAGE_SHIFT)
#define pte_pfn(_pte) \
({ \
- unsigned long mfn = (_pte).pte >> PAGE_SHIFT; \
+ unsigned long mfn = pte_mfn(_pte); \
unsigned pfn = mfn_to_pfn(mfn); \
if ((pfn >= max_mapnr) || (pfn_to_mfn(pfn) != mfn)) \
pfn = max_mapnr; /* special: force !pfn_valid() */ \