[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ab45a6865df539a36a75.1233862277@abulafia.goop.org>
Date: Thu, 05 Feb 2009 11:31:17 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org,
the arch/x86 maintainers <x86@...nel.org>
Subject: [PATCH 35 of 36] x86: make pgd/pud/pmd/pte_none consistent
The _none test is done differently for every level of the pagetable.
Standardize them by:
1: Use the native_X_val to extract the raw entry, with no need to go
via paravirt_ops, diff -r 1d0646d0d319 arch/x86/include/asm/pgtable.h, and
2: Compare with 0 rather than using a boolean !, since they are actually values
and not booleans.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
arch/x86/include/asm/pgtable.h | 6 +++---
1 file changed, 3 insertions(+), 3 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
@@ -503,7 +503,7 @@
{
/* 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);
+ return (unsigned long)native_pmd_val(pmd) == 0;
}
static inline unsigned long pmd_page_vaddr(pmd_t pmd)
@@ -568,7 +568,7 @@
#if PAGETABLE_LEVELS > 2
static inline int pud_none(pud_t pud)
{
- return pud_val(pud) == 0;
+ return native_pud_val(pud) == 0;
}
static inline int pud_present(pud_t pud)
@@ -643,7 +643,7 @@
static inline int pgd_none(pgd_t pgd)
{
- return !pgd_val(pgd);
+ return !native_pgd_val(pgd);
}
#endif /* PAGETABLE_LEVELS > 3 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists