zfs
zfs copied to clipboard
master FTBFS on a Linux/ppc64le system
System information
| Type | Version/Name |
|---|---|
| Distribution Name | Debian |
| Distribution Version | bullseye |
| Kernel Version | 5.15.41 |
| Architecture | ppc64le |
| OpenZFS Version | b0657a59a |
Describe the problem you're observing
master fails to build with:
/home/rich/zfs_vanilla/module/icp/algs/blake3/blake3_x86-64.c: In function ‘blake3_compress_in_place_sse2’:
/home/rich/zfs_vanilla/include/os/linux/kernel/linux/simd_powerpc.h:77:3: error: implicit declaration of function ‘enable_kernel_spe’; did you mean ‘enable_kernel_fp’? [-Werror=implicit-function-declaration]
77 | enable_kernel_spe(); \
| ^~~~~~~~~~~~~~~~~
It appears that needs to be guarded behind an #ifdef CONFIG_SPE or something to that effect.
Describe how to reproduce the problem
AFAICT, just try building it on a ppc64el system without CONFIG_SPE.
Include any warning/errors/backtraces from the system logs
N/A
confirmed
This option is only useful if you have a processor that supports SPE (e500, otherwise known as 85xx series), but does not have any effect on a non-spe cpu (it does, however add code to the kernel).
The configuration item CONFIG_SPE:
prompt: SPE Support
type: bool
depends on: CONFIG_E200 || CONFIG_E500
it's impossible to enable on ppc64le though.
so yeah, ifdef it is, testing a patch from @ryao right now.
diff --git a/include/os/linux/kernel/linux/simd_powerpc.h b/include/os/linux/kernel/linux/simd_powerpc.h
index 2a2f92bc4..f1de3ad01 100644
--- a/include/os/linux/kernel/linux/simd_powerpc.h
+++ b/include/os/linux/kernel/linux/simd_powerpc.h
@@ -69,6 +69,7 @@
#define kfpu_allowed() 1
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+#ifdef CONFIG_SPE
#define kfpu_begin() \
{ \
preempt_disable(); \
@@ -83,6 +84,20 @@
disable_kernel_altivec(); \
preempt_enable(); \
}
+#else /* CONFIG_SPE */
+#define kfpu_begin() \
+ { \
+ preempt_disable(); \
+ enable_kernel_altivec(); \
+ enable_kernel_vsx(); \
+ }
+#define kfpu_end() \
+ { \
+ disable_kernel_vsx(); \
+ disable_kernel_altivec(); \
+ preempt_enable(); \
+ }
+#endif
#else
/* seems that before 4.5 no-one bothered */
#define kfpu_begin()
^ fix confirmed