LDREX/STREX and pre-emption on SMP hardware
flat view
From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2009-09-18 22:51:41
On Fri, 2009-09-18 at 21:20 +0100, Russell King - ARM Linux wrote:
On Mon, Sep 14, 2009 at 03:29:36PM +0100, Catalin Marinas wrote:quoted
The other case where I replied was discussing the need for CLREX at context switch and that's needed to get the correct behaviour (T1 and T2 are OS threads in this case).Well, lets get your patch in then. Please try to get it to me (patch system / git pull) by tomorrow evening, thanks.
The patch pretty much as it was originally posted but with Jamie's
comment is available on the for-rmk branch below (the patch has
atomic_set modified to STR and CLREX removed from __switch_to as it is
no longer needed - explicit calls to schedule() don't have a problem as
they don't happen in the middle of an atomic LDREX/STREX construct).
I added two more patches to the for-rmk branch - the W macro fix in
unified.h and kernel (not user) undefined instructions handling in
Thumb-2 (I run it on a model without VFP and reading FPSID was causing
an oops).
You can merge the branch as it is but you can skip the Thumb-2 patches
by merging for-rmk^ or for-rmk^^ (in case you find any issues, I'm not
sure I'll be able to reply before tomorrow night).
Thanks.
The following changes since commit df58bee21ed218cb7dfb561a590b1bd2a99531cf:
Linus Torvalds (1):
Merge branch 'x86-mce-for-linus' of git://git.kernel.org/.../tip/linux-2.6-tip
are available in the git repository at:
git://linux-arm.org/linux-2.6 for-rmk
Alexey Dobriyan (1):
Fix "W" macro in arch/arm/include/asm/unified.h
Catalin Marinas (2):
Clear the exclusive monitor when returning from an exception
Thumb-2: Correctly handle undefined instructions in the kernel
arch/arm/include/asm/atomic.h | 26 +++++++-------------------
arch/arm/include/asm/unified.h | 4 ++++
arch/arm/kernel/entry-armv.S | 19 +++++++++++--------
arch/arm/kernel/entry-header.S | 14 ++++++++++++++
4 files changed, 36 insertions(+), 27 deletions(-)
--
Catalin