Page MenuHomeFreeBSD

D42186.id128725.diff
No OneTemporary

D42186.id128725.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);
@@ -103,6 +103,12 @@
&sc->dmat);
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)
+ bus_dma_tag_set_domain(sc->dmat, domain);
if ((sc->quirks & PCIE_CUSTOM_CONFIG_SPACE_QUIRK) == 0) {
rid = 0;

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 27, 8:58 PM (8 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32239493
Default Alt Text
D42186.id128725.diff (701 B)

Event Timeline