Skip to contentSkip to conversation

powerpc/uaccess-flush: fix corenet64_smp_defconfig build

PATCH In review Daniel Axtens 2 participants 2 messages Nov 23, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/uaccess-flush: fix corenet64_smp_defconfig build

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.

---
 arch/powerpc/kernel/ppc_ksyms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +2 -2
index 80eb47113d5d..0f05c85cbde3 100644
@@ -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>
 #endif
 
@@ -50,6 +50,6 @@ EXPORT_SYMBOL(current_stack_pointer);
 
 EXPORT_SYMBOL(__arch_clear_user);
 
-#ifdef CONFIG_PPC64
+#ifdef CONFIG_PPC_BOOK3S_64
 EXPORT_SYMBOL(do_uaccess_flush);
 #endif
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 15 lines · Daniel Axtens

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.

Quoted 7 lines

Fix it.

---
 arch/powerpc/kernel/ppc_ksyms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

All 3 fixes now queued up, thanks.

greg k-h