On Wed, Jun 15, 2011 at 06:23:12PM +0100, Will Deacon wrote:
The l2x0_disable function attempts to writel with the l2x0_lock held.
This results in deadlock when the writel contains an outer_sync call
for the platform since the l2x0_lock is already held by the disable
function. A further problem is that disabling the L2 without flushing it
first can lead to the spin_lock operation becoming visible after the
spin_unlock, causing any subsequent L2 maintenance to deadlock.
This patch replaces the writel with a call to writel_relaxed in the
disabling code and adds a flush before disabling in the control
register, preventing livelock from occurring.
Signed-off-by: Will Deacon <redacted>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
--
Catalin