svn commit: r361532 - in head/sys: dev/acpica dev/pci x86/iommu
Ruslan Bukin
br at FreeBSD.org
Tue May 26 16:40:41 UTC 2020
Author: br
Date: Tue May 26 16:40:40 2020
New Revision: 361532
URL: https://svnweb.freebsd.org/changeset/base/361532
Log:
Rename dmar_get_dma_tag() to acpi_iommu_get_dma_tag().
This is needed for a new IOMMU controller support.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D24943
Modified:
head/sys/dev/acpica/acpi_pci.c
head/sys/dev/pci/pci.c
head/sys/x86/iommu/busdma_dmar.c
head/sys/x86/iommu/busdma_dmar.h
Modified: head/sys/dev/acpica/acpi_pci.c
==============================================================================
--- head/sys/dev/acpica/acpi_pci.c Tue May 26 16:14:21 2020 (r361531)
+++ head/sys/dev/acpica/acpi_pci.c Tue May 26 16:40:40 2020 (r361532)
@@ -456,15 +456,15 @@ acpi_pci_detach(device_t dev)
}
#ifdef ACPI_DMAR
-bus_dma_tag_t dmar_get_dma_tag(device_t dev, device_t child);
+bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child);
static bus_dma_tag_t
acpi_pci_get_dma_tag(device_t bus, device_t child)
{
bus_dma_tag_t tag;
if (device_get_parent(child) == bus) {
- /* try dmar and return if it works */
- tag = dmar_get_dma_tag(bus, child);
+ /* try iommu and return if it works */
+ tag = acpi_iommu_get_dma_tag(bus, child);
} else
tag = NULL;
if (tag == NULL)
Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c Tue May 26 16:14:21 2020 (r361531)
+++ head/sys/dev/pci/pci.c Tue May 26 16:40:40 2020 (r361532)
@@ -5682,7 +5682,7 @@ pci_get_resource_list (device_t dev, device_t child)
}
#ifdef ACPI_DMAR
-bus_dma_tag_t dmar_get_dma_tag(device_t dev, device_t child);
+bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child);
bus_dma_tag_t
pci_get_dma_tag(device_t bus, device_t dev)
{
@@ -5690,8 +5690,8 @@ pci_get_dma_tag(device_t bus, device_t dev)
struct pci_softc *sc;
if (device_get_parent(dev) == bus) {
- /* try dmar and return if it works */
- tag = dmar_get_dma_tag(bus, dev);
+ /* try iommu and return if it works */
+ tag = acpi_iommu_get_dma_tag(bus, dev);
} else
tag = NULL;
if (tag == NULL) {
Modified: head/sys/x86/iommu/busdma_dmar.c
==============================================================================
--- head/sys/x86/iommu/busdma_dmar.c Tue May 26 16:14:21 2020 (r361531)
+++ head/sys/x86/iommu/busdma_dmar.c Tue May 26 16:40:40 2020 (r361532)
@@ -269,7 +269,7 @@ dmar_instantiate_ctx(struct dmar_unit *dmar, device_t
}
bus_dma_tag_t
-dmar_get_dma_tag(device_t dev, device_t child)
+acpi_iommu_get_dma_tag(device_t dev, device_t child)
{
struct dmar_unit *dmar;
struct dmar_ctx *ctx;
Modified: head/sys/x86/iommu/busdma_dmar.h
==============================================================================
--- head/sys/x86/iommu/busdma_dmar.h Tue May 26 16:14:21 2020 (r361531)
+++ head/sys/x86/iommu/busdma_dmar.h Tue May 26 16:40:40 2020 (r361532)
@@ -62,6 +62,6 @@ struct bus_dmamap_dmar {
extern struct bus_dma_impl bus_dma_dmar_impl;
-bus_dma_tag_t dmar_get_dma_tag(device_t dev, device_t child);
+bus_dma_tag_t acpi_iommu_get_dma_tag(device_t dev, device_t child);
#endif
More information about the svn-src-all
mailing list