Page MenuHomeFreeBSD

D42186.id128818.diff
No OneTemporary

D42186.id128818.diff

diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -83,7 +83,7 @@
uint64_t phys_base;
uint64_t pci_base;
uint64_t size;
- int error;
+ int domain, error;
int rid, tuple;
sc = device_get_softc(dev);
@@ -104,6 +104,13 @@
if (error != 0)
return (error);
+ /*
+ * Attempt to set the domain. If it's missing, or we are unable to
+ * set it then memory allocations may be placed in the wrong domain.
+ */
+ if (bus_get_domain(dev, &domain) == 0)
+ (void)bus_dma_tag_set_domain(sc->dmat, domain);
+
if ((sc->quirks & PCIE_CUSTOM_CONFIG_SPACE_QUIRK) == 0) {
rid = 0;
sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 23, 7:24 PM (6 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32040703
Default Alt Text
D42186.id128818.diff (754 B)

Event Timeline