Title: [7748] trunk/arch/blackfin/mach-bf561/atomic.S: work around testset anomaly 477
Revision
7748
Author
vapier
Date
2009-11-02 22:14:38 -0500 (Mon, 02 Nov 2009)

Log Message

work around testset anomaly 477

Modified Paths


Diff

Modified: trunk/arch/blackfin/mach-bf561/atomic.S (7747 => 7748)


--- trunk/arch/blackfin/mach-bf561/atomic.S	2009-11-03 03:07:18 UTC (rev 7747)
+++ trunk/arch/blackfin/mach-bf561/atomic.S	2009-11-03 03:14:38 UTC (rev 7748)
@@ -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 @@
 	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 @@
 	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
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to