mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
86239a5b9c
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
28 lines
780 B
Plaintext
28 lines
780 B
Plaintext
dnl #
|
|
dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
|
|
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 #
|
|
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])
|
|
])
|
|
])
|