linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64/sve: fix genksyms generation
@ 2019-06-17 10:42 Arnd Bergmann
  2019-06-17 11:26 ` Will Deacon
  0 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2019-06-17 10:42 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Dave Martin
  Cc: Mark Rutland, Peter Maydell, Arnd Bergmann, Ard Biesheuvel,
	Marc Zyngier, linux-kernel, Julien Grall, Alan Hayward,
	Andrew Murray, Alex Bennée, linux-arm-kernel

genksyms does not understand __uint128_t, so we get a build failure
in the fpsimd module when it cannot export a symbol right:

WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version generation failed, symbol will not be versioned.
/home/arnd/cross/x86_64/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against `__crc_kernel_neon_begin' can not be used when making a shared object
arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x0): dangerous relocation: unsupported relocation
arch/arm64/kernel/fpsimd.o:(".discard.addressable"+0x8): dangerous relocation: unsupported relocation

We could teach genksyms about the type, but it's easier to just
work around it by defining that type locally in a way that genksyms
understands.

Fixes: 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/kernel/fpsimd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 07f238ef47ae..2aba07cccf50 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -400,6 +400,9 @@ static int __init sve_sysctl_init(void) { return 0; }
 #define ZREG(sve_state, vq, n) ((char *)(sve_state) +		\
 	(SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))
 
+#ifdef __GENKSYMS__
+typedef __u64 __uint128_t[2];
+#endif
 #ifdef CONFIG_CPU_BIG_ENDIAN
 static __uint128_t arm64_cpu_to_le128(__uint128_t x)
 {
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-07-10  8:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 10:42 [PATCH] arm64/sve: fix genksyms generation Arnd Bergmann
2019-06-17 11:26 ` Will Deacon
2019-06-17 12:21   ` Arnd Bergmann
2019-06-17 14:59     ` Alex Bennée
2019-06-17 15:10       ` Arnd Bergmann
2019-06-17 16:13     ` Will Deacon
2019-06-17 16:32       ` Ard Biesheuvel
2019-06-17 16:45         ` Will Deacon
2019-06-18 12:02           ` Will Deacon
2019-06-18 14:15             ` Arnd Bergmann
2019-07-09 19:06               ` Laura Abbott
2019-07-10  8:15                 ` Will Deacon
2019-07-10  8:48                   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).