summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/book3s/32
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2015-12-01 09:06:35 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-14 15:19:07 +1100
commitf281b5d50c87ecca108dcbf8f791bd8923fde3de (patch)
treea29301f879dbacfe55ca64933e2bec276cf1c9fb /arch/powerpc/include/asm/book3s/32
parent10bd3808dfd067d6d6c941cc6e1b13be165f6a70 (diff)
downloadlinux-f281b5d50c87ecca108dcbf8f791bd8923fde3de.tar.gz
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/book3s/32')
-rw-r--r--arch/powerpc/include/asm/book3s/32/pgtable.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index 5438c0b6aeec..226f29d39332 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -105,7 +105,11 @@ extern unsigned long ioremap_bot;
#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