Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738854 > unrolled thread

[PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA

Started byYong Wu <yong.wu@mediatek.com>
First post2017-09-25 11:30 +0200
Last post2017-09-25 11:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA Yong Wu <yong.wu@mediatek.com> - 2017-09-25 11:30 +0200
    Re: [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no  QUIRK_NO_DMA Robin Murphy <robin.murphy@arm.com> - 2017-09-25 11:50 +0200

#1738854 — [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA

FromYong Wu <yong.wu@mediatek.com>
Date2017-09-25 11:30 +0200
Subject[PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA
Message-ID<utxSa-4rR-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1738864 — Re: [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA

FromRobin Murphy <robin.murphy@arm.com>
Date2017-09-25 11:50 +0200
SubjectRe: [PATCH] iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA
Message-ID<utybw-4yR-5@gated-at.bofh.it>
In reply to#1738854
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),
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web