From: Laura Abbott Date: Thu, 17 Jul 2014 23:00:33 +0000 (-0700) Subject: arm64: Add support for DMA_ATTR_STRONGLY_ORDERED X-Git-Tag: KARO-TXSD-2017-03-24~88^2~42^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=133e1f612ee39bbc7c062a79f5f17d7dd3ad1eda;p=karo-tx-linux.git 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 --- 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; }