mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA
@ 2017-09-25  9:28 Yong Wu
  2017-09-25  9:47 ` Robin Murphy
  2017-09-27 14:56 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Yong Wu @ 2017-09-25  9:28 UTC (permalink / raw)
  To: Robin Murphy, Joerg Roedel
  Cc: Will Deacon, linux-mediatek, srv_heupstream, linux-kernel,
	linux-arm-kernel, iommu, yong.wu

Fix the commit 81b3c2521844 ("iommu/io-pgtable: Introduce explicit
coherency"). If there is no IO_PGTABLE_QUIRK_NO_DMA, we should call
dma_sync_single_for_device for cache synchronization.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
---
Rebased on v4.14-rc1.
---
 drivers/iommu/io-pgtable-arm-v7s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index d665d0d..6961fc3 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -245,7 +245,7 @@ static void __arm_v7s_free_table(void *table, int lvl,
 static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries,
 			       struct io_pgtable_cfg *cfg)
 {
-	if (!(cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA))
+	if (cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA)
 		return;
 
 	dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep),
-- 
1.8.1.1.dirty

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA
  2017-09-25  9:28 [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA Yong Wu
@ 2017-09-25  9:47 ` Robin Murphy
  2017-09-27 14:56 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2017-09-25  9:47 UTC (permalink / raw)
  To: Yong Wu, Joerg Roedel
  Cc: Will Deacon, linux-mediatek, srv_heupstream, linux-kernel,
	linux-arm-kernel, iommu

On 25/09/17 10:28, Yong Wu wrote:
> Fix the commit 81b3c2521844 ("iommu/io-pgtable: Introduce explicit
> coherency"). If there is no IO_PGTABLE_QUIRK_NO_DMA, we should call
> dma_sync_single_for_device for cache synchronization.

Oops!

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

Thanks,
Robin.

> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> ---
> Rebased on v4.14-rc1.
> ---
>  drivers/iommu/io-pgtable-arm-v7s.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
> index d665d0d..6961fc3 100644
> --- a/drivers/iommu/io-pgtable-arm-v7s.c
> +++ b/drivers/iommu/io-pgtable-arm-v7s.c
> @@ -245,7 +245,7 @@ static void __arm_v7s_free_table(void *table, int lvl,
>  static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries,
>  			       struct io_pgtable_cfg *cfg)
>  {
> -	if (!(cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA))
> +	if (cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA)
>  		return;
>  
>  	dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep),
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA
  2017-09-25  9:28 [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA Yong Wu
  2017-09-25  9:47 ` Robin Murphy
@ 2017-09-27 14:56 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2017-09-27 14:56 UTC (permalink / raw)
  To: Yong Wu
  Cc: Robin Murphy, Will Deacon, linux-mediatek, srv_heupstream,
	linux-kernel, linux-arm-kernel, iommu

On Mon, Sep 25, 2017 at 05:28:47PM +0800, Yong Wu wrote:
> Fix the commit 81b3c2521844 ("iommu/io-pgtable: Introduce explicit
> coherency"). If there is no IO_PGTABLE_QUIRK_NO_DMA, we should call
> dma_sync_single_for_device for cache synchronization.
> 
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>

Applied to iommu/fixes, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-27 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25  9:28 [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA Yong Wu
2017-09-25  9:47 ` Robin Murphy
2017-09-27 14:56 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®