From: Will Deacon Date: Fri, 1 Jul 2011 13:36:19 +0000 (+0100) Subject: ARM: 6987/1: l2x0: fix disabling function to avoid deadlock X-Git-Tag: v3.0-rc7~13^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38a8914f9ac2379293944f613e6ca24b61373de8;p=pandora-kernel.git ARM: 6987/1: l2x0: fix disabling function to avoid deadlock 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. Acked-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed