]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: redo cded932b75ab0a5f9181e
authorIngo Molnar <mingo@elte.hu>
Mon, 3 Mar 2008 12:55:32 +0000 (13:55 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:52 +0000 (17:40 +0200)
redo commit cded932b75ab0a5f9181e.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/pgtable_32.h
include/asm-x86/pgtable_64.h

index 4e6a0fca0b47c1fc1941ef368618c3ef691ddfcb..997c36c6b4d73dabdc74df1cd077370cd1d552e6 100644 (file)
@@ -90,7 +90,9 @@ extern unsigned long pg0[];
 /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
 #define pmd_none(x)    (!(unsigned long)pmd_val(x))
 #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
-#define        pmd_bad(x)      ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
+#define        pmd_bad(x)      ((pmd_val(x) \
+                         & ~(PAGE_MASK | _PAGE_USER | _PAGE_PSE | _PAGE_NX)) \
+                        != _KERNPG_TABLE)
 
 
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
index 6ef09914acbed8e218d5a1b9af68e9015c9fa798..0a5081c98ae101550c7a166b2a9bc7b7e72bfe56 100644 (file)
@@ -153,12 +153,14 @@ static inline unsigned long pgd_bad(pgd_t pgd)
 
 static inline unsigned long pud_bad(pud_t pud)
 {
-       return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
+       return pud_val(pud) &
+               ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
 }
 
 static inline unsigned long pmd_bad(pmd_t pmd)
 {
-       return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER);
+       return pmd_val(pmd) &
+               ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX);
 }
 
 #define pte_none(x)    (!pte_val(x))