aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-07-23 19:32:14 -0700
committerGitHub <[email protected]>2017-07-23 19:32:14 -0700
commit944117514d2aba081b15faad741e7d0c6b1465c8 (patch)
tree242f2062a1aa5654ad4e6f13cea7bda60eb29106 /config
parentae42190b7917d5aaa8ec0c0951ff65e8df6fa601 (diff)
Linux 4.13 compat: wait queues
Commit torvalds/linux@ac6424b9 - Renamed struct wait_queue -> struct wait_queue_entry. Commit torvalds/linux@2055da97 - Renamed wait_queue_head::task_list -> wait_queue_head::head - Renamed wait_queue_entry::task_list -> wait_queue_entry::entry Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #629
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m455
1 files changed, 55 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 698d51a87..630d67c2d 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -53,6 +53,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_INODE_LOCK
SPL_AC_GROUP_INFO_GID
SPL_AC_KMEM_CACHE_CREATE_USERCOPY
+ SPL_AC_WAIT_QUEUE_ENTRY_T
+ SPL_AC_WAIT_QUEUE_HEAD_ENTRY
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -1670,3 +1672,56 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [
])
EXTRA_KCFLAGS="$tmp_flags"
])
+
+dnl #
+dnl # 4.13 API change
+dnl # Renamed struct wait_queue -> struct wait_queue_entry.
+dnl #
+AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [
+ AC_MSG_CHECKING([whether wait_queue_entry_t exists])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/wait.h>
+ ],[
+ wait_queue_entry_t *entry __attribute__ ((unused));
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1,
+ [wait_queue_entry_t exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+dnl #
+dnl # 4.13 API change
+dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head
+dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry
+dnl #
+AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [
+ AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/wait.h>
+
+ #ifdef HAVE_WAIT_QUEUE_ENTRY_T
+ typedef wait_queue_head_t spl_wait_queue_head_t;
+ typedef wait_queue_entry_t spl_wait_queue_entry_t;
+ #else
+ typedef wait_queue_head_t spl_wait_queue_head_t;
+ typedef wait_queue_t spl_wait_queue_entry_t;
+ #endif
+ ],[
+ spl_wait_queue_head_t wq_head;
+ spl_wait_queue_entry_t wq_entry;
+ struct list_head *head __attribute__ ((unused));
+ struct list_head *entry __attribute__ ((unused));
+
+ head = &wq_head.head;
+ entry = &wq_entry.entry;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1,
+ [wq_head->head and wq_entry->entry exist])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])