iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
Subsystems (3)
PATCH 1/3 iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
smmu_flush_regs() does TLB/PTC flush all when freeing a second level page table. This isn't necessay at all since each pte entry has been already maintained by address in the above flush_ptc_and_tlb().
--- drivers/iommu/tegra-smmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iommu/tegra-smmu.c +1 -3
@@ -694,10 +694,8 @@ static void __smmu_iommu_unmap(struct smmu_as *as, dma_addr_t iova) *pte =_PTE_VACANT (iova);FLUSH_CPU_DCACHE (pte, page,sizeof (*pte));flush_ptc_and_tlb (as->smmu, as, iova, pte, page,0 ); -if (!--(*count)) { +if (!--(*count))free_ptbl (as, iova); -smmu_flush_regs (as->smmu,0 ); - } } static void __smmu_iommu_map_pfn(struct smmu_as *as, dma_addr_t iova,
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): 1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
PATCH 2/3 iommu/tegra: gart: Move bus_set_iommu after probe for multi arch
For a single image to support multiple SoCs(GART/SMMU).
--- drivers/iommu/tegra-gart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/tegra-gart.c +1 -1
@@ -398,6 +398,7 @@ static int tegra_gart_probe(struct platform_device *pdev)do_gart_setup (gart,NULL ); gart_handle = gart; +bus_set_iommu (&platform_bus_type, &gart_iommu_ops);return 0 ; fail:
@@ -450,7 +451,6 @@ static struct platform_driver tegra_gart_driver = {static int __devinit tegra_gart_init (void ) { -bus_set_iommu (&platform_bus_type, &gart_iommu_ops);return platform_driver_register (&tegra_gart_driver); }
Signature · 1 line
1.7.9.5
PATCH 3/3 iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
In reply to a message not in the archiveFor a single image to support multiple SoCs(GART/SMMU).
--- drivers/iommu/tegra-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/tegra-smmu.c +1 -1
@@ -1229,6 +1229,7 @@ static int tegra_smmu_probe(struct platform_device *pdev)smmu_debugfs_create (smmu); smmu_handle = smmu; +bus_set_iommu (&platform_bus_type, &smmu_iommu_ops);return 0 ; }
@@ -1273,7 +1274,6 @@ static struct platform_driver tegra_smmu_driver = {static int __devinit tegra_smmu_init (void ) { -bus_set_iommu (&platform_bus_type, &smmu_iommu_ops);return platform_driver_register (&tegra_smmu_driver); }
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): 1354110775-11810-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Re: [PATCH 3/3] iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
Quoted 2 lines · Hiroshi Doyu
For a single image to support multiple SoCs(GART/SMMU).
To be honest, I didn't get why we need to move "bus_set_iommu" to probe func. So could you add more words in the commit message? Same with tegra-gart.c.
Mark
Quoted 27 lines
Reported-by Arto Merilainen <[email protected]>Signed-off-by Hiroshi Doyu <[email protected]>--- drivers/iommu/tegra-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iommu/tegra-smmu.c +1
-1@@ -1229,6 +1229,7 @@ static int tegra_smmu_probe(struct platform_device *pdev)smmu_debugfs_create (smmu); smmu_handle = smmu; +bus_set_iommu (&platform_bus_type, &smmu_iommu_ops);return 0 ; }@@ -1273,7 +1274,6 @@ static struct platform_driver tegra_smmu_driver = {static int __devinit tegra_smmu_init (void ) { -bus_set_iommu (&platform_bus_type, &smmu_iommu_ops);return platform_driver_register (&tegra_smmu_driver); }
Joerg Roedel
AppliedQuoted 5 lines · Hiroshi Doyu
smmu_flush_regs()does TLB/PTC flush all when freeing a second level page table. This isn't necessay at all since each pte entry has been already maintained by address in the aboveflush_ptc_and_tlb().Signed-off-by Hiroshi Doyu <[email protected]>
Applied, thanks.