diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:40:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:40:24 -0400 |
commit | 0988c37c248e824953d95a11412696c348dbca91 (patch) | |
tree | 0f11d926b2a655afed773f60bab7dac688ec5ca1 | |
parent | 6eaaaac97433575894570a990aa27310040a8177 (diff) | |
parent | d536b1f86591fb081c7a56eab04e711eb4dab951 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: fix crash due to missing debugctlmsr on AMD K6-3
x86: add PTE_FLAGS_MASK
x86: rename PTE_MASK to PTE_PFN_MASK
x86: fix pte_flags() to only return flags, fix lguest (updated)
x86: use setup_clear_cpu_cap with disable_apic, fix
x86: move the last Dprintk instance to pr_debug()
-rw-r--r-- | arch/x86/Kconfig.cpu | 2 | ||||
-rw-r--r-- | arch/x86/kernel/paravirt.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-es7000/es7000plat.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/dump_pagetables.c | 10 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 8 | ||||
-rw-r--r-- | include/asm-x86/page.h | 14 | ||||
-rw-r--r-- | include/asm-x86/paravirt.h | 3 | ||||
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 10 | ||||
-rw-r--r-- | include/asm-x86/xen/page.h | 2 |
14 files changed, 45 insertions, 34 deletions
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 54b8c02c71e6..2c518fbc52ec 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -414,4 +414,4 @@ config X86_MINIMUM_CPU_FAMILY | |||
414 | 414 | ||
415 | config X86_DEBUGCTLMSR | 415 | config X86_DEBUGCTLMSR |
416 | def_bool y | 416 | def_bool y |
417 | depends on !(M586MMX || M586TSC || M586 || M486 || M386) | 417 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) |
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 097d8a6797fa..94da4d52d798 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -443,7 +443,7 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
443 | #endif /* PAGETABLE_LEVELS >= 3 */ | 443 | #endif /* PAGETABLE_LEVELS >= 3 */ |
444 | 444 | ||
445 | .pte_val = native_pte_val, | 445 | .pte_val = native_pte_val, |
446 | .pte_flags = native_pte_val, | 446 | .pte_flags = native_pte_flags, |
447 | .pgd_val = native_pgd_val, | 447 | .pgd_val = native_pgd_val, |
448 | 448 | ||
449 | .make_pte = native_make_pte, | 449 | .make_pte = native_make_pte, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ec952aa5394a..b4aacb9f52e3 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -680,7 +680,7 @@ void __init setup_arch(char **cmdline_p) | |||
680 | #ifdef CONFIG_X86_LOCAL_APIC | 680 | #ifdef CONFIG_X86_LOCAL_APIC |
681 | disable_apic = 1; | 681 | disable_apic = 1; |
682 | #endif | 682 | #endif |
683 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 683 | setup_clear_cpu_cap(X86_FEATURE_APIC); |
684 | } | 684 | } |
685 | 685 | ||
686 | #ifdef CONFIG_PCI | 686 | #ifdef CONFIG_PCI |
diff --git a/arch/x86/mach-es7000/es7000plat.c b/arch/x86/mach-es7000/es7000plat.c index 4354ce804889..50189af14b85 100644 --- a/arch/x86/mach-es7000/es7000plat.c +++ b/arch/x86/mach-es7000/es7000plat.c | |||
@@ -130,10 +130,10 @@ parse_unisys_oem (char *oemptr) | |||
130 | mip_addr = val; | 130 | mip_addr = val; |
131 | mip = (struct mip_reg *)val; | 131 | mip = (struct mip_reg *)val; |
132 | mip_reg = __va(mip); | 132 | mip_reg = __va(mip); |
133 | Dprintk("es7000_mipcfg: host_reg = 0x%lx \n", | 133 | pr_debug("es7000_mipcfg: host_reg = 0x%lx \n", |
134 | (unsigned long)host_reg); | 134 | (unsigned long)host_reg); |
135 | Dprintk("es7000_mipcfg: mip_reg = 0x%lx \n", | 135 | pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n", |
136 | (unsigned long)mip_reg); | 136 | (unsigned long)mip_reg); |
137 | success++; | 137 | success++; |
138 | break; | 138 | break; |
139 | case MIP_PSAI_REG: | 139 | case MIP_PSAI_REG: |
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 0bb0caed8971..a20d1fa64b4e 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c | |||
@@ -148,8 +148,8 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
148 | * we have now. "break" is either changing perms, levels or | 148 | * we have now. "break" is either changing perms, levels or |
149 | * address space marker. | 149 | * address space marker. |
150 | */ | 150 | */ |
151 | prot = pgprot_val(new_prot) & ~(PTE_MASK); | 151 | prot = pgprot_val(new_prot) & ~(PTE_PFN_MASK); |
152 | cur = pgprot_val(st->current_prot) & ~(PTE_MASK); | 152 | cur = pgprot_val(st->current_prot) & ~(PTE_PFN_MASK); |
153 | 153 | ||
154 | if (!st->level) { | 154 | if (!st->level) { |
155 | /* First entry */ | 155 | /* First entry */ |
@@ -221,7 +221,7 @@ static void walk_pmd_level(struct seq_file *m, struct pg_state *st, pud_t addr, | |||
221 | for (i = 0; i < PTRS_PER_PMD; i++) { | 221 | for (i = 0; i < PTRS_PER_PMD; i++) { |
222 | st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); | 222 | st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); |
223 | if (!pmd_none(*start)) { | 223 | if (!pmd_none(*start)) { |
224 | pgprotval_t prot = pmd_val(*start) & ~PTE_MASK; | 224 | pgprotval_t prot = pmd_val(*start) & PTE_FLAGS_MASK; |
225 | 225 | ||
226 | if (pmd_large(*start) || !pmd_present(*start)) | 226 | if (pmd_large(*start) || !pmd_present(*start)) |
227 | note_page(m, st, __pgprot(prot), 3); | 227 | note_page(m, st, __pgprot(prot), 3); |
@@ -253,7 +253,7 @@ static void walk_pud_level(struct seq_file *m, struct pg_state *st, pgd_t addr, | |||
253 | for (i = 0; i < PTRS_PER_PUD; i++) { | 253 | for (i = 0; i < PTRS_PER_PUD; i++) { |
254 | st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); | 254 | st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); |
255 | if (!pud_none(*start)) { | 255 | if (!pud_none(*start)) { |
256 | pgprotval_t prot = pud_val(*start) & ~PTE_MASK; | 256 | pgprotval_t prot = pud_val(*start) & PTE_FLAGS_MASK; |
257 | 257 | ||
258 | if (pud_large(*start) || !pud_present(*start)) | 258 | if (pud_large(*start) || !pud_present(*start)) |
259 | note_page(m, st, __pgprot(prot), 2); | 259 | note_page(m, st, __pgprot(prot), 2); |
@@ -288,7 +288,7 @@ static void walk_pgd_level(struct seq_file *m) | |||
288 | for (i = 0; i < PTRS_PER_PGD; i++) { | 288 | for (i = 0; i < PTRS_PER_PGD; i++) { |
289 | st.current_address = normalize_addr(i * PGD_LEVEL_MULT); | 289 | st.current_address = normalize_addr(i * PGD_LEVEL_MULT); |
290 | if (!pgd_none(*start)) { | 290 | if (!pgd_none(*start)) { |
291 | pgprotval_t prot = pgd_val(*start) & ~PTE_MASK; | 291 | pgprotval_t prot = pgd_val(*start) & PTE_FLAGS_MASK; |
292 | 292 | ||
293 | if (pgd_large(*start) || !pgd_present(*start)) | 293 | if (pgd_large(*start) || !pgd_present(*start)) |
294 | note_page(m, &st, __pgprot(prot), 1); | 294 | note_page(m, &st, __pgprot(prot), 1); |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 194bbd6e3241..9ff6e3cbf08f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1435,7 +1435,7 @@ static unsigned long m2p(phys_addr_t maddr) | |||
1435 | { | 1435 | { |
1436 | phys_addr_t paddr; | 1436 | phys_addr_t paddr; |
1437 | 1437 | ||
1438 | maddr &= PTE_MASK; | 1438 | maddr &= PTE_PFN_MASK; |
1439 | paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT; | 1439 | paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT; |
1440 | 1440 | ||
1441 | return paddr; | 1441 | return paddr; |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index a44d56e38bd1..aa37469da696 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -343,8 +343,8 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, | |||
343 | static pteval_t pte_mfn_to_pfn(pteval_t val) | 343 | static pteval_t pte_mfn_to_pfn(pteval_t val) |
344 | { | 344 | { |
345 | if (val & _PAGE_PRESENT) { | 345 | if (val & _PAGE_PRESENT) { |
346 | unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT; | 346 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
347 | pteval_t flags = val & ~PTE_MASK; | 347 | pteval_t flags = val & PTE_FLAGS_MASK; |
348 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; | 348 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; |
349 | } | 349 | } |
350 | 350 | ||
@@ -354,8 +354,8 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) | |||
354 | static pteval_t pte_pfn_to_mfn(pteval_t val) | 354 | static pteval_t pte_pfn_to_mfn(pteval_t val) |
355 | { | 355 | { |
356 | if (val & _PAGE_PRESENT) { | 356 | if (val & _PAGE_PRESENT) { |
357 | unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT; | 357 | unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
358 | pteval_t flags = val & ~PTE_MASK; | 358 | pteval_t flags = val & PTE_FLAGS_MASK; |
359 | val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; | 359 | val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; |
360 | } | 360 | } |
361 | 361 | ||
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 28d7b4533b1a..6c846228948d 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -18,8 +18,11 @@ | |||
18 | (ie, 32-bit PAE). */ | 18 | (ie, 32-bit PAE). */ |
19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | 19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) |
20 | 20 | ||
21 | /* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | 21 | /* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ |
22 | #define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | 22 | #define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) |
23 | |||
24 | /* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */ | ||
25 | #define PTE_FLAGS_MASK (~PTE_PFN_MASK) | ||
23 | 26 | ||
24 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | 27 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) |
25 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | 28 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) |
@@ -144,6 +147,11 @@ static inline pteval_t native_pte_val(pte_t pte) | |||
144 | return pte.pte; | 147 | return pte.pte; |
145 | } | 148 | } |
146 | 149 | ||
150 | static inline pteval_t native_pte_flags(pte_t pte) | ||
151 | { | ||
152 | return native_pte_val(pte) & PTE_FLAGS_MASK; | ||
153 | } | ||
154 | |||
147 | #define pgprot_val(x) ((x).pgprot) | 155 | #define pgprot_val(x) ((x).pgprot) |
148 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 156 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
149 | 157 | ||
@@ -165,7 +173,7 @@ static inline pteval_t native_pte_val(pte_t pte) | |||
165 | #endif | 173 | #endif |
166 | 174 | ||
167 | #define pte_val(x) native_pte_val(x) | 175 | #define pte_val(x) native_pte_val(x) |
168 | #define pte_flags(x) native_pte_val(x) | 176 | #define pte_flags(x) native_pte_flags(x) |
169 | #define __pte(x) native_make_pte(x) | 177 | #define __pte(x) native_make_pte(x) |
170 | 178 | ||
171 | #endif /* CONFIG_PARAVIRT */ | 179 | #endif /* CONFIG_PARAVIRT */ |
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index aec9767836b6..fbbde93f12d6 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -1088,6 +1088,9 @@ static inline pteval_t pte_flags(pte_t pte) | |||
1088 | ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags, | 1088 | ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags, |
1089 | pte.pte); | 1089 | pte.pte); |
1090 | 1090 | ||
1091 | #ifdef CONFIG_PARAVIRT_DEBUG | ||
1092 | BUG_ON(ret & PTE_PFN_MASK); | ||
1093 | #endif | ||
1091 | return ret; | 1094 | return ret; |
1092 | } | 1095 | } |
1093 | 1096 | ||
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index c93dbb6c2624..105057f34032 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -25,7 +25,7 @@ static inline int pud_none(pud_t pud) | |||
25 | 25 | ||
26 | static inline int pud_bad(pud_t pud) | 26 | static inline int pud_bad(pud_t pud) |
27 | { | 27 | { |
28 | return (pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0; | 28 | return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0; |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline int pud_present(pud_t pud) | 31 | static inline int pud_present(pud_t pud) |
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) | |||
120 | write_cr3(pgd); | 120 | write_cr3(pgd); |
121 | } | 121 | } |
122 | 122 | ||
123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK)) | 123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK)) |
124 | 124 | ||
125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK)) | 125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK)) |
126 | 126 | ||
127 | 127 | ||
128 | /* Find an entry in the second-level page table.. */ | 128 | /* Find an entry in the second-level page table.. */ |
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) | |||
160 | 160 | ||
161 | static inline unsigned long pte_pfn(pte_t pte) | 161 | static inline unsigned long pte_pfn(pte_t pte) |
162 | { | 162 | { |
163 | return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT; | 163 | return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT; |
164 | } | 164 | } |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 96aa76e691d8..3e5dbc4195f4 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -53,7 +53,7 @@ | |||
53 | _PAGE_DIRTY) | 53 | _PAGE_DIRTY) |
54 | 54 | ||
55 | /* Set of bits not changed in pte_modify */ | 55 | /* Set of bits not changed in pte_modify */ |
56 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ | 56 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ |
57 | _PAGE_ACCESSED | _PAGE_DIRTY) | 57 | _PAGE_ACCESSED | _PAGE_DIRTY) |
58 | 58 | ||
59 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | 59 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) |
@@ -286,7 +286,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | |||
286 | return __pgprot(preservebits | addbits); | 286 | return __pgprot(preservebits | addbits); |
287 | } | 287 | } |
288 | 288 | ||
289 | #define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK) | 289 | #define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) |
290 | 290 | ||
291 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 291 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) |
292 | 292 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 0611abf96a5e..5c3b26567a95 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,7 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 91 | #define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
92 | 92 | ||
93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
94 | 94 | ||
@@ -139,7 +139,7 @@ static inline int pud_large(pud_t pud) { return 0; } | |||
139 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 139 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
140 | 140 | ||
141 | #define pmd_page_vaddr(pmd) \ | 141 | #define pmd_page_vaddr(pmd) \ |
142 | ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK)) | 142 | ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK)) |
143 | 143 | ||
144 | #if defined(CONFIG_HIGHPTE) | 144 | #if defined(CONFIG_HIGHPTE) |
145 | #define pte_offset_map(dir, address) \ | 145 | #define pte_offset_map(dir, address) \ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 805d3128bfc4..ac5fff4cc58a 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -158,17 +158,17 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
158 | 158 | ||
159 | static inline int pgd_bad(pgd_t pgd) | 159 | static inline int pgd_bad(pgd_t pgd) |
160 | { | 160 | { |
161 | return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 161 | return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline int pud_bad(pud_t pud) | 164 | static inline int pud_bad(pud_t pud) |
165 | { | 165 | { |
166 | return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 166 | return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline int pmd_bad(pmd_t pmd) | 169 | static inline int pmd_bad(pmd_t pmd) |
170 | { | 170 | { |
171 | return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; | 171 | return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
172 | } | 172 | } |
173 | 173 | ||
174 | #define pte_none(x) (!pte_val((x))) | 174 | #define pte_none(x) (!pte_val((x))) |
@@ -193,7 +193,7 @@ static inline int pmd_bad(pmd_t pmd) | |||
193 | * Level 4 access. | 193 | * Level 4 access. |
194 | */ | 194 | */ |
195 | #define pgd_page_vaddr(pgd) \ | 195 | #define pgd_page_vaddr(pgd) \ |
196 | ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_MASK)) | 196 | ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK)) |
197 | #define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT)) | 197 | #define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT)) |
198 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) | 198 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) |
199 | static inline int pgd_large(pgd_t pgd) { return 0; } | 199 | static inline int pgd_large(pgd_t pgd) { return 0; } |
@@ -216,7 +216,7 @@ static inline int pud_large(pud_t pte) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | /* PMD - Level 2 access */ | 218 | /* PMD - Level 2 access */ |
219 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_MASK)) | 219 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK)) |
220 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 220 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
221 | 221 | ||
222 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) | 222 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 05e678a86628..7b3835d3b77d 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -124,7 +124,7 @@ static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | |||
124 | 124 | ||
125 | static inline unsigned long pte_mfn(pte_t pte) | 125 | static inline unsigned long pte_mfn(pte_t pte) |
126 | { | 126 | { |
127 | return (pte.pte & PTE_MASK) >> PAGE_SHIFT; | 127 | return (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT; |
128 | } | 128 | } |
129 | 129 | ||
130 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | 130 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) |