git: 089664a8db2e - stable/14 - linuxkpi: chase spinlock_t in DECLARE_WAIT_QUEUE_HEAD

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 24 Oct 2024 07:25:18 UTC
The branch stable/14 has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=089664a8db2e16493a4e976939c2237d43f81ada

commit 089664a8db2e16493a4e976939c2237d43f81ada
Author:     Evgenii Khramtsov <2khramtsov@gmail.com>
AuthorDate: 2024-08-27 11:21:39 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-10-24 07:24:52 +0000

    linuxkpi: chase spinlock_t in DECLARE_WAIT_QUEUE_HEAD
    
    Remove member m to unbreak consumers, e.g. drm-kmod 5.10-lts branch.
    
    [...]
    /tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
       38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
          |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
      113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/src/sys/sys/mutex.h:528:4: note: expanded from macro 'MTX_SYSINIT'
      528 |                 (mtx),                                                  \
          |                  ^~~
    /tmp/drm-kmod/drivers/gpu/drm/ttm/ttm_module.c:38:8: error: no member named 'm' in 'struct mtx'
       38 | static DECLARE_WAIT_QUEUE_HEAD(exit_q);
          |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/src/sys/compat/linuxkpi/common/include/linux/wait.h:113:33: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD'
      113 |         MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [...]
    
    Fixes:          ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")
    MFC after:      ?
    
    (cherry picked from commit 84f46335ab5da086c74032579799c0a74aa27447)
---
 sys/compat/linuxkpi/common/include/linux/wait.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/wait.h b/sys/compat/linuxkpi/common/include/linux/wait.h
index b815050b6faa..309c7816aa7b 100644
--- a/sys/compat/linuxkpi/common/include/linux/wait.h
+++ b/sys/compat/linuxkpi/common/include/linux/wait.h
@@ -110,7 +110,7 @@ extern wait_queue_func_t default_wake_function;
 	wait_queue_head_t name = {					\
 		.task_list = LINUX_LIST_HEAD_INIT(name.task_list),	\
 	};								\
-	MTX_SYSINIT(name, &(name).lock.m, spin_lock_name("wqhead"), MTX_DEF)
+	MTX_SYSINIT(name, &(name).lock, spin_lock_name("wqhead"), MTX_DEF)
 
 #define	init_waitqueue_head(wqh) do {					\
 	mtx_init(&(wqh)->lock, spin_lock_name("wqhead"),		\