Page MenuHomeFreeBSD

D39183.id119196.diff
No OneTemporary

D39183.id119196.diff

diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c
--- a/sys/arm64/iommu/smmu.c
+++ b/sys/arm64/iommu/smmu.c
@@ -1799,34 +1799,8 @@
return (0);
}
-#ifdef DEV_ACPI
static int
-smmu_pci_get_sid_acpi(device_t child, u_int *xref0, u_int *sid0)
-{
- uint16_t rid;
- u_int xref;
- int seg;
- int err;
- int sid;
-
- seg = pci_get_domain(child);
- rid = pci_get_rid(child);
-
- err = acpi_iort_map_pci_smmuv3(seg, rid, &xref, &sid);
- if (err == 0) {
- if (sid0)
- *sid0 = sid;
- if (xref0)
- *xref0 = xref;
- }
-
- return (err);
-}
-#endif
-
-#ifdef FDT
-static int
-smmu_pci_get_sid_fdt(device_t child, u_int *xref0, u_int *sid0)
+smmu_pci_get_sid(device_t child, u_int *xref0, u_int *sid0)
{
struct pci_id_ofw_iommu pi;
int err;
@@ -1841,7 +1815,6 @@
return (err);
}
-#endif
static struct iommu_ctx *
smmu_ctx_alloc(device_t dev, struct iommu_domain *iodom, device_t child,
@@ -1885,11 +1858,7 @@
pci_class = devclass_find("pci");
if (device_get_devclass(device_get_parent(ctx->dev)) == pci_class) {
-#ifdef DEV_ACPI
- err = smmu_pci_get_sid_acpi(ctx->dev, NULL, &sid);
-#else
- err = smmu_pci_get_sid_fdt(ctx->dev, NULL, &sid);
-#endif
+ err = smmu_pci_get_sid(ctx->dev, NULL, &sid);
if (err)
return (err);
@@ -2000,11 +1969,7 @@
sc = device_get_softc(dev);
-#ifdef DEV_ACPI
- err = smmu_pci_get_sid_acpi(child, &xref, NULL);
-#else
- err = smmu_pci_get_sid_fdt(child, &xref, NULL);
-#endif
+ err = smmu_pci_get_sid(child, &xref, NULL);
if (err)
return (ENOENT);

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 20, 10:55 AM (30 m, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25722047
Default Alt Text
D39183.id119196.diff (1 KB)

Event Timeline