[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1542786115.18775.83.camel@atviedlbe741.rss.d3s.at.thales>
Date: Wed, 21 Nov 2018 07:42:49 +0000
From: JABLONSKY Jan <Jan.JABLONSKY@...lesgroup.com>
To: Jaehoon Chung <jh80.chung@...sung.com>
CC: Ulf Hansson <ulf.hansson@...aro.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: dw_mmc: IDMAC Invalidate cache after read
CPU may not see most up-to-date and correct copy of DMA buffer, when
internal DMA controller is in use.
Problem appears on The Altera SoC FPGA (uses integrated DMA controller),
during higher CPU and system memory load
Signed-off-by: Jan Jablonsky <jan.jablonsky@...lesgroup.com>
---
drivers/mmc/host/dw_mmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 80dc2fd..63873d9 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -499,8 +499,7 @@ static void dw_mci_dmac_complete_dma(void *arg)
dev_vdbg(host->dev, "DMA complete\n");
- if ((host->use_dma == TRANS_MODE_EDMAC) &&
- data && (data->flags & MMC_DATA_READ))
+ if (data && (data->flags & MMC_DATA_READ))
/* Invalidate cache after read */
dma_sync_sg_for_cpu(mmc_dev(host->slot->mmc),
data->sg,
Powered by blists - more mailing lists