diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-12 20:13:16 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 20:13:16 (GMT) |
commit | 7d9fa4aa3d41e82d5d52612d07211ee243df3a20 (patch) | |
tree | fea3aa9a9b74abd2bc6aebe68aca60f9428f8374 /arch/sparc/include | |
parent | 6439d1c693bae2e7552ceaf16e45a6e819d18873 (diff) | |
download | linux-fsl-qoriq-7d9fa4aa3d41e82d5d52612d07211ee243df3a20.tar.xz |
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.h | 19 |
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 c0e4d73..9b4ff5a 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) { |