diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 22:30:51 +0300 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 23:31:48 +0300 |
commit | 4fea801ac95d6534a93aa01d3ac62be163d845af (patch) | |
tree | a5a285d5fd1c07c8d24d8da2f0517ac3f71cc9ed /arch/x86/include/asm/pgtable.h | |
parent | 649e8ef60fac0a2f6960cdb090d73e78717ac065 (diff) | |
download | linux-4fea801ac95d6534a93aa01d3ac62be163d845af.tar.xz |
x86: unify pmd_none
Impact: cleanup
Unify and demacro pmd_none.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 147d3f097ab0..2f38bbee77e7 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -450,6 +450,13 @@ static inline int pmd_present(pmd_t pmd) return pmd_val(pmd) & _PAGE_PRESENT; } +static inline int pmd_none(pmd_t pmd) +{ + /* Only check low word on 32-bit platforms, since it might be + out of sync with upper half. */ + return !(unsigned long)native_pmd_val(pmd); +} + #if PAGETABLE_LEVELS > 2 static inline int pud_present(pud_t pud) { |