summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 11:30:51 -0800
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 12:31:48 -0800
commit4fea801ac95d6534a93aa01d3ac62be163d845af (patch)
treea5a285d5fd1c07c8d24d8da2f0517ac3f71cc9ed /arch/x86/include/asm/pgtable.h
parent649e8ef60fac0a2f6960cdb090d73e78717ac065 (diff)
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.h7
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)
{