Hi Will, Current ASID/VMID calculation logic makes lot of assumption about internal TLB implementation of SMMU, Systems like ThunderX have more than one smmu in the system and it can use same TLBs with more than one of them and expects ASID to be unique
Current logic #define ARM_SMMU_CB_ASID(cfg) ((cfg)->cbndx) #define ARM_SMMU_CB_VMID(cfg) ((cfg)->cbndx + 1) Can this be replaced by something like #define ARM_SMMU_CB_ASID(cfg, smmu) (((smmu)->idx << (smmu)->asid_shift) | (cfg)->cbndx) #define ARM_SMMU_CB_VMID(cfg, smmu) (((smmu)->idx << (smmu)->vmid_shift) | (cfg)->cbndx + 1) Idx and shift can be passed from device-tree. Please let me know if this is acceptable, I will prepare a proper patch and send to list. If this is not acceptable through an alternative suggestion. Thanks, Tirumalesh.
_______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu