[PATCH v4 01/16] iommu/arm-smmu-v3: Make STE programming independent of the callers

Jason Gunthorpe jgg at nvidia.com
Wed Jan 31 06:40:19 PST 2024


On Wed, Jan 31, 2024 at 02:34:23PM +0000, Mostafa Saleh wrote:

> But arm_smmu_ste is defined based on STRTAB_STE_DWORDS. And this macro would
> never change as it is tied to the HW. However, in the future we can update
> “struct arm_smmu_ste” to hold a refcount for some reason,
> then sizeof(struct arm_smmu_ste) is not the size of the STE in the hardware.
> IMHO, any reference to the HW STE should be done using the macro.

We can't do anything like that. The arm_smmu_ste is a HW structure
that overlays the actual memory that the SMMU is DMA'ing from. It's
size and memory layout cannot be changed.

Jason



More information about the linux-arm-kernel mailing list