summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2015-09-16 23:34:51 +0000
committerzbb <zbb@FreeBSD.org>2015-09-16 23:34:51 +0000
commit95f13176f56de2d56ebb014bf8b5d39de209c08a (patch)
tree2bf6705f8c0a23d33a95bffbd3241b047662100a /sys/x86
parent76309d54d25ceab92ba6484b52eb4a0fd488cfc0 (diff)
downloadFreeBSD-src-95f13176f56de2d56ebb014bf8b5d39de209c08a.zip
FreeBSD-src-95f13176f56de2d56ebb014bf8b5d39de209c08a.tar.gz
Add domain support to PCI bus allocation
When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains. Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/pci/pci_bus.c2
-rw-r--r--sys/x86/pci/qpi.c2
-rw-r--r--sys/x86/x86/mptable_pci.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c
index f64659e..821265d 100644
--- a/sys/x86/pci/pci_bus.c
+++ b/sys/x86/pci/pci_bus.c
@@ -524,7 +524,7 @@ legacy_pcib_attach(device_t dev)
device_probe_and_attach(pir);
}
#endif
- device_add_child(dev, "pci", bus);
+ device_add_child(dev, "pci", -1);
return bus_generic_attach(dev);
}
diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c
index ae29daa..2650986 100644
--- a/sys/x86/pci/qpi.c
+++ b/sys/x86/pci/qpi.c
@@ -218,7 +218,7 @@ static int
qpi_pcib_attach(device_t dev)
{
- device_add_child(dev, "pci", pcib_get_bus(dev));
+ device_add_child(dev, "pci", -1);
return (bus_generic_attach(dev));
}
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
index 3e2c1cb..31165ae 100644
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -69,7 +69,7 @@ mptable_hostb_attach(device_t dev)
#ifdef NEW_PCIB
mptable_pci_host_res_init(dev);
#endif
- device_add_child(dev, "pci", pcib_get_bus(dev));
+ device_add_child(dev, "pci", -1);
return (bus_generic_attach(dev));
}
OpenPOWER on IntegriCloud