mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Linux PPC: Fix build failures on kernels built without CONFIG_SPE
We do a simple ifdef to avoid calling enable_kernel_spe()/ disable_kernel_spe() on PowerPC. Reported-by: Rich Ercolani <Rincebrain@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Tested-by: Georgy Yakovlev <gyakovlev@gentoo.org> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14233 Closes #14244
This commit is contained in:
parent
7bf4c97a36
commit
5401472cd0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user