HomeFreeBSD

linuxkpi: chase spinlock_t in DECLARE_WAIT_QUEUE_HEAD

Description

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)

Details

Provenance
2khramtsov_gmail.comAuthored on Aug 27 2024, 11:21 AM
manuCommitted on Thu, Oct 24, 7:24 AM
Parents
rGbe2940e90864: amd64: do not pass -z rodynamic to ld.bfd when building vdso
Branches
Unknown
Tags
Unknown