ARM: 7161/1: errata: no automatic store buffer drain
commitb94342e75946ed88a3048602390633b9f047d5f2
authorWill Deacon <will.deacon@arm.com>
Mon, 14 Nov 2011 16:24:58 +0000 (14 17:24 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 17:21:36 +0000 (9 09:21 -0800)
tree9f0eb5ecdcf146fc4e336753464f0284c173354a
parentf8b35bffd3cc4ffd14ab9c07909cdc45a9006776
ARM: 7161/1: errata: no automatic store buffer drain

commit 11ed0ba1754841316d4095478944300acf19acc3 upstream.

This patch implements a workaround for PL310 erratum 769419. On
revisions of the PL310 prior to r3p2, the Store Buffer does not
automatically drain. This can cause normal, non-cacheable writes to be
retained when the memory system is idle, leading to suboptimal I/O
performance for drivers using coherent DMA.

This patch adds an optional wmb() call to the cpu_idle loop. On systems
with an outer cache, this causes an explicit flush of the store buffer.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/arm/Kconfig
arch/arm/kernel/process.c