]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iommu/tegra-smmu: Use non-secure register for flushing
authorNavneet Kumar <navneetk@nvidia.com>
Wed, 16 Oct 2019 11:50:24 +0000 (13:50 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 18 Oct 2019 09:46:11 +0000 (11:46 +0200)
Use PTB_ASID instead of SMMU_CONFIG to flush smmu.
PTB_ASID can be accessed from non-secure mode, SMMU_CONFIG cannot be.
Using SMMU_CONFIG could pose a problem when kernel doesn't have secure
mode access enabled from boot.

Signed-off-by: Navneet Kumar <navneetk@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/tegra-smmu.c

index 7293fc3f796d69f61f8cbe8a4ef3176d3b9ff5b0..0b74e17794b1b9b2191e146049dffe9371961e6f 100644 (file)
@@ -240,7 +240,7 @@ static inline void smmu_flush_tlb_group(struct tegra_smmu *smmu,
 
 static inline void smmu_flush(struct tegra_smmu *smmu)
 {
-       smmu_readl(smmu, SMMU_CONFIG);
+       smmu_readl(smmu, SMMU_PTB_ASID);
 }
 
 static int tegra_smmu_alloc_asid(struct tegra_smmu *smmu, unsigned int *idp)