mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 19:50:25 +03:00
config: remove HAVE_KERNEL_TIMER_SETUP
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
parent
940f5d5658
commit
536a0a8a84
@ -1,42 +0,0 @@
|
|||||||
dnl # 4.14-rc3 API change
|
|
||||||
dnl # https://lwn.net/Articles/735887/
|
|
||||||
dnl #
|
|
||||||
dnl # Check if timer_list.func get passed a timer_list or an unsigned long
|
|
||||||
dnl # (older kernels). Also sanity check the from_timer() and timer_setup()
|
|
||||||
dnl # macros are available as well, since they will be used in the same newer
|
|
||||||
dnl # kernels that support the new timer_list.func signature.
|
|
||||||
dnl #
|
|
||||||
dnl # Also check for the existence of flags in struct timer_list, they were
|
|
||||||
dnl # added in 4.1-rc8 via 0eeda71bc30d.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
|
|
||||||
ZFS_LINUX_TEST_SRC([timer_setup], [
|
|
||||||
#include <linux/timer.h>
|
|
||||||
|
|
||||||
struct my_task_timer {
|
|
||||||
struct timer_list timer;
|
|
||||||
int data;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void task_expire(struct timer_list *tl)
|
|
||||||
{
|
|
||||||
struct my_task_timer *task_timer =
|
|
||||||
from_timer(task_timer, tl, timer);
|
|
||||||
task_timer->data = 42;
|
|
||||||
}
|
|
||||||
],[
|
|
||||||
struct my_task_timer task_timer;
|
|
||||||
timer_setup(&task_timer.timer, task_expire, 0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_TIMER_SETUP], [
|
|
||||||
AC_MSG_CHECKING([whether timer_setup() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([timer_setup], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KERNEL_TIMER_SETUP, 1,
|
|
||||||
[timer_setup() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
@ -50,7 +50,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
|
ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
|
||||||
ZFS_AC_KERNEL_SRC_WAIT
|
ZFS_AC_KERNEL_SRC_WAIT
|
||||||
ZFS_AC_KERNEL_SRC_INODE_TIMES
|
ZFS_AC_KERNEL_SRC_INODE_TIMES
|
||||||
ZFS_AC_KERNEL_SRC_TIMER_SETUP
|
|
||||||
ZFS_AC_KERNEL_SRC_PROC_OPERATIONS
|
ZFS_AC_KERNEL_SRC_PROC_OPERATIONS
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS
|
||||||
ZFS_AC_KERNEL_SRC_BIO
|
ZFS_AC_KERNEL_SRC_BIO
|
||||||
@ -170,7 +169,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
|
ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
|
||||||
ZFS_AC_KERNEL_WAIT
|
ZFS_AC_KERNEL_WAIT
|
||||||
ZFS_AC_KERNEL_INODE_TIMES
|
ZFS_AC_KERNEL_INODE_TIMES
|
||||||
ZFS_AC_KERNEL_TIMER_SETUP
|
|
||||||
ZFS_AC_KERNEL_PROC_OPERATIONS
|
ZFS_AC_KERNEL_PROC_OPERATIONS
|
||||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS
|
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS
|
||||||
ZFS_AC_KERNEL_BIO
|
ZFS_AC_KERNEL_BIO
|
||||||
|
@ -62,18 +62,4 @@
|
|||||||
container_of(timer, typeof(*var), timer_field)
|
container_of(timer, typeof(*var), timer_field)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct timer_list *spl_timer_list_t;
|
|
||||||
|
|
||||||
#ifndef HAVE_KERNEL_TIMER_SETUP
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
timer_setup(struct timer_list *timer, void (*func)(spl_timer_list_t), u32 fl)
|
|
||||||
{
|
|
||||||
(timer)->flags = fl;
|
|
||||||
init_timer(timer);
|
|
||||||
setup_timer(timer, func, (spl_timer_list_t)(timer));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HAVE_KERNEL_TIMER_SETUP */
|
|
||||||
|
|
||||||
#endif /* _SPL_TIMER_H */
|
#endif /* _SPL_TIMER_H */
|
||||||
|
@ -347,7 +347,7 @@ task_expire_impl(taskq_ent_t *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
task_expire(spl_timer_list_t tl)
|
task_expire(struct timer_list *tl)
|
||||||
{
|
{
|
||||||
struct timer_list *tmr = (struct timer_list *)tl;
|
struct timer_list *tmr = (struct timer_list *)tl;
|
||||||
taskq_ent_t *t = from_timer(t, tmr, tqent_timer);
|
taskq_ent_t *t = from_timer(t, tmr, tqent_timer);
|
||||||
|
Loading…
Reference in New Issue
Block a user