Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169009
b: refs/heads/master
c: f99e8c1
h: refs/heads/master
i:
  169007: afc49a5
v: v3
  • Loading branch information
Mike Frysinger committed Nov 25, 2009
1 parent af7103b commit 7c1a437
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af5d7fc7e4d8e34bad42178f7011287e94eeb3ed
refs/heads/master: f99e8c1d0f41011870d14d5990c65e65b123f2ef
14 changes: 12 additions & 2 deletions trunk/arch/blackfin/mach-bf561/atomic.S
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7c1a437

Please sign in to comment.