aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-05 14:31:17 -0500
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 15:31:51 -0500
commit26c8e3179933c5c9071b16db76ab6de58a787d06 (patch)
treec91b0e5eaa71cd123791280224431fbfb4aed520
parent18a7a199f97a7509fb987722e543f1aac3d7ada5 (diff)
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@citrix.com>
-rw-r--r--arch/x86/include/asm/pgtable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index c811d76d6fd0..a80a956ae655 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -465,7 +465,7 @@ static inline int pmd_none(pmd_t pmd)
465{ 465{
466 /* Only check low word on 32-bit platforms, since it might be 466 /* Only check low word on 32-bit platforms, since it might be
467 out of sync with upper half. */ 467 out of sync with upper half. */
468 return !(unsigned long)native_pmd_val(pmd); 468 return (unsigned long)native_pmd_val(pmd) == 0;
469} 469}
470 470
471static inline unsigned long pmd_page_vaddr(pmd_t pmd) 471static inline unsigned long pmd_page_vaddr(pmd_t pmd)
@@ -530,7 +530,7 @@ static inline unsigned long pages_to_mb(unsigned long npg)
530#if PAGETABLE_LEVELS > 2 530#if PAGETABLE_LEVELS > 2
531static inline int pud_none(pud_t pud) 531static inline int pud_none(pud_t pud)
532{ 532{
533 return pud_val(pud) == 0; 533 return native_pud_val(pud) == 0;
534} 534}
535 535
536static inline int pud_present(pud_t pud) 536static inline int pud_present(pud_t pud)
@@ -605,7 +605,7 @@ static inline int pgd_bad(pgd_t pgd)
605 605
606static inline int pgd_none(pgd_t pgd) 606static inline int pgd_none(pgd_t pgd)
607{ 607{
608 return !pgd_val(pgd); 608 return !native_pgd_val(pgd);
609} 609}
610#endif /* PAGETABLE_LEVELS > 3 */ 610#endif /* PAGETABLE_LEVELS > 3 */
611 611