mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
compact: workaround for GPL-only symbols on riscv from Linux 6.2
Since Linux 6.2, the implementation of flush_dcache_page on riscv references GPL-only symbol `PageHuge`, breaking the build of zfs. This patch uses existing mechanism to override flush_dcache_page, removing the call to `PageHuge`. According to comments in kernel, it is only used to do some check against HugeTLB pages, which only exist in userspace. ZFS uses flush_dcache_page only on kernel pages, thus this patch will not introduce any behaviour change. See also: torvalds/linux@d33deda, openzfs/zfs@589f59b Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes #14974 Closes #15627
This commit is contained in:
committed by
Brian Behlendorf
parent
a00231a3fc
commit
9ecd112dc1
@@ -1,7 +1,8 @@
|
||||
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 # function and may indirectly referencing GPL-only symbols:
|
||||
dnl # on powerpc: cpu_feature_keys
|
||||
dnl # on riscv: PageHuge (added from 6.2)
|
||||
dnl #
|
||||
|
||||
dnl #
|
||||
|
||||
@@ -168,6 +168,9 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||
ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE
|
||||
;;
|
||||
riscv*)
|
||||
ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([for available kernel interfaces])
|
||||
@@ -310,6 +313,9 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||
ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE
|
||||
;;
|
||||
riscv*)
|
||||
ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user