* [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
@ 2012-11-28 13:52 Hiroshi Doyu
[not found] ` <1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Hiroshi Doyu @ 2012-11-28 13:52 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA
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().
Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/tegra-smmu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 4167863..46f5712 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -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,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] iommu/tegra: gart: Move bus_set_iommu after probe for multi arch
[not found] ` <1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-11-28 13:52 ` Hiroshi Doyu
2012-11-28 13:52 ` [PATCH 3/3] iommu/tegra: smmu: " Hiroshi Doyu
2012-11-28 19:40 ` [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all Joerg Roedel
2 siblings, 0 replies; 5+ messages in thread
From: Hiroshi Doyu @ 2012-11-28 13:52 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Hiroshi Doyu
For a single image to support multiple SoCs(GART/SMMU).
Reported-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/tegra-gart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index c16e8fc..4c9db62 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -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);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
[not found] ` <1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-28 13:52 ` [PATCH 2/3] iommu/tegra: gart: Move bus_set_iommu after probe for multi arch Hiroshi Doyu
@ 2012-11-28 13:52 ` Hiroshi Doyu
[not found] ` <1354110775-11810-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-28 19:40 ` [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all Joerg Roedel
2 siblings, 1 reply; 5+ messages in thread
From: Hiroshi Doyu @ 2012-11-28 13:52 UTC (permalink / raw)
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA
For a single image to support multiple SoCs(GART/SMMU).
Reported-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/tegra-smmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 46f5712..608185b 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -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);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
[not found] ` <1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-28 13:52 ` [PATCH 2/3] iommu/tegra: gart: Move bus_set_iommu after probe for multi arch Hiroshi Doyu
2012-11-28 13:52 ` [PATCH 3/3] iommu/tegra: smmu: " Hiroshi Doyu
@ 2012-11-28 19:40 ` Joerg Roedel
2 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2012-11-28 19:40 UTC (permalink / raw)
To: Hiroshi Doyu
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
On Wed, Nov 28, 2012 at 03:52:53PM +0200, Hiroshi Doyu wrote:
> 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().
>
> Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
[not found] ` <1354110775-11810-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-11-30 5:07 ` Mark Zhang
0 siblings, 0 replies; 5+ messages in thread
From: Mark Zhang @ 2012-11-30 5:07 UTC (permalink / raw)
To: Hiroshi Doyu
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
joro-zLv9SwRftAIdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA
On 11/28/2012 09:52 PM, Hiroshi Doyu wrote:
> 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
> Reported-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/iommu/tegra-smmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
> index 46f5712..608185b 100644
> --- a/drivers/iommu/tegra-smmu.c
> +++ b/drivers/iommu/tegra-smmu.c
> @@ -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);
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-30 5:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 13:52 [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all Hiroshi Doyu
[not found] ` <1354110775-11810-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-28 13:52 ` [PATCH 2/3] iommu/tegra: gart: Move bus_set_iommu after probe for multi arch Hiroshi Doyu
2012-11-28 13:52 ` [PATCH 3/3] iommu/tegra: smmu: " Hiroshi Doyu
[not found] ` <1354110775-11810-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-30 5:07 ` Mark Zhang
2012-11-28 19:40 ` [PATCH 1/3] iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).