* [RESEND PATCH] iommu/rockchip: fix zap cache during device attach
@ 2016-06-01 15:46 John Keeping
2016-06-08 15:32 ` Heiko Stübner
0 siblings, 1 reply; 3+ messages in thread
From: John Keeping @ 2016-06-01 15:46 UTC (permalink / raw)
To: Joerg Roedel
Cc: Heiko Stuebner, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
stable-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, John Keeping,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
rk_iommu_command() takes a struct rk_iommu and iterates over the slave
MMUs, so this is doubly wrong in that we're passing in the wrong pointer
and talking to MMUs that we shouldn't be.
Fixes: cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves")
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: John Keeping <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
---
The original was sent just before the merge window [0]. The only
changes are to the commit message:
* add Cc: stable
* add Heiko's {Tested,Reviewed}-by
[0] http://article.gmane.org/gmane.linux.kernel.iommu/13556
drivers/iommu/rockchip-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index c7d6156ff536..25b4627cb57f 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -815,7 +815,7 @@ static int rk_iommu_attach_device(struct iommu_domain *domain,
dte_addr = virt_to_phys(rk_domain->dt);
for (i = 0; i < iommu->num_mmu; i++) {
rk_iommu_write(iommu->bases[i], RK_MMU_DTE_ADDR, dte_addr);
- rk_iommu_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
+ rk_iommu_base_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
rk_iommu_write(iommu->bases[i], RK_MMU_INT_MASK, RK_MMU_IRQ_MASK);
}
--
2.8.2.565.gdb84f68.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RESEND PATCH] iommu/rockchip: fix zap cache during device attach
2016-06-01 15:46 [RESEND PATCH] iommu/rockchip: fix zap cache during device attach John Keeping
@ 2016-06-08 15:32 ` Heiko Stübner
2016-06-15 10:03 ` Joerg Roedel
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stübner @ 2016-06-08 15:32 UTC (permalink / raw)
To: Joerg Roedel
Cc: linux-kernel, stable, linux-rockchip, iommu, John Keeping,
linux-arm-kernel
Hi Joerg,
Am Mittwoch, 1. Juni 2016, 16:46:10 schrieb John Keeping:
> rk_iommu_command() takes a struct rk_iommu and iterates over the slave
> MMUs, so this is doubly wrong in that we're passing in the wrong pointer
> and talking to MMUs that we shouldn't be.
>
> Fixes: cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves")
> Cc: stable@vger.kernel.org
> Signed-off-by: John Keeping <john@metanate.com>
> Tested-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
this definitly looks like material for 4.7-rc fixes to me. Could you take a look
and maybe include it?
Thanks
Heiko
> ---
> The original was sent just before the merge window [0]. The only
> changes are to the commit message:
>
> * add Cc: stable
> * add Heiko's {Tested,Reviewed}-by
>
> [0] http://article.gmane.org/gmane.linux.kernel.iommu/13556
>
> drivers/iommu/rockchip-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
> index c7d6156ff536..25b4627cb57f 100644
> --- a/drivers/iommu/rockchip-iommu.c
> +++ b/drivers/iommu/rockchip-iommu.c
> @@ -815,7 +815,7 @@ static int rk_iommu_attach_device(struct iommu_domain
> *domain, dte_addr = virt_to_phys(rk_domain->dt);
> for (i = 0; i < iommu->num_mmu; i++) {
> rk_iommu_write(iommu->bases[i], RK_MMU_DTE_ADDR, dte_addr);
> - rk_iommu_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
> + rk_iommu_base_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
> rk_iommu_write(iommu->bases[i], RK_MMU_INT_MASK, RK_MMU_IRQ_MASK);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RESEND PATCH] iommu/rockchip: fix zap cache during device attach
2016-06-08 15:32 ` Heiko Stübner
@ 2016-06-15 10:03 ` Joerg Roedel
0 siblings, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2016-06-15 10:03 UTC (permalink / raw)
To: Heiko Stübner
Cc: John Keeping, iommu, linux-arm-kernel, linux-rockchip,
linux-kernel, stable
On Wed, Jun 08, 2016 at 05:32:10PM +0200, Heiko Stübner wrote:
> this definitly looks like material for 4.7-rc fixes to me. Could you take a look
> and maybe include it?
Applied to my fixes branch, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-15 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 15:46 [RESEND PATCH] iommu/rockchip: fix zap cache during device attach John Keeping
2016-06-08 15:32 ` Heiko Stübner
2016-06-15 10:03 ` 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).