summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-12 13:13:16 -0700
committerDavid S. Miller <davem@davemloft.net>2012-05-12 13:13:16 -0700
commit7d9fa4aa3d41e82d5d52612d07211ee243df3a20 (patch)
treefea3aa9a9b74abd2bc6aebe68aca60f9428f8374 /arch/sparc/include
parent6439d1c693bae2e7552ceaf16e45a6e819d18873 (diff)
downloadlinux-7d9fa4aa3d41e82d5d52612d07211ee243df3a20.tar.bz2
sparc32: Un-btfixup pgd_{none,bad,present}.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/pgtable_32.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index c0e4d737afb2..9b4ff5abec91 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -171,13 +171,20 @@ static inline void pmd_clear(pmd_t *pmdp)
srmmu_set_pte((pte_t *)&pmdp->pmdv[i], __pte(0));
}
-BTFIXUPDEF_CALL_CONST(int, pgd_none, pgd_t)
-BTFIXUPDEF_CALL_CONST(int, pgd_bad, pgd_t)
-BTFIXUPDEF_CALL_CONST(int, pgd_present, pgd_t)
+static inline int pgd_none(pgd_t pgd)
+{
+ return !(pgd_val(pgd) & 0xFFFFFFF);
+}
-#define pgd_none(pgd) BTFIXUP_CALL(pgd_none)(pgd)
-#define pgd_bad(pgd) BTFIXUP_CALL(pgd_bad)(pgd)
-#define pgd_present(pgd) BTFIXUP_CALL(pgd_present)(pgd)
+static inline int pgd_bad(pgd_t pgd)
+{
+ return (pgd_val(pgd) & SRMMU_ET_MASK) != SRMMU_ET_PTD;
+}
+
+static inline int pgd_present(pgd_t pgd)
+{
+ return ((pgd_val(pgd) & SRMMU_ET_MASK) == SRMMU_ET_PTD);
+}
static inline void pgd_clear(pgd_t *pgdp)
{