summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/init-common.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-10-19 09:29:12 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-12-09 12:41:16 +0100
commit6c1fa60d368e6b752e1612eae9bb0970e85392b2 (patch)
treeca78507603715b8cf5159a237158a9f8045b40d1 /arch/powerpc/mm/init-common.c
parentpowerpc/40x: Map 32Mbytes of memory at startup (diff)
downloadlinux-6c1fa60d368e6b752e1612eae9bb0970e85392b2.tar.xz
linux-6c1fa60d368e6b752e1612eae9bb0970e85392b2.zip
Revert "powerpc: Inline setup_kup()"
This reverts commit 1791ebd131c46539b024c0f2ebf12b6c88a265b9. setup_kup() was inlined to manage conflict between PPC32 marking setup_{kuap/kuep}() __init and PPC64 not marking them __init. But in fact PPC32 has removed the __init mark for all but 8xx in order to properly handle SMP. In order to make setup_kup() grow a bit, revert the commit mentioned above but remove __init for 8xx as well so that we don't have to mark setup_kup() as __ref. Also switch the order so that KUAP is initialised before KUEP because on the 40x, KUEP will depend on the activation of KUAP. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/7691088fd0994ee3c8db6298dc8c00259e3f6a7f.1634627931.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/init-common.c')
-rw-r--r--arch/powerpc/mm/init-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c
index 3a82f89827a5..b4f3437aee38 100644
--- a/arch/powerpc/mm/init-common.c
+++ b/arch/powerpc/mm/init-common.c
@@ -47,6 +47,12 @@ static int __init parse_nosmap(char *p)
}
early_param("nosmap", parse_nosmap);
+void setup_kup(void)
+{
+ setup_kuap(disable_kuap);
+ setup_kuep(disable_kuep);
+}
+
#define CTOR(shift) static void ctor_##shift(void *addr) \
{ \
memset(addr, 0, sizeof(void *) << (shift)); \