re PR target/42263 (Wrong code bugs in SMP support)

2009-12-11  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/42263
	Backport from mainline

	2009-12-03  Richard Earnshaw  <rearnsha@arm.com>

	* arm/linux-atomic.c (SYNC_LOCK_RELEASE): Place memory barrier
	before the lock release.

From-SVN: r155172
This commit is contained in:
Ramana Radhakrishnan 2009-12-11 17:45:32 +00:00 committed by Ramana Radhakrishnan
parent 09d9097264
commit 0e92367f61
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/42263
Backport from mainline
2009-12-03 Richard Earnshaw <rearnsha@arm.com>
* arm/linux-atomic.c (SYNC_LOCK_RELEASE): Place memory barrier
before the lock release.
2009-12-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/42263

View File

@ -266,8 +266,10 @@ SUBWORD_TEST_AND_SET (char, 1)
void HIDDEN \
__sync_lock_release_##WIDTH (TYPE *ptr) \
{ \
*ptr = 0; \
/* All writes before this point must be seen before we release \
the lock itself. */ \
__kernel_dmb (); \
*ptr = 0; \
}
SYNC_LOCK_RELEASE (int, 4)