diff mbox series

[SRU,Xenial,1/2] powerpc/uaccess-flush: fix corenet64_smp_defconfig build

Message ID 20201124231007.2309907-2-cascardo@canonical.com
State New
Headers show
Series LP: #1905475 Fix powerpc build | expand

Commit Message

Thadeu Lima de Souza Cascardo Nov. 24, 2020, 11:10 p.m. UTC
From: Daniel Axtens <dja@axtens.net>

BugLink: https://bugs.launchpad.net/bugs/1905475

Gunter reports problems with the corenet64_smp_defconfig:

In file included from arch/powerpc/kernel/ppc_ksyms.c:10:0:
arch/powerpc/include/asm/book3s/64/kup-radix.h:11:29: error: redefinition of ‘allow_user_access’
 static __always_inline void allow_user_access(void __user *to, const void __user *from,
In file included from arch/powerpc/include/asm/uaccess.h:12:0,
		 from arch/powerpc/kernel/ppc_ksyms.c:8:
arch/powerpc/include/asm/kup.h:12:20: note: previous definition of ‘allow_user_access’ was here
 static inline void allow_user_access(void __user *to, const void __user *from,

This is because ppc_ksyms.c imports asm/book3s/64/kup-radix.h guarded by
CONFIG_PPC64, rather than CONFIG_PPC_BOOK3S_64 which it should do.

Fix it.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
(cherry-picked from commit ddedb548ba8501ecbe78f9f61292518745220a8d linux-4.4.y)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
 arch/powerpc/kernel/ppc_ksyms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 80eb47113d5d..0f05c85cbde3 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -6,7 +6,7 @@ 
 #include <asm/cacheflush.h>
 #include <asm/epapr_hcalls.h>
 #include <asm/uaccess.h>
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_PPC_BOOK3S_64
 #include <asm/book3s/64/kup-radix.h>
@@ -50,6 +50,6 @@  EXPORT_SYMBOL(current_stack_pointer);
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_PPC_BOOK3S_64