| Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
This a variant of `queue_work()` that takes a NUMA node as its first
argument.
The NUMA node is ignored and `queue_work()` is called.
The i915 DRM driver started to use this starting from Linux 6.8.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49377
|
|
Cancel a work not waiting for it to finish.
Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42811
|
|
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562
|
|
The rcu_work function helps to queue some work after waiting for a grace
period.
This is needed by DRM drivers.
Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24942
Notes:
svn path=/head/; revision=361343
|
|
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=351158
|
|
Tested by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=337376
|
|
in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
Notes:
svn path=/head/; revision=334664
|
|
Submitted by: Johannes Lundberg <johalun0@gmail.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
Notes:
svn path=/head/; revision=334663
|
|
Reviewed by: hselasky, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14807
Notes:
svn path=/head/; revision=331433
|
|
gets drained before invoking the work function. Else the timer
mutex may still be in use which can lead to use-after-free situations,
because the work function might free the work structure before returning.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=324278
|
|
initialize the declared work structure and not only the function callback
pointer.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=314971
|
|
This change makes the workqueue implementation behave more like in
Linux, both functionality wise and structure wise.
All workqueue code has been moved to linux_work.c
Add an atomic based statemachine to the work_struct to ensure proper
operation. Prior to this change struct_work was directly mapped to a
FreeBSD task. When a taskqueue has multiple threads the same task may
end up being executed on more than one worker thread simultaneously.
This might cause problems with code coming from Linux, which expects
serial behaviour, similar to Linux tasklets.
Move all global workqueue function names into the linux_xxx domain to
avoid symbol name clashes in the future.
Implement a few more workqueue related functions and macros.
Create two multithreaded taskqueues for the LinuxKPI during module
load, one for time-consuming callbacks and one for non-time consuming
callbacks.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=314843
|
|
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=292544
|
|
from taskqueue_enqueue() instead of reading "ta_pending" unlocked and
also ensure the callout is stopped before proceeding.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=292543
|
|
- Make some functions global instead of inline to ease debugging.
- Fix some minor style issues.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=292542
|
|
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=291481
|
|
- 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
Notes:
svn path=/head/; revision=290135
|