diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-22 01:59:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-22 04:43:44 -0400 |
commit | 59438c9fc4f7a92c808c9049bc6b396f98bf954c (patch) | |
tree | b86d6072612075bc256038a3430d86ab04778d51 /include/asm-x86/pgtable_64.h | |
parent | c2e3277f875b83e5adc34e96989d6d87ec5f80f7 (diff) |
x86: rename PTE_MASK to PTE_PFN_MASK
Rusty, in his peevish way, complained that macros defining constants
should have a name which somewhat accurately reflects the actual
purpose of the constant.
Aside from the fact that PTE_MASK gives no clue as to what's actually
being masked, and is misleadingly similar to the functionally entirely
different PMD_MASK, PUD_MASK and PGD_MASK, I don't really see what the
problem is.
But if this patch silences the incessent noise, then it will have
achieved its goal (TODO: write test-case).
Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/pgtable_64.h')
-rw-r--r-- | include/asm-x86/pgtable_64.h | 10 |
1 files changed, 5 insertions, 5 deletions
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)) |