Page MenuHomeFreeBSD

D35487.diff
No OneTemporary

D35487.diff

diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c
--- a/sys/dev/iommu/busdma_iommu.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -594,7 +594,7 @@
if (seg + 1 < tag->common.nsegments)
gas_flags |= IOMMU_MF_CANSPLIT;
- error = iommu_map(domain, &tag->common, buflen1,
+ error = iommu_gas_map(domain, &tag->common, buflen1,
offset, e_flags, gas_flags, ma + idx, &entry);
if (error != 0)
break;
@@ -1046,7 +1046,7 @@
map = (struct bus_dmamap_iommu *)map1;
waitok = (flags & BUS_DMA_NOWAIT) != 0;
- entry = iommu_map_alloc_entry(domain, waitok ? 0 : IOMMU_PGF_WAITOK);
+ entry = iommu_gas_alloc_entry(domain, waitok ? 0 : IOMMU_PGF_WAITOK);
if (entry == NULL)
return (ENOMEM);
entry->start = start;
@@ -1054,14 +1054,14 @@
ma = malloc(sizeof(vm_page_t) * atop(length), M_TEMP, waitok ?
M_WAITOK : M_NOWAIT);
if (ma == NULL) {
- iommu_map_free_entry(domain, entry);
+ iommu_gas_free_entry(domain, entry);
return (ENOMEM);
}
for (i = 0; i < atop(length); i++) {
ma[i] = vm_page_getfake(entry->start + PAGE_SIZE * i,
VM_MEMATTR_DEFAULT);
}
- error = iommu_map_region(domain, entry, IOMMU_MAP_ENTRY_READ |
+ error = iommu_gas_map_region(domain, entry, IOMMU_MAP_ENTRY_READ |
((flags & BUS_DMA_NOWRITE) ? 0 : IOMMU_MAP_ENTRY_WRITE),
waitok ? IOMMU_MF_CANWAIT : 0, ma);
if (error == 0) {
diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h
--- a/sys/dev/iommu/iommu.h
+++ b/sys/dev/iommu/iommu.h
@@ -162,14 +162,6 @@
device_t iommu_get_requester(device_t dev, uint16_t *rid);
int iommu_init_busdma(struct iommu_unit *unit);
void iommu_fini_busdma(struct iommu_unit *unit);
-struct iommu_map_entry *iommu_map_alloc_entry(struct iommu_domain *iodom,
- u_int flags);
-void iommu_map_free_entry(struct iommu_domain *, struct iommu_map_entry *);
-int iommu_map(struct iommu_domain *iodom,
- const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset,
- u_int eflags, u_int flags, vm_page_t *ma, struct iommu_map_entry **res);
-int iommu_map_region(struct iommu_domain *domain,
- struct iommu_map_entry *entry, u_int eflags, u_int flags, vm_page_t *ma);
void iommu_gas_init_domain(struct iommu_domain *domain);
void iommu_gas_fini_domain(struct iommu_domain *domain);
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c
--- a/sys/dev/iommu/iommu_gas.c
+++ b/sys/dev/iommu/iommu_gas.c
@@ -799,36 +799,6 @@
return (error);
}
-struct iommu_map_entry *
-iommu_map_alloc_entry(struct iommu_domain *domain, u_int flags)
-{
- struct iommu_map_entry *res;
-
- res = iommu_gas_alloc_entry(domain, flags);
-
- return (res);
-}
-
-void
-iommu_map_free_entry(struct iommu_domain *domain, struct iommu_map_entry *entry)
-{
-
- iommu_gas_free_entry(domain, entry);
-}
-
-int
-iommu_map(struct iommu_domain *domain,
- const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset,
- u_int eflags, u_int flags, vm_page_t *ma, struct iommu_map_entry **res)
-{
- int error;
-
- error = iommu_gas_map(domain, common, size, offset, eflags, flags,
- ma, res);
-
- return (error);
-}
-
void
iommu_unmap_msi(struct iommu_ctx *ctx)
{
@@ -917,17 +887,6 @@
__func__, (uintmax_t)*addr, (uintmax_t)domain->msi_entry->end));
}
-int
-iommu_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry,
- u_int eflags, u_int flags, vm_page_t *ma)
-{
- int error;
-
- error = iommu_gas_map_region(domain, entry, eflags, flags, ma);
-
- return (error);
-}
-
SYSCTL_NODE(_hw, OID_AUTO, iommu, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "");
#ifdef INVARIANTS

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 6:37 PM (21 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14683268
Default Alt Text
D35487.diff (3 KB)

Event Timeline