1eda14cbcSMatt Macydnl # 2*7877fdebSMatt Macydnl # 5.10 API change, 3*7877fdebSMatt Macydnl # The "count" was moved into ref->data, from ref 4*7877fdebSMatt Macydnl # 5*7877fdebSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_SRC_PERCPU_REF_COUNT_IN_DATA], [ 6*7877fdebSMatt Macy ZFS_LINUX_TEST_SRC([percpu_ref_count_in_data], [ 7*7877fdebSMatt Macy #include <linux/percpu-refcount.h> 8*7877fdebSMatt Macy ],[ 9*7877fdebSMatt Macy struct percpu_ref_data d; 10*7877fdebSMatt Macy 11*7877fdebSMatt Macy atomic_long_set(&d.count, 1L); 12*7877fdebSMatt Macy ]) 13*7877fdebSMatt Macy]) 14*7877fdebSMatt Macy 15*7877fdebSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_PERCPU_REF_COUNT_IN_DATA], [ 16*7877fdebSMatt Macy AC_MSG_CHECKING([whether is inside percpu_ref.data]) 17*7877fdebSMatt Macy ZFS_LINUX_TEST_RESULT([percpu_ref_count_in_data], [ 18*7877fdebSMatt Macy AC_MSG_RESULT(yes) 19*7877fdebSMatt Macy AC_DEFINE(ZFS_PERCPU_REF_COUNT_IN_DATA, 1, 20*7877fdebSMatt Macy [count is located in percpu_ref.data]) 21*7877fdebSMatt Macy ],[ 22*7877fdebSMatt Macy AC_MSG_RESULT(no) 23*7877fdebSMatt Macy ]) 24*7877fdebSMatt Macy]) 25eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_SRC_PERCPU], [ 26*7877fdebSMatt Macy ZFS_AC_KERNEL_SRC_PERCPU_REF_COUNT_IN_DATA 27eda14cbcSMatt Macy]) 28eda14cbcSMatt Macy 29eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_PERCPU], [ 30*7877fdebSMatt Macy ZFS_AC_KERNEL_PERCPU_REF_COUNT_IN_DATA 31eda14cbcSMatt Macy]) 32