| Subject | [PATCH 36 of 36] x86: make the X_bad functions consistent | Date | Thu, 05 Feb 2009 11:31:18 -0800 | From | Jeremy Fitzhardinge <> |
| |
Impact: cleanup
Use the same logic to implement all 3 _bad() functions.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> --- arch/x86/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -554,7 +554,7 @@ static inline int pmd_bad(pmd_t pmd) { - return (pmd_flags(pmd) & ~_PAGE_USER) != _KERNPG_TABLE; + return (pmd_flags(pmd) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; } static inline unsigned long pages_to_mb(unsigned long npg) @@ -638,7 +638,7 @@ static inline int pgd_bad(pgd_t pgd) { - return (pgd_flags(pgd) & ~_PAGE_USER) != _KERNPG_TABLE; + return (pgd_flags(pgd) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; } static inline int pgd_none(pgd_t pgd)
|