File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ dnl #
2
+ dnl # 6.2: timer_delete_sync introduced, del_timer_sync deprecated and made
3
+ dnl # into a simple wrapper
4
+ dnl # 6.15: del_timer_sync removed
5
+ dnl #
6
+ AC_DEFUN ( [ ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC] , [
7
+ ZFS_LINUX_TEST_SRC([ timer_delete_sync] , [
8
+ #include <linux/timer.h>
9
+ ] ,[
10
+ struct timer_list *timer __attribute__((unused)) = NULL;
11
+ timer_delete_sync(timer);
12
+ ] )
13
+ ] )
14
+
15
+ AC_DEFUN ( [ ZFS_AC_KERNEL_TIMER_DELETE_SYNC] , [
16
+ AC_MSG_CHECKING ( [ whether timer_delete_sync() is available] )
17
+ ZFS_LINUX_TEST_RESULT([ timer_delete_sync] , [
18
+ AC_MSG_RESULT ( yes )
19
+ AC_DEFINE ( HAVE_TIMER_DELETE_SYNC , 1 ,
20
+ [ timer_delete_sync is available] )
21
+ ] ,[
22
+ AC_MSG_RESULT ( no )
23
+ ] )
24
+ ] )
25
+
26
+ AC_DEFUN ( [ ZFS_AC_KERNEL_SRC_TIMER] , [
27
+ ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC
28
+ ] )
29
+
30
+ AC_DEFUN ( [ ZFS_AC_KERNEL_TIMER] , [
31
+ ZFS_AC_KERNEL_TIMER_DELETE_SYNC
32
+ ] )
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
130
130
ZFS_AC_KERNEL_SRC_MM_PAGE_MAPPING
131
131
ZFS_AC_KERNEL_SRC_FILE
132
132
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
133
+ ZFS_AC_KERNEL_SRC_TIMER
133
134
case "$host_cpu" in
134
135
powerpc*)
135
136
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
@@ -244,6 +245,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
244
245
ZFS_AC_KERNEL_1ARG_ASSIGN_STR
245
246
ZFS_AC_KERNEL_FILE
246
247
ZFS_AC_KERNEL_PIN_USER_PAGES
248
+ ZFS_AC_KERNEL_TIMER
247
249
case "$host_cpu" in
248
250
powerpc*)
249
251
ZFS_AC_KERNEL_CPU_HAS_FEATURE
Original file line number Diff line number Diff line change 38
38
#include <sys/kstat.h>
39
39
#include <linux/cpuhotplug.h>
40
40
41
+ /* Linux 6.2 renamed timer_delete_sync(); point it at its old name for those. */
42
+ #ifndef HAVE_TIMER_DELETE_SYNC
43
+ #define timer_delete_sync (t ) del_timer_sync(t)
44
+ #endif
45
+
41
46
typedef struct taskq_kstats {
42
47
/* static values, for completeness */
43
48
kstat_named_t tqks_threads_max ;
@@ -633,7 +638,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id)
633
638
*/
634
639
if (timer_pending (& t -> tqent_timer )) {
635
640
spin_unlock_irqrestore (& tq -> tq_lock , flags );
636
- del_timer_sync (& t -> tqent_timer );
641
+ timer_delete_sync (& t -> tqent_timer );
637
642
spin_lock_irqsave_nested (& tq -> tq_lock , flags ,
638
643
tq -> tq_lock_class );
639
644
}
You can’t perform that action at this time.
0 commit comments