aboutsummaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf561/atomic.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-30 14:51:29 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-30 14:51:29 -0800
commit5ebacb271242b3205b865efa1f40a12e981df79d (patch)
tree245a9f5d21be583261a377f862aee68be3dfc7c4 /arch/blackfin/mach-bf561/atomic.S
parent99d7832c0e4950b8d6ac6ec2951ad1c0e9ada903 (diff)
parentaa23531ce5fb589d941b5bd84eb258e07131826b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: Blackfin: fix SMP build error in start_thread() Blackfin: fix memset in smp_send_reschedule() and -stop() Blackfin: fix typo in ptrace poking Blackfin: check for anomaly 05000475 Blackfin: work around testset anomaly 05000477 Blackfin: update anomaly lists Blackfin: fix cache Kconfig typo Blackfin: fix suspend/resume failure with some on-chip ROMs
Diffstat (limited to 'arch/blackfin/mach-bf561/atomic.S')
-rw-r--r--arch/blackfin/mach-bf561/atomic.S14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf561/atomic.S b/arch/blackfin/mach-bf561/atomic.S
index 0261a5e751b..f99f174b129 100644
--- a/arch/blackfin/mach-bf561/atomic.S
+++ b/arch/blackfin/mach-bf561/atomic.S
@@ -19,6 +19,16 @@
\reg\().h = _corelock;
.endm
+.macro safe_testset addr:req, scratch:req
+#if ANOMALY_05000477
+ cli \scratch;
+ testset (\addr);
+ sti \scratch;
+#else
+ testset (\addr);
+#endif
+.endm
+
/*
* r0 = address of atomic data to flush and invalidate (32bit).
*
@@ -33,7 +43,7 @@ ENTRY(_get_core_lock)
cli r0;
coreslot_loadaddr p0;
.Lretry_corelock:
- testset (p0);
+ safe_testset p0, r2;
if cc jump .Ldone_corelock;
SSYNC(r2);
jump .Lretry_corelock
@@ -56,7 +66,7 @@ ENTRY(_get_core_lock_noflush)
cli r0;
coreslot_loadaddr p0;
.Lretry_corelock_noflush:
- testset (p0);
+ safe_testset p0, r2;
if cc jump .Ldone_corelock_noflush;
SSYNC(r2);
jump .Lretry_corelock_noflush