From 133e1f612ee39bbc7c062a79f5f17d7dd3ad1eda Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 17 Jul 2014 16:00:33 -0700 Subject: [PATCH] arm64: Add support for DMA_ATTR_STRONGLY_ORDERED Strongly ordered memory prevents speculative accesses among other features. Add support for this attribute in arm64. Change-Id: If26459f63edfea3108ad7426e29f98c23b1a07ef Signed-off-by: Laura Abbott Conflicts: arch/arm64/mm/dma-mapping.c Signed-off-by: Stanimir Varbanov --- arch/arm64/mm/dma-mapping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 7963aa4b5d28..54eba2c4a878 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -34,6 +34,8 @@ static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, { if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) return pgprot_writecombine(prot); + else if (dma_get_attr(DMA_ATTR_STRONGLY_ORDERED, attrs)) + prot = pgprot_noncached(prot); return prot; } -- 2.39.5