]> git.proxmox.com Git - mirror_zfs.git/commit
Workaround for Linux PowerPC GPL-only cpu_has_feature()
authorLow-power <msl0000023508@gmail.com>
Fri, 10 Mar 2023 17:35:00 +0000 (01:35 +0800)
committerGitHub <noreply@github.com>
Fri, 10 Mar 2023 17:35:00 +0000 (09:35 -0800)
commit589f59b52af86455cf71421e63c34557c7ee6f91
tree0350600175b27662916d2b69e18ef57011043985
parent7316fdd1c0c74074c4b48a499afe4e444aa42914
Workaround for Linux PowerPC GPL-only cpu_has_feature()

Linux since 4.7 makes interface 'cpu_has_feature' to use jump labels on
powerpc if CONFIG_JUMP_LABEL_FEATURE_CHECKS is enabled, in this case
however the inline function references GPL-only symbol
'cpu_feature_keys'.

ZFS currently uses 'cpu_has_feature' either directly or indirectly from
several places; while it is unknown how this issue didn't break ZFS on
64-bit little-endian powerpc, it is known to break ZFS with many Linux
versions on both 32-bit and 64-bit big-endian powerpc.

Until this issue is fixed in Linux, we have to workaround it by
overriding affected inline functions without depending on
'cpu_feature_keys'.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: WHR <msl0000023508@gmail.com>
Closes #14590
config/kernel-cpu_has_feature.m4 [new file with mode: 0644]
config/kernel-flush_dcache_page.m4 [new file with mode: 0644]
config/kernel.m4
include/os/linux/kernel/linux/dcache_compat.h
include/os/linux/kernel/linux/simd_powerpc.h