mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix build for Linux 6.18 with PowerPC/RISC-V kernels. (#18145)
The macro 'flush_dcache_page(...)' modifies the page flags, but in Linux 6.18 the type of the page flags changed from 'unsigned long' to the struct type 'memdesc_flags_t' with a single member 'f' which is the page flags field. Signed-off-by: Erik Larsson <catacombae@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
committed by
Tony Hutter
parent
2328b37eb9
commit
8a9bbaa7cf
@@ -16,9 +16,36 @@ AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_FLAG_ERROR], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Linux 6.18+ uses a struct typedef (memdesc_flags_t) instead of an
|
||||
dnl # 'unsigned long' for the 'flags' field in 'struct page'.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS_STRUCT], [
|
||||
ZFS_LINUX_TEST_SRC([mm_page_flags_struct], [
|
||||
#include <linux/mm.h>
|
||||
|
||||
static const struct page p __attribute__ ((unused)) = {
|
||||
.flags = { .f = 0 }
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_FLAGS_STRUCT], [
|
||||
AC_MSG_CHECKING([whether 'flags' in 'struct page' is a struct])
|
||||
ZFS_LINUX_TEST_RESULT([mm_page_flags_struct], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_MM_PAGE_FLAGS_STRUCT, 1,
|
||||
['flags' in 'struct page' is a struct])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS], [
|
||||
ZFS_AC_KERNEL_SRC_MM_PAGE_FLAG_ERROR
|
||||
ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS_STRUCT
|
||||
])
|
||||
AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_FLAGS], [
|
||||
ZFS_AC_KERNEL_MM_PAGE_FLAG_ERROR
|
||||
ZFS_AC_KERNEL_MM_PAGE_FLAGS_STRUCT
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user