vfs: rename vop_mmapped() to vop_update_atime()
This reflects the actual functionality of the VOP. While there, add the
explicit struct timespec argument for the VOP allowing the caller to set
specific atime, not just request an update for it.
Requested by: rmacklem
Reviewed by: rmacklem
Discussed with: jah
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57681
linuxkpi ioctl handler: restore the user data pointer
instead of trying to hack around it with LINUX_IOCTL_MIN_PTR. Since
linux file ioctl methods expect the user address in the data argument,
this should work for all ioctls, including the variable-length cases
like ibcore.
Only do it for the FreeBSD ABI, where we know how to reliably access the
original syscall arguments.
Reviewed by: Ariel Ehrenberg <aehrenberg at nvidia.com>, markj
Discussed with: zishun.yi.dev at gmail.com
Sponsored by: NVidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57612
ifconfig: Fix handling of unsupported -j option with MK_JAIL=no
The ifconfig(8) utility built with MK_JAIL=no does not support the
-j option. When the option is specified, Perror() is called without
setting errno, which can result in errno being reported as zero and
a misleading error message being displayed.
Also remove "[-j jail]" from the usage message when built with
MK_JAIL=no.
Event: Halifax Hackathon 202606
usb: Add missing mtx lock and unlock in pushing dma queue
Accessing usb_xfer_queue requires bus lock, we added this missing lock
in here to prevent racing issue.
Reviewed by: adrian
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57293
(cherry picked from commit df5e9e3da5b9b3fe63ed4aaaa19b824fd18ae0f2)
xhci: Do not drop and add bits in xhci
Drop and Add bits reset the data toggle for high-speed devices in XHCI.
The toggle bit represents the sequence number in USB 2.0 transfers. However,
a device can only recognize that the toggle bit has been reset while in
the HALT state. As a result, the host and device toggle values may
become mismatched, causing xHCI to reject the packet. This issue was
observed while testing the EZ-USB FX2 device.
The transfer may then return to the original value after a
bi-directional TD because the toggle field is only one bit wide. This
explains the reson that we can only receive packets bi-transfer in some
case. Therefore, we do not reset the toggle bit here.
Reviewed by: adrian
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57146
(cherry picked from commit 28d85db46b484589e2ee74cf4b270db066821de1)
libc: Use slow path in fenv in C++
C++ exposes cfenv functions via using ::func. Our name-mangling
mechanism rewrites all function calls causing symbols such as
std::feclearexcept to be transformed into std::__feclearexcept_int.
Since no such function exists, compilation fails.
The using ::feclearexpect declarations themselves are unaffected because
they are not function calls, which further exposes the mismatch
As a result, enable the fast path only for C and fall back to the slow
path in C++.
Reviewed by: kib
Fixes: 5bc64b7d417d
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57450
(cherry picked from commit 9c0489508695fde3bdd742edfd1b4b681aab4d19)
hwpstate_intel: Disable package control on hybrid CPU
In package control mode, the performance of all cores depends on the
most recent value written to the request field. If the last write comes
from an E-core, all cores are forced to align with the E-core
performance level, resulting in significant performance degradation.
Therefore, package control is disabled on hybrid-core systems.
Reviewed by: olce
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Framework Computer Inc
Differential Revision: https://reviews.freebsd.org/D57377
(cherry picked from commit 7b26353a59d66dc1bc611fd042a49b9e3bd13699)
xhci: Do not drop and add bits in xhci
Drop and Add bits reset the data toggle for high-speed devices in XHCI.
The toggle bit represents the sequence number in USB 2.0 transfers. However,
a device can only recognize that the toggle bit has been reset while in
the HALT state. As a result, the host and device toggle values may
become mismatched, causing xHCI to reject the packet. This issue was
observed while testing the EZ-USB FX2 device.
The transfer may then return to the original value after a
bi-directional TD because the toggle field is only one bit wide. This
explains the reson that we can only receive packets bi-transfer in some
case. Therefore, we do not reset the toggle bit here.
Reviewed by: adrian
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57146
(cherry picked from commit 28d85db46b484589e2ee74cf4b270db066821de1)
usb: Add missing mtx lock and unlock in pushing dma queue
Accessing usb_xfer_queue requires bus lock, we added this missing lock
in here to prevent racing issue.
Reviewed by: adrian
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57293
(cherry picked from commit df5e9e3da5b9b3fe63ed4aaaa19b824fd18ae0f2)
fusefs: proofread an error message in the tests
Reported by: otis
Fixes: 2c1482e3053 ("fusefs: fix a race in the pre-init tests")
MFC after: 2 weeks
Sponsored by: ConnectWise
sched_ule: sched_priority(): More accurate __unused annotation
Change a '__unused' to '__diagused', which is more precise for that use.
No functional change.
MFC after: 1 week
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
fusefs: fix a race in the pre-init tests
These tests allow the user to customize the INIT response. But it's
necessary to block the daemon's service loop from running until those
expectations have been set. This race has never caused failures before
simply due to luck. But now it's failing on slower platforms.
PR: 296236
Reported by: siva
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: siva
Differential Revision: https://reviews.freebsd.org/D57781