]> asedeno.scripts.mit.edu Git - linux.git/commit
ARM: 8561/3: dma-mapping: Don't use outer_flush_range when the L2C is coherent
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Fri, 15 Apr 2016 10:15:18 +0000 (11:15 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 14 Jul 2016 15:25:30 +0000 (16:25 +0100)
commitf12708965069410691e47d1d216ec7ad1516bfd2
tree84107954ba1e3dc2100dc8b9545fcab984f22523
parent9f6f93543d473d656bdc5c94f567c7684e956e52
ARM: 8561/3: dma-mapping: Don't use outer_flush_range when the L2C is coherent

When a L2 cache controller is used in a system that provides hardware
coherency, the entire outer cache operations are useless, and can be
skipped.  Moreover, on some systems, it is harmful as it causes
deadlocks between the Marvell coherency mechanism, the Marvell PCIe
controller and the Cortex-A9.

In the current kernel implementation, the outer cache flush range
operation is triggered by the dma_alloc function.
This operation can be take place during runtime and in some
circumstances may lead to the PCIe/PL310 deadlock on Armada 375/38x
SoCs.

This patch extends the __dma_clear_buffer() function to receive a
boolean argument related to the coherency of the system. The same
things is done for the calling functions.

Reported-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.16+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/dma-mapping.c