]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mvebu: use the virtual CPU registers to access coherency registers
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Mon, 25 Nov 2013 16:26:46 +0000 (17:26 +0100)
committerJason Cooper <jason@lakedaemon.net>
Mon, 25 Nov 2013 18:22:10 +0000 (18:22 +0000)
commit714fb09486b7e0912be82a418bad1e85842eaf20
tree09fc727a5f92659d0e112f0aaa11027353bf34c9
parent64b65cc33fb44866b12fc4602267b2b9838d54fa
ARM: mvebu: use the virtual CPU registers to access coherency registers

The Armada XP provides a mechanism called "virtual CPU registers" or
"per-CPU register banking", to access the per-CPU registers of the
current CPU, without having to worry about finding on which CPU we're
running. CPU0 has its registers at 0x21800, CPU1 at 0x21900, CPU2 at
0x21A00 and CPU3 at 0x21B00. The virtual registers accessing the
current CPU registers are at 0x21000.

However, in the Device Tree node that provides the register addresses
for the coherency unit (which is responsible for ensuring coherency
between processors, and I/O coherency between processors and the
DMA-capable devices), a mistake was made: the CPU0-specific registers
were specified instead of the virtual CPU registers. This means that
the coherency barrier needed for I/O coherency was not behaving
properly when executed from a CPU different from CPU0. This patch
fixes that by using the virtual CPU registers.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.8+
Fixes: 806dd53918a356 "arm: mvebu: Add hardware I/O Coherency support"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/armada-370-xp.dtsi