[PATCH v3 1/9] ARM: l2x0: fix disabling function to avoid deadlock
Catalin Marinas
catalin.marinas at arm.com
Thu Jun 16 10:53:26 EDT 2011
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 <will.deacon at arm.com>
Acked-by: Catalin Marinas <catalin.marinas at arm.com>
--
Catalin
More information about the linux-arm-kernel
mailing list