yes: Add missing header
This is a no-op on FreeBSD due to namespace pollution.
MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: cf74b63d61b4 ("yes: Completely overengineer")
pciconf: Add a tree mode
This lists PCI devices in a hierarchy showing the parent/child
relationship of PCI devices and bridges. While this is inspired by
lspci -t output, the format is closer to ps -d and also prefers using
new-bus device names when possible. If a device does not have a
driver, the PCI selector is output in place of the device name.
When the -v flag is given, the vendor and device ID strings are output
after the device name. If a string for an ID isn't found, the hex ID
values are output instead.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55774
pciconf.8: Reorganize slightly to handle additional modes
Move the description of the optional device argument earlier before
describing individual command modes.
Add a subsection for list mode and a second subsection for the other
modes that work with a single device.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55773
pciconf: Use the exported values of bus numbers for PCI bridges
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55772
pci: Export bus numbers for bridge devices in struct pci_conf
This exports bus information about bridges to userspace via the
less-privileged PCIOCGETCONF ioctl. Previously if userspace wished to
query this information, it had to use direct PCI config register
access which requires higher privilege.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55771
pci.4: Quote argument to -width for a list block
This fixes an mdoc warning and also properly indents this list. While
here, update the quoted argument to be the longest tag in the list.
Also while here, correct the description of pd_numa_domain. NUMA
domains are a property of the device, not of the driver.
Reviewed by: ziaee, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55770
pciconf: Use a single enum to track the current operation mode
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55769
pciconf: Factor out fetching of matching devices from list_devs
The new fetch_devs function fetches the entire list of PCI devices
into a single list, retrying if the list changes while it is being
fetched.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D55768
p9fs: use atomics for updating node->flags
This should prevent seeing inconsistent flags values when updating it
under the shared vnode lock.
Noted and reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55665
p9fs: locking improvements for p9fs_stat_vnode_dotl()
If the vnode is share-locked:
- Use vn_delayed_setsize() to avoid calling vnode_pager_setsize() with
the vnode only shared locked.
- Interlock the vnode to get exclusive mode for updating the node
fields.
Reciprocally, interlock the vnode in p9fs_getattr_dotl() to observe the
consistent values on read.
PR: 293492
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55665
vn_delayed_setsize(): post-commit review' changes
Handle doomed vnodes after LK_RETRY.
Rename the flag from VI_DELAYEDSSZ to VI_DELAYED_SETSIZE.
Change signature of vn_lock_delayed_setsize() to take flatten values
list instead of vop args structure.
__predict_true() for VI_DELAYED_SETSIZE not set.
Minor editings like removing tautological assert, and sorting items.
Noted by: markj
Fixes: 45117ffcd533ddf995f654db60b10899ae8370ec
Reviewed by: markj, rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55681