mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
589f59b52a
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
27 lines
728 B
Plaintext
27 lines
728 B
Plaintext
dnl #
|
|
dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
|
|
dnl # function and may indirectly referencing GPL-only cpu_feature_keys on
|
|
dnl # powerpc
|
|
dnl #
|
|
|
|
dnl #
|
|
dnl # Checking if flush_dcache_page is exported GPL-only
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE], [
|
|
ZFS_LINUX_TEST_SRC([flush_dcache_page], [
|
|
#include <asm/cacheflush.h>
|
|
], [
|
|
flush_dcache_page(0);
|
|
], [], [ZFS_META_LICENSE])
|
|
])
|
|
AC_DEFUN([ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE], [
|
|
AC_MSG_CHECKING([whether flush_dcache_page() is GPL-only])
|
|
ZFS_LINUX_TEST_RESULT([flush_dcache_page_license], [
|
|
AC_MSG_RESULT(no)
|
|
], [
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY, 1,
|
|
[flush_dcache_page() is GPL-only])
|
|
])
|
|
])
|