Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139997274
D39181.id119194.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39181.id119194.diff
View Options
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
@@ -1829,22 +1829,14 @@
smmu_pci_get_sid_fdt(device_t child, u_int *xref0, u_int *sid0)
{
struct pci_id_ofw_iommu pi;
- uint64_t base, size;
- phandle_t node;
- u_int xref;
int err;
err = pci_get_id(child, PCI_ID_OFW_IOMMU, (uintptr_t *)&pi);
if (err == 0) {
- /* Our xref is memory base address. */
- node = OF_node_from_xref(pi.xref);
- fdt_regsize(node, &base, &size);
- xref = base;
-
if (sid0)
*sid0 = pi.id;
if (xref0)
- *xref0 = xref;
+ *xref0 = pi.xref;
}
return (err);
diff --git a/sys/arm64/iommu/smmu_fdt.c b/sys/arm64/iommu/smmu_fdt.c
--- a/sys/arm64/iommu/smmu_fdt.c
+++ b/sys/arm64/iommu/smmu_fdt.c
@@ -168,7 +168,7 @@
LIST_INIT(&unit->domain_list);
/* Use memory start address as an xref. */
- sc->xref = bus_get_resource_start(dev, SYS_RES_MEMORY, 0);
+ sc->xref = OF_xref_from_node(node);
err = iommu_register(iommu);
if (err) {
@@ -176,7 +176,7 @@
return (ENXIO);
}
- OF_device_register_xref(OF_xref_from_node(node), dev);
+ OF_device_register_xref(sc->xref, dev);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 19, 7:38 PM (12 m, 14 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27086728
Default Alt Text
D39181.id119194.diff (1 KB)
Attached To
Mode
D39181: arm64: Clean up smmu fdt xref handling
Attached
Detach File
Event Timeline
Log In to Comment