Commit 6632d4fd authored by Thomas Betker's avatar Thomas Betker Committed by Michal Simek

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

This patch is based on the
commit 1a8e41cd ("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: default avatarPunnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: default avatarThomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 974a2aba
...@@ -197,8 +197,8 @@ static const char * const zynq_dt_match[] = { ...@@ -197,8 +197,8 @@ static const char * const zynq_dt_match[] = {
DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
/* 64KB way size, 8-way associativity, parity disabled */ /* 64KB way size, 8-way associativity, parity disabled */
.l2c_aux_val = 0x00000000, .l2c_aux_val = 0x00400000,
.l2c_aux_mask = 0xffffffff, .l2c_aux_mask = 0xffbfffff,
.smp = smp_ops(zynq_smp_ops), .smp = smp_ops(zynq_smp_ops),
.map_io = zynq_map_io, .map_io = zynq_map_io,
.init_irq = zynq_irq_init, .init_irq = zynq_irq_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment