History log of /src/sys/compat/linuxkpi/common/include/linux/wait.h (Results 1 – 25 of 40)
Revision Date Author Comments
# 6d720cdf 27-Dec-2024 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `woken_wake_function()` and `wait_woken()`

They are used by the i915 DRM driver starting with Linux 6.7.

`(struct wait_queue)->flags` is no longer always zero. I wonder if some
code r

linuxkpi: Add `woken_wake_function()` and `wait_woken()`

They are used by the i915 DRM driver starting with Linux 6.7.

`(struct wait_queue)->flags` is no longer always zero. I wonder if some
code relied on this...

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48755

show more ...


# 325aa4db 11-Jan-2025 Mark Johnston <markj@FreeBSD.org>

linuxkpi: Introduce a properly typed jiffies

Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subt

linuxkpi: Introduce a properly typed jiffies

Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subtle incompatibility that is otherwise difficult to paper over
and leads to bugs when ticks values are sign-extended.

- Introduce a "jiffies" symbol in subr_ticks.S, declared only in the
LinuxKPI as an unsigned long.
- Remove all references to "ticks" from the LinuxKPI.
- Convert interfaces to match Linux's type signatures where it makes
sense.

Reviewed by: manu
Tested by: bz
Differential Revision: https://reviews.freebsd.org/D48523

show more ...


# 84f46335 27-Aug-2024 Evgenii Khramtsov <2khramtsov@gmail.com>

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 membe

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: ?

show more ...


# ae38a1a1 15-May-2024 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: spinlock: Simplify code

Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by: bz, emaste
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Re

linuxkpi: spinlock: Simplify code

Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by: bz, emaste
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D45205

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# e2515283 27-Aug-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# de6fc2e3 15-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r364082 through r364250.


# 0e123c13 14-Aug-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add a few wait_bit functions

The linux function does a lot more than that as multiple waitqueue could be fetch
from a static table based on the hash of the argument but since in DRM it's o

linuxkpi: Add a few wait_bit functions

The linux function does a lot more than that as multiple waitqueue could be fetch
from a static table based on the hash of the argument but since in DRM it's only used
in one place just add a single variable.
We will probably need to change that in the futur but it's ok with DRM even with current
linux.

Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26054

show more ...


# ff443195 19-May-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add __init_waitqueue_head

The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

Spo

linuxkpi: Add __init_waitqueue_head

The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

Sponsored-by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24861

show more ...


# 6d720cdf 27-Dec-2024 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Add `woken_wake_function()` and `wait_woken()`

They are used by the i915 DRM driver starting with Linux 6.7.

`(struct wait_queue)->flags` is no longer always zero. I wonder if some
code r

linuxkpi: Add `woken_wake_function()` and `wait_woken()`

They are used by the i915 DRM driver starting with Linux 6.7.

`(struct wait_queue)->flags` is no longer always zero. I wonder if some
code relied on this...

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48755

show more ...


# 325aa4db 11-Jan-2025 Mark Johnston <markj@FreeBSD.org>

linuxkpi: Introduce a properly typed jiffies

Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subt

linuxkpi: Introduce a properly typed jiffies

Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subtle incompatibility that is otherwise difficult to paper over
and leads to bugs when ticks values are sign-extended.

- Introduce a "jiffies" symbol in subr_ticks.S, declared only in the
LinuxKPI as an unsigned long.
- Remove all references to "ticks" from the LinuxKPI.
- Convert interfaces to match Linux's type signatures where it makes
sense.

Reviewed by: manu
Tested by: bz
Differential Revision: https://reviews.freebsd.org/D48523

show more ...


# 84f46335 27-Aug-2024 Evgenii Khramtsov <2khramtsov@gmail.com>

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 membe

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: ?

show more ...


# ae38a1a1 15-May-2024 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: spinlock: Simplify code

Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by: bz, emaste
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Re

linuxkpi: spinlock: Simplify code

Just use a typedef for spinlock_t, no need to create a useless
structure.

Reviewed by: bz, emaste
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D45205

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


# e2515283 27-Aug-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# de6fc2e3 15-Aug-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r364082 through r364250.


# 0e123c13 14-Aug-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add a few wait_bit functions

The linux function does a lot more than that as multiple waitqueue could be fetch
from a static table based on the hash of the argument but since in DRM it's o

linuxkpi: Add a few wait_bit functions

The linux function does a lot more than that as multiple waitqueue could be fetch
from a static table based on the hash of the argument but since in DRM it's only used
in one place just add a single variable.
We will probably need to change that in the futur but it's ok with DRM even with current
linux.

Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26054

show more ...


# ff443195 19-May-2020 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add __init_waitqueue_head

The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

Spo

linuxkpi: Add __init_waitqueue_head

The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

Sponsored-by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24861

show more ...


# e6e028d0 06-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement the __add_wait_queue_entry_tail() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelig

Implement the __add_wait_queue_entry_tail() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# 7e95e98d 06-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement the might_sleep_if() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Netw

Implement the might_sleep_if() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# ab98f1e8 06-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Rename two structure field members while keeping backwards compatibility in
the LinuxKPI. Add a comment saying in which Linux version this change was made.

Submitted by: Johannes Lundberg <johalun0@

Rename two structure field members while keeping backwards compatibility in
the LinuxKPI. Add a comment saying in which Linux version this change was made.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# 1b092623 06-Jun-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement the init_wait_entry() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Net

Implement the init_wait_entry() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# bd40dea7 28-May-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement wait_event_killable() in the LinuxKPI.

Requested by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies


12