]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mx6: Set shared override bit in PL310 AUX_CTRL register
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 11 Mar 2015 20:12:12 +0000 (17:12 -0300)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:45:40 +0000 (14:45 +0200)
commitdf569e08d94347bb98ff282699883f570959c025
tree96fcedc20d62aec1bfc0fbf0ba3c02e17ee7b7d9
parent45635c5b46a7dbf0f117bc5a49def563c2636c8a
mx6: Set shared override bit in PL310 AUX_CTRL register

Having bit 22 cleared in the PL310 Auxiliary Control register (shared
attribute override enable) has the side effect of transforming Normal
Shared Non-cacheable reads into Cacheable no-allocate reads.

Coherent DMA buffers in Linux always have a Cacheable alias via the
kernel linear mapping and the processor can speculatively load cache
lines into the PL310 controller. With bit 22 cleared, Non-cacheable
reads would unexpectedly hit such cache lines leading to buffer
corruption.

This was inspired by a patch from Catalin Marinas [1] and also from recent
discussions in the linux-arm-kernel list [2] where Russell King and Rob Herring
suggested that bootloaders should initialize the cache.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/031810.html
[2] https://lkml.org/lkml/2015/2/20/199

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/cpu/armv7/mx6/soc.c
arch/arm/include/asm/pl310.h