History log of /freebsd-14.2/sys/compat/linuxkpi/common/include/linux/wait.h (Results 1 – 21 of 21)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0
# 089664a8 27-Aug-2024 Evgenii Khramtsov <[email protected]>

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

(cherry picked from commit 84f46335ab5da086c74032579799c0a74aa27447)

show more ...


Revision tags: release/14.1.0
# 183b64df 15-May-2024 Emmanuel Vadot <[email protected]>

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

(cherry picked from commit ae38a1a1bfdf320089c254e4dbffdf4769d89110)

linuxkpi: Fix spin_lock_init

Some linux code re-init some spinlock so add MTX_NEW to mtx_init.

Reported by: David Wolfskill <[email protected]>
Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")

(cherry picked from commit cff79fd02636f34010d8b835cc9e55401fa76e74)

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 95ee2897 16-Aug-2023 Warner Losh <[email protected]>

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

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


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 307f78f3 19-Dec-2021 Vladimir Kondratyev <[email protected]>

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


Revision tags: release/12.3.0, release/13.0.0, release/12.2.0
# 0e123c13 14-Aug-2020 Emmanuel Vadot <[email protected]>

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 ...


Revision tags: release/11.4.0
# ff443195 19-May-2020 Emmanuel Vadot <[email protected]>

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 ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# e6e028d0 06-Jun-2018 Hans Petter Selasky <[email protected]>

Implement the __add_wait_queue_entry_tail() function in the LinuxKPI.

Submitted by: Johannes Lundberg <[email protected]>
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 <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# 7e95e98d 06-Jun-2018 Hans Petter Selasky <[email protected]>

Implement the might_sleep_if() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <[email protected]>
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 <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# ab98f1e8 06-Jun-2018 Hans Petter Selasky <[email protected]>

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 <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# 1b092623 06-Jun-2018 Hans Petter Selasky <[email protected]>

Implement the init_wait_entry() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <[email protected]>
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 <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# bd40dea7 28-May-2018 Hans Petter Selasky <[email protected]>

Implement wait_event_killable() in the LinuxKPI.

Requested by: Johannes Lundberg <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies


# c3bfe0de 04-Mar-2018 Hans Petter Selasky <[email protected]>

Implement wait_event_lock_irq() macro function in the LinuxKPI.

MFC after: 1 week
Requested by: Johannes Lundberg <[email protected]>
Sponsored by: Mellanox Technologies


# 8f368d48 04-Mar-2018 Hans Petter Selasky <[email protected]>

Implement DEFINE_WAIT_FUNC() function macro and default_wake_function()
in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <[email protected]>
Sponsored by: Mellanox Technologies
Sp

Implement DEFINE_WAIT_FUNC() function macro and default_wake_function()
in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <[email protected]>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

show more ...


# d901abf1 02-Mar-2018 Hans Petter Selasky <[email protected]>

Implement wait_on_bit() function macro in the LinuxKPI.

MFC after: 1 week
Submitted by: Johannes Lundberg <[email protected]>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks


Revision tags: release/10.4.0
# 4ef8a630 10-Aug-2017 Hans Petter Selasky <[email protected]>

Fixes for wait event in the LinuxKPI. These are regression issues
after r319757.

1) Correct the return value from __wait_event_common() from 1 to 0 in
case the timeout is specified as MAX_SCHEDULE_T

Fixes for wait event in the LinuxKPI. These are regression issues
after r319757.

1) Correct the return value from __wait_event_common() from 1 to 0 in
case the timeout is specified as MAX_SCHEDULE_TIMEOUT. In the other
case __ret is zero and will be substituted in the last part of the
macro with the appropriate value before return.

2) Make sure the "timeout" argument is casted to "int" before
evaluating negativity. Else the signedness of a "long" might be
checked instead of the signedness of an integer.

3) The wait_event() function should not have a return value.

Found by: KrishnamRaju ErapaRaju <[email protected]>
MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


Revision tags: release/11.1.0
# 46565964 09-Jun-2017 Mark Johnston <[email protected]>

Augment wait queue support in the LinuxKPI.

In particular:
- Don't evaluate event conditions with a sleepqueue lock held, since such
code may attempt to acquire arbitrary locks.
- Fix the return v

Augment wait queue support in the LinuxKPI.

In particular:
- Don't evaluate event conditions with a sleepqueue lock held, since such
code may attempt to acquire arbitrary locks.
- Fix the return value for wait_event_interruptible() in the case that the
wait is interrupted by a signal.
- Implement wait_on_bit_timeout() and wait_on_atomic_t().
- Implement some functions used to test for pending signals.
- Implement a number of wait_event_*() variants and unify the existing
implementations.
- Unify the mechanism used by wait_event_*() and schedule() to put the
calling thread to sleep.

This is required to support updated DRM drivers. Thanks to hselasky for
finding and fixing a number of bugs in the original revision.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10986

show more ...


# 1e3db1de 21-Feb-2017 Hans Petter Selasky <[email protected]>

Make the LinuxKPI task struct persistent accross system calls.

A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invok

Make the LinuxKPI task struct persistent accross system calls.

A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invoked,
a check is made to create the task struct by demand. A thread
destructor callback is registered to free the task struct when a
thread exits to avoid memory leaks.

This change lays the ground for emulating the Linux kernel more
closely which is a dependency by the code using the LinuxKPI APIs.

Add new dedicated td_lkpi_task field has been added to struct thread
instead of abusing td_retval[1].

Fix some header file inclusions to make LINT kernel build properly
after this change.

Bump the __FreeBSD_version to force a rebuild of all kernel modules.

MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


Revision tags: release/11.0.1, release/11.0.0
# 8eeb3e17 27-May-2016 Hans Petter Selasky <[email protected]>

The SCHEDULER_STOPPED() macro already contains a predict false statement.
Remove superfluous unlikely() wrapper.

Suggested by: glebius
MFC after: 1 week
Sponsored by: Mellanox Technologies


# 85714218 25-May-2016 Hans Petter Selasky <[email protected]>

Add checks for SCHEDULER_STOPPED() so that code using the LinuxKPI can
run after a panic(). This for example allows a LinuxKPI based graphics
stack to receive prints during a panic.

Obtained from: k

Add checks for SCHEDULER_STOPPED() so that code using the LinuxKPI can
run after a panic(). This for example allows a LinuxKPI based graphics
stack to receive prints during a panic.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


# b0338411 31-Mar-2016 Navdeep Parhar <[email protected]>

Add wait_event_interruptible_timeout to linuxkpi.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Reviewed by: hselasky@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.fr

Add wait_event_interruptible_timeout to linuxkpi.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Reviewed by: hselasky@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5776

show more ...


Revision tags: release/10.3.0
# 8d59ecb2 29-Oct-2015 Hans Petter Selasky <[email protected]>

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some M

Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
LinuxKPI into the kernel. This was done to keep the build rules for
the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies

show more ...