ARM: zynq: Set bit 22 in PL310 AuxCtrl register (6395/1)
ARM: zynq: Set bit 22 in PL310 AuxCtrl register (6395/1)

This patch is based on the
commit 1a8e41cd672f ("ARM: 6395/1: VExpress: Set bit 22 in the PL310
(cache controller) AuxCtlr register")

Clearing bit 22 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.

For Zynq, this fix avoids memory inconsistencies between Gigabit
Ethernet controller (GEM) and CPU when DMA_CMA is disabled.

Suggested-by: Punnaiah Choudary Kalluri <1b2fae66f68275480e8579e989a09c2c14b0bb77@xilinx.com>
Signed-off-by: Thomas Betker <5832886f93ec934ed3ea3b4687be7c55600d6eaf@rohde-schwarz.com>
Signed-off-by: Michal Simek <b20e59da6aeb5cea6c82b021069d69f63616c55d@xilinx.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs