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 |
|
#
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 ...
|
#
eed3be47 |
| 12-May-2025 |
Mark Johnston <markj@FreeBSD.org> |
linuxkpi: Fix up jiffies handling
A few issues found by code inspection while hunting for bugzilla PR 286512: - The "expires" field in struct delayed_work should be unsigned. - In linux_timer_jiffie
linuxkpi: Fix up jiffies handling
A few issues found by code inspection while hunting for bugzilla PR 286512: - The "expires" field in struct delayed_work should be unsigned. - In linux_timer_jiffies_until(), clamp the return value to INT_MAX: this return value is used as a ticks count, not a jiffies count, so we should avoid returning too large a value, lest it get truncated. It's unlikely we are dealing with values that large, but we should be careful anyway. - In linux_add_to_sleepqueue(), truncate the timeout to INT_MAX, as this value is passed to sleepq_set_timeout() as a ticks value. Typically it's multiplied by ticks_sbt to get an sbintime, and we should make sure the multiplication doesn't overflow. In drm-kmod, there is at least one call mod_delayed_work(... MAX_SCHEDULE_TIMEOUT).
Fixes: 325aa4dbd10d ("linuxkpi: Introduce a properly typed jiffies") Reviewed by: olce, bz, dumbbell, kib Tested by: dumbbell, bz Differential Revision: https://reviews.freebsd.org/D50192
show more ...
|
#
325aa4db |
| 12-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 ...
|
Revision tags: release/14.2.0, release/13.4.0 |
|
#
01518f5e |
| 29-Jul-2024 |
Mark Johnston <markj@FreeBSD.org> |
sleepqueue: Remove kernel stack swapping support, part 10
- Remove kick_proc0(). - Make the return type of sleepq_broadcast(), sleepq_signal(), etc., void. - Fix up callers.
Tested by: pho Review
sleepqueue: Remove kernel stack swapping support, part 10
- Remove kick_proc0(). - Make the return type of sleepq_broadcast(), sleepq_signal(), etc., void. - Fix up callers.
Tested by: pho Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46128
show more ...
|
#
d37286b9 |
| 29-Jul-2024 |
Mark Johnston <markj@FreeBSD.org> |
proc: Remove kernel stack swapping support, part 7
Remove some uses of PHOLD which were there only to prevent the process' threads from being swapped out.
Tested by: pho Reviewed by: imp, kib Diffe
proc: Remove kernel stack swapping support, part 7
Remove some uses of PHOLD which were there only to prevent the process' threads from being swapped out.
Tested by: pho Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D46118
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
c974c22a |
| 26-Jan-2022 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
Revert "LinuxKPI: Allow wake_up to be executed within a critical section"
This change was based on currently reverted commit 7dea0c9e6eba.
This reverts commit 89889ab470b9f1a1cd36913dd219b78efbf484
Revert "LinuxKPI: Allow wake_up to be executed within a critical section"
This change was based on currently reverted commit 7dea0c9e6eba.
This reverts commit 89889ab470b9f1a1cd36913dd219b78efbf484df.
show more ...
|
#
89889ab4 |
| 18-Jan-2022 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Allow wake_up to be executed within a critical section
by replaceing of spin_lock() call with spin_lock_irqsave()
This fixes following panic in drm-kmod:
panic: mi_switch: switch in a cr
LinuxKPI: Allow wake_up to be executed within a critical section
by replaceing of spin_lock() call with spin_lock_irqsave()
This fixes following panic in drm-kmod:
panic: mi_switch: switch in a critical section cpuid = 2 time = 1636939794 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b vpanic() at vpanic+0x187 panic() at panic+0x43 mi_switch() at mi_switch+0x198 __mtx_lock_sleep() at __mtx_lock_sleep+0x1c9 __mtx_lock_flags() at __mtx_lock_flags+0xa2 linux_wake_up() at linux_wake_up+0x38 __active_retire() at __active_retire+0xb7 dma_fence_signal() at dma_fence_signal+0x100 dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0x96 i915_gem_do_execbuffer() at i915_gem_do_execbuffer+0x11d0 i915_gem_execbuffer2_ioctl() at i915_gem_execbuffer2_ioctl+0x19a drm_ioctl_kernel() at drm_ioctl_kernel+0x72 drm_ioctl() at drm_ioctl+0x2c4 linux_file_ioctl() at linux_file_ioctl+0x297 kern_ioctl() at kern_ioctl+0x1dc sys_ioctl() at sys_ioctl+0x124 amd64_syscall() at amd64_syscall+0x124 fast_syscall_common() at fast_syscall_common+0xf8 --- syscall (54, FreeBSD ELF64, sys_ioctl)
MFC after: 1 week Reviewed by: manu Reported by: Graham Perrin <grahamperrin_AT_gmail_DOT_com> PR: 261166 Differential Revision: https://reviews.freebsd.org/D33888
show more ...
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
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 ...
|
#
2a3ec128 |
| 28-May-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Allow TASK_PARKED bit being set when going to sleep in the LinuxKPI.
Found by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies
|
#
2a1067a9 |
| 03-Apr-2018 |
Mark Johnston <markj@FreeBSD.org> |
Wrap long lines.
MFC after: 3 days
|
#
4b706099 |
| 30-Mar-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Optimise use of Giant in the LinuxKPI.
- Make sure Giant is locked when calling PCI device methods. Newbus currently requires this.
- Avoid unlocking Giant right before aquiring the sleepqueue lock
Optimise use of Giant in the LinuxKPI.
- Make sure Giant is locked when calling PCI device methods. Newbus currently requires this.
- Avoid unlocking Giant right before aquiring the sleepqueue lock. This can save a task switch.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
8f368d48 |
| 04-Mar-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement DEFINE_WAIT_FUNC() function macro and default_wake_function() in the LinuxKPI.
MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gmail.com> 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 <johalun0@gmail.com> Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks
show more ...
|
#
ccae7bb8 |
| 03-Mar-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Use mstosbt() instead of SBT_1MS in the LinuxKPI to get the last few bits of precision.
MFC after: 1 week Suggested by: ian@ Sponsored by: Mellanox Technologies
|
#
7cf1c515 |
| 03-Mar-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Implement msleep_interruptible() in the LinuxKPI. While at it use pause_sbt() instead of pause() in the msleep() function to avoid rounding errors when converting delay values forth and back. Add a g
Implement msleep_interruptible() in the LinuxKPI. While at it use pause_sbt() instead of pause() in the msleep() function to avoid rounding errors when converting delay values forth and back. Add a guard for a delay value of zero milliseconds which is undefined.
MFC after: 1 week Requested by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies
show more ...
|
#
94944062 |
| 22-Feb-2018 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Return correct error code to user-space when a system call receives a signal in the LinuxKPI.
The read(), write() and mmap() system calls can return either EINTR or ERESTART upon receiving a signal.
Return correct error code to user-space when a system call receives a signal in the LinuxKPI.
The read(), write() and mmap() system calls can return either EINTR or ERESTART upon receiving a signal. Add code to figure out the correct return value by temporarily storing the return code from the relevant FreeBSD kernel APIs in the Linux task structure.
MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
#
55b1c6e7 |
| 15-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325663 through r325841.
|
#
ef925749 |
| 11-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Remove release and acquire semantics when accessing the "state" field of the LinuxKPI task struct. Change type of "state" variable from "int" to "atomic_t" to simplify code and avoid unneccessary cas
Remove release and acquire semantics when accessing the "state" field of the LinuxKPI task struct. Change type of "state" variable from "int" to "atomic_t" to simplify code and avoid unneccessary casting.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
c2c014f2 |
| 07-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r323559 through r325504.
|
#
0a8f81bc |
| 22-Oct-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r324837
While here, diff reduce some of the changes in sys/boot by moving MK_COVERAGE=no to sys/boot/Makefile.inc .
|
#
9db0f8e7 |
| 13-Oct-2017 |
Mark Johnston <markj@FreeBSD.org> |
Make the PHOLD in linux_wait_event_common() unconditional.
After some in-progress work is committed, this would otherwise be the only instance of #if(n)def NO_SWAPPING in the tree. Moreover, the req
Make the PHOLD in linux_wait_event_common() unconditional.
After some in-progress work is committed, this would otherwise be the only instance of #if(n)def NO_SWAPPING in the tree. Moreover, the requisite opt_vm.h include was missing, so the PHOLD/PRELE calls were always being compiled in anyway.
MFC after: 1 week
show more ...
|
Revision tags: release/10.4.0 |
|
#
083c8ded |
| 13-Aug-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r322451
|
#
0275f9db |
| 11-Aug-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r321383 through r322397.
|
#
8ea44415 |
| 10-Aug-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Make sure the linux_wait_event_common() function in the LinuxKPI properly handles a timeout value of MAX_SCHEDULE_TIMEOUT which basically means there is no timeout. This is a regression issue after r
Make sure the linux_wait_event_common() function in the LinuxKPI properly handles a timeout value of MAX_SCHEDULE_TIMEOUT which basically means there is no timeout. This is a regression issue after r319757.
While at it change the type of returned variable from "long" to "int" to match the actual return type.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|