Skip to contentSkip to conversation

iommu/tegra-smmu: Change debugfs directory name

PATCH In review Dmitry Osipenko 2 participants 3 messages Jul 12, 2021 – Jul 14, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/tegra-smmu: Change debugfs directory name

Change debugfs directory name to "smmu", which is a much more obvious name than the generic name of the memory controller device-tree node.

---
 drivers/iommu/tegra-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/tegra-smmu.c +1 -1
index 0a281833f611..093c270b9245 100644
@@ -1141,7 +1141,7 @@ struct tegra_smmu *tegra_smmu_probe(struct device *dev,
 
 	tegra_smmu_ahb_enable();
 
-	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, dev_name(dev));
+	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, "smmu");
 	if (err)
 		return ERR_PTR(err);
 
Signature · 6 lines
2.32.0

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
maintainer
#1 lore raw

drivers/iommu/tegra-smmu.c struct tegra_smmu *tegra_smmu_probe(struct device *dev, · line 1144

Quoted 2 lines · Dmitry Osipenko
drivers/iommu/tegra-smmu.c +1 -1
-	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, dev_name(dev));
+	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, "smmu");

Are you sure no one is relying on the old name so that this change breaks ABI? Also this change means that there is always be only one SMMU per system. Is that guaranteed too?

Regards,

Joerg

#2 lore raw

14.07.2021 13:52, Joerg Roedel пишет:

Quoted 6 lines · Dmitry Osipenko

drivers/iommu/tegra-smmu.c struct tegra_smmu *tegra_smmu_probe(struct device *dev, · line 1144

Quoted 2 lines
drivers/iommu/tegra-smmu.c +1 -1
-	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, dev_name(dev));
+	err = iommu_device_sysfs_add(&smmu->iommu, dev, NULL, "smmu");

Are you sure no one is relying on the old name so that this change breaks ABI?

IIUC, Thierry and Jon have a testing suite that uses the old name, but it shouldn't be a problem to support the new name in addition to the old name since it's internal/private testing suite.

The reason I'm proposing this change is because it's not obvious where the SMMU debug is located when you look at the debugfs directory, it takes some effort to find it.

Quoted 2 lines

Also this change means that there is always be only one SMMU per system. Is that guaranteed too?

A single SMMU is guaranteed here. Only latest Tegra SoCs have two SMMUs and those are ARM SMMUs, while this is a legacy Tegra SMMU here.