pmcstat: Implement PMC_CAP_SYSWIDE
Implement the PMC_CAP_SYSWIDE capability flag in the same manner as the
PMC_CAP_DOMWIDE flag. This flag was previously introduced along side
the domain wide flag, but is yet to be used anywhere.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2075
libpmc: Query hwpmc for caps
This change allows for fine-grained capabilities per counter index. This
is particularly useful for AMD where subclasses are not exposed to the
general PMC code, but other architectures also have asymmetric behaviors
when it comes to specific counter indices.
A new PMC_OP_GETCAPS op is added to the hwpmc(4) ioctl interface.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2058
jevents: include file path in whitelist error message
A small enhancement.
Reviewed by: Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55830
vm_fault: expand KASSERT message in vm_fault_populate_cleanup
Include index values and object pointer in the diagnostic
to improve debugging of pindex mismatches.
No functional change.
Signed-off-by: Isa Isoux <isa at isoux.org>
Reviewed by: kib, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2038
queue.h: Reorder STAILQ_INSERT_TAIL
The current implementation briefly violates the tail invariant. This
is not usually an issue, but if an insert is in flight when a panic
occurs, we may then trip the invariant while dumping core.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: obiwac, olce, jhb
Differential Revision: https://reviews.freebsd.org/D55819
nvme: Replace bus_space_[read|write]_4 with bus_[read|write]_4
The goal this change is to remove the use of the tag and handle
needed by bus_space_[read|write]_4.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: gallatin, imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55818
nvme: Removed unused 'regs' variable
The private struct has a 'regs' member that's only written to
and otherwise unused. This change removes it.
Fixes: b3d9e5013f3e5 (Don't active memory space)
Requested by: jhb
Reviewed by: imp, jhb, jrtc27
Differential Revision: https://reviews.freebsd.org/D55817
ifnet: Remove unreachable code
The ioctls SIOCSIFVNET and SIOCSIFRVNET are for userland only. For
SIOCSIFVNET, if_vmove_loan(), the interface is obtained from current
VNET. For SIOCSIFRVNET, if_vmove_reclaim(), a valid child prison is
held before getting the interface. In both cases the VNET of the
obtained interfaces is stable, so there's no need to check it.
No functional change intended.
Reviewed by: glebius, jamie (for #jails)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55828
ifnet: Fix decreasing the vnet interface count
It should be decreased only when the interface has been successfully
removed from the "active" list.
This prevents vnet_if_return() from potential OOB writes to the
allocated memory "pending".
Reviewed by: kp, pouria
Fixes: a779388f8bb3 if: Protect V_ifnet in vnet_if_return()
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D55873
ure(4): Fix spurious link flaps from MII
A race condition in the MII layer causes spurious link down events.
In `statchg`, on link down, check if the PHY reports the link as
actually down using the BMSR register, if not, force the status of the
link to back up and restart TX. Do the same in a MII `linkchg` handler.
On actual link up, restart TX in case it went idle and down.
PR: 252165
Signed-off-by: Rafael Kitover <rkitover at gmail.com>
Reviewed by: pouria
Differential Revision: https://reviews.freebsd.org/D55682
crypto_request.9: Fix typo on crypto_initreq arguments
The function signature of `crypto_initreq()` was
incorrectly documented.
Signed-off-by: Zixu Wu <zx at bv3.dev>
Reviewed by: ziaee, pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2077
zfs: Fix build after merge of openzfs/zfs at f8e5af53e
The change causing it is the introduction of the test over __BMI2__ in
'module/zstd/lib/common/bitstream.h'.
This is a stop-gap commit whose content needs to be upstreamed (after
possibly having been improved).
Fixes: 8a62a2a5659d ("zfs: merge openzfs/zfs at f8e5af53e")
Sponsored by: The FreeBSD Foundation
rge: use C style comments instead of C++
FreeBSD style(9) mandates C style comments. The initial import from
OpenBSD left several C++ style // comments in if_rge.c and if_rgevar.h.
Replace them with proper /* */ comments.
Also fix a malformed comment that mixed // with a closing */.
Signed-off-by: Christos Longros <chris.longros at gmail.com>
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D55743
Revert "bsd.own.mk: Deorbit compat include of bsd.compiler.mk"
This reverts commit 0bebad8d072bb7abef1cea0d8c8d04d500913adf.
It might be that all that's needed to fix this is to add
".include <bsd.compiler.mk>" to some Makefiles. I'll look into it soon
but for now let's unbreak HEAD.
Approved by: bnovkov (mentor)
Differential Revision: https://reviews.freebsd.org/D55869
backlight.8: Fix typo in man
Increment and decrement where swapped.
Signed-off-by: Salman Sarray <salman at sarray.de>
Reviewed by: ziaee, Christos Longros <chris.longros at gmail.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2072
rtlbtfw(8): Add support for Realtek 8852CE
Add the USB Vendor/Product ID (0x13d3:0x3612) for
the new Realtek 8852CE drive to make sure it works.
Signed-off-by: Ying Xu <fakeshadow1337 at gmail.com>
Reviewed by: pouria, wulf
Pull Request: https://github.com/freebsd/freebsd-src/pull/2071
bsd.own.mk: Deorbit compat include of bsd.compiler.mk
Commit b946bedd09d3bd1 ("Previous versions of bsd.own.mk [...]")
mentions that bsd.own.mk included bsd.compiler.mk as a temporary
workaround and was destined to be removed in FreeBSD 12. Do that now.
PR: 203540
Reviewed by: bnovkov, imp
Approved by: bnovkov (mentor)
Differential Revision: https://reviews.freebsd.org/D55867