summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-06-23 10:56:57 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-06-29 17:03:11 +1000
commit2db2008e636327a3caa648ef1e34a9d501d20e2e (patch)
tree66dac9b430e8aa8a1b440c66b244b84f1fc950d6 /arch/powerpc/include
parent12a9eddd239e14ccbf0ea50b3504a21bda002ba9 (diff)
downloadlinux-stable-2db2008e636327a3caa648ef1e34a9d501d20e2e.tar.gz
linux-stable-2db2008e636327a3caa648ef1e34a9d501d20e2e.tar.bz2
linux-stable-2db2008e636327a3caa648ef1e34a9d501d20e2e.zip
powerpc/64e: Rewrite p4d_populate() as a static inline function
Rewrite p4d_populate() as a static inline function instead of a macro. This change allows typechecking and would have helped detecting a recently found bug in map_kernel_page(). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1b416f8a8fe1bc3f4e01175680ce310b7eb3a1e4.1655974565.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/nohash/64/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/nohash/64/pgalloc.h b/arch/powerpc/include/asm/nohash/64/pgalloc.h
index 668aee6017e7..e50b211becb3 100644
--- a/arch/powerpc/include/asm/nohash/64/pgalloc.h
+++ b/arch/powerpc/include/asm/nohash/64/pgalloc.h
@@ -15,7 +15,10 @@ struct vmemmap_backing {
};
extern struct vmemmap_backing *vmemmap_list;
-#define p4d_populate(MM, P4D, PUD) p4d_set(P4D, (unsigned long)PUD)
+static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4d, pud_t *pud)
+{
+ p4d_set(p4d, (unsigned long)pud);
+}
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
{