RE: [PATCH 3/7] iommu/arm-smmu: Add tlb_sync implementation hook

Krishna Reddy
2019-08-30T19:01:26Z

>Wouldn't it work if you replaced all calls of __arm_smmu_tlb_sync() by
>smmu->impl->tlb_sync() and assign __arm_smmu_tlb_sync() as default for
>devices that don't need to override it? That makes this patch slightly larger, but it saves us one level of indirection.

The tlb_ops->tlb_sync can be overridden directly in arm-smmu-nvidia.c specific implementation as pointed by Robin. Will be updating in next patch.

>> + void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
>> + int status);

>Can't page, sync and status all be unsigned?

This is to be uniform with original tlb_sync definition is arm-smmu.c. Anyway, this hook is not necessary as tlb_ops->tlb_sync can be overridden directly.

-KR