lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 1 Jan 2012 11:27:40 +0800 From: Richard Zhao <richard.zhao@...aro.org> To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org Cc: kernel@...gutronix.de, shawn.guo@...aro.org, vinod.koul@...el.com, dan.j.williams@...el.com, eric.miao@...aro.org, patches@...aro.org, Richard Zhao <richard.zhao@...aro.org> Subject: [PATCH] dma/imx-sdma: add wmb before enable/run a channel dma_alloc_coherent memory may be bufferable. We need to add nececcary memory barrier. Signed-off-by: Richard Zhao <richard.zhao@...aro.org> --- drivers/dma/imx-sdma.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 2ebb2bc..8cd9492 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -403,6 +403,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac) init_completion(&sdmac->done); + wmb(); __raw_writel(1 << channel, sdma->regs + SDMA_H_START); ret = wait_for_completion_timeout(&sdmac->done, HZ); @@ -809,6 +810,7 @@ out: static void sdma_enable_channel(struct sdma_engine *sdma, int channel) { + wmb(); __raw_writel(1 << channel, sdma->regs + SDMA_H_START); } -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists