summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/pgtable-ppc32.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2015-12-01 03:36:35 (GMT)
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-14 04:19:07 (GMT)
commitf281b5d50c87ecca108dcbf8f791bd8923fde3de (patch)
treea29301f879dbacfe55ca64933e2bec276cf1c9fb /arch/powerpc/include/asm/pgtable-ppc32.h
parent10bd3808dfd067d6d6c941cc6e1b13be165f6a70 (diff)
downloadlinux-f281b5d50c87ecca108dcbf8f791bd8923fde3de.tar.xz
powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue
We convert them static inline function here as we did with pte_val in the previous patch Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/pgtable-ppc32.h')
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc32.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h
index aac6547..fbb23c5 100644
--- a/arch/powerpc/include/asm/pgtable-ppc32.h
+++ b/arch/powerpc/include/asm/pgtable-ppc32.h
@@ -128,7 +128,12 @@ extern int icache_44x_need_flush;
#define pmd_none(pmd) (!pmd_val(pmd))
#define pmd_bad(pmd) (pmd_val(pmd) & _PMD_BAD)
#define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT_MASK)
-#define pmd_clear(pmdp) do { pmd_val(*(pmdp)) = 0; } while (0)
+static inline void pmd_clear(pmd_t *pmdp)
+{
+ *pmdp = __pmd(0);
+}
+
+
/*
* When flushing the tlb entry for a page, we also need to flush the hash