[ARM] 2943/1: Clear the exclusive monitor in v6_early_abort
authorCatalin Marinas <catalin.marinas@arm.com>
Sun, 2 Oct 2005 21:34:35 +0000 (22:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 2 Oct 2005 21:34:35 +0000 (22:34 +0100)
Patch from Catalin Marinas

Data abort caused by ldrex/strex can leave the exclusive monitor in an
unpredictable state. It is recommended that a clrex/strex is performed to
clear this state.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/abort-ev6.S

index 8f76f3df7b4cf03e949b51f2817e7f0c4af4b44a..dbd346033122140df010997b1c85cb4615b133c1 100644 (file)
  */
        .align  5
 ENTRY(v6_early_abort)
+#ifdef CONFIG_CPU_MPCORE
+       clrex
+#else
+       strex   r0, r1, [sp]                    @ Clear the exclusive monitor
+#endif
        mrc     p15, 0, r1, c5, c0, 0           @ get FSR
        mrc     p15, 0, r0, c6, c0, 0           @ get FAR
 /*