Page MenuHomeFreeBSD

D44289.id140519.diff
No OneTemporary

D44289.id140519.diff

diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4
--- a/share/man/man4/pci.4
+++ b/share/man/man4/pci.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 4, 2022
+.Dd March 17, 2024
.Dt PCI 4
.Os
.Sh NAME
@@ -235,6 +235,8 @@
Driver name.
.It pd_unit
Driver unit number.
+.It pd_numa_domain
+Driver NUMA domain.
.El
.It offset
The offset is passed in by the user to tell the kernel where it should
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -79,6 +79,7 @@
u_int8_t pc_revid; /* chip revision ID */
char pd_name[PCI_MAXNAMELEN + 1]; /* device name */
u_int32_t pd_unit; /* device unit number */
+ int pd_numa_domain; /* device NUMA domain */
};
struct pci_match_conf32 {
@@ -796,6 +797,7 @@
strlcpy(pcup->pc32.pd_name, pcp->pd_name,
sizeof(pcup->pc32.pd_name));
pcup->pc32.pd_unit = (uint32_t)pcp->pd_unit;
+ pcup->pc32.pd_numa_domain = pcp->pd_numa_domain;
return;
#endif
@@ -1024,7 +1026,7 @@
struct pci_map *pm;
struct pci_bar_mmap *pbm;
size_t confsz, iolen;
- int error, ionum, i, num_patterns;
+ int domain, error, ionum, i, num_patterns;
union pci_conf_union pcu;
#ifdef PRE7_COMPAT
struct pci_io iodata;
@@ -1201,6 +1203,12 @@
dinfo->conf.pd_unit = 0;
}
+ if (dinfo->cfg.dev != NULL &&
+ bus_get_domain(dinfo->cfg.dev, &domain) == 0)
+ dinfo->conf.pd_numa_domain = domain;
+ else
+ dinfo->conf.pd_numa_domain = 0;
+
if (pattern_buf == NULL ||
pci_conf_match(cmd, pattern_buf, num_patterns,
&dinfo->conf) == 0) {
diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h
--- a/sys/sys/pciio.h
+++ b/sys/sys/pciio.h
@@ -77,6 +77,7 @@
u_int8_t pc_revid; /* chip revision ID */
char pd_name[PCI_MAXNAMELEN + 1]; /* device name */
u_long pd_unit; /* device unit number */
+ int pd_numa_domain; /* device NUMA domain */
};
struct pci_match_conf {

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 10:05 AM (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33243394
Default Alt Text
D44289.id140519.diff (1 KB)

Event Timeline