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>
This commit is contained in:
committed by
Ingo Molnar
parent
c2e3277f87
commit
59438c9fc4
@@ -25,7 +25,7 @@ static inline int pud_none(pud_t pud)
|
||||
|
||||
static inline int pud_bad(pud_t pud)
|
||||
{
|
||||
return (pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
|
||||
return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
|
||||
}
|
||||
|
||||
static inline int pud_present(pud_t pud)
|
||||
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp)
|
||||
write_cr3(pgd);
|
||||
}
|
||||
|
||||
#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK))
|
||||
#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
|
||||
|
||||
#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK))
|
||||
#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
|
||||
|
||||
|
||||
/* Find an entry in the second-level page table.. */
|
||||
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte)
|
||||
|
||||
static inline unsigned long pte_pfn(pte_t pte)
|
||||
{
|
||||
return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT;
|
||||
return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user