]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[XTENSA] Add volatile keyword to asm statements accessing counter registers
authorChris Zankel <chris@zankel.net>
Wed, 19 Dec 2007 18:21:50 +0000 (10:21 -0800)
committerChris Zankel <chris@zankel.net>
Thu, 14 Feb 2008 01:24:47 +0000 (17:24 -0800)
The compiler get's sometimes to smart and doesn't reread the
counter registers and the kernel doesn't schedule until the
counter wraps around.

Signed-off-by: Chris Zankel <chris@zankel.net>
include/asm-xtensa/timex.h

index a5fca59fba9e4fb703c3120b2acd6cb5d3e339b0..b83a8181d448d9246bd84dd531f8953836225571 100644 (file)
@@ -63,10 +63,10 @@ extern cycles_t cacheflush_time;
  * Register access.
  */
 
-#define WSR_CCOUNT(r)    __asm__("wsr %0,"__stringify(CCOUNT) :: "a" (r))
-#define RSR_CCOUNT(r)    __asm__("rsr %0,"__stringify(CCOUNT) : "=a" (r))
-#define WSR_CCOMPARE(x,r) __asm__("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
-#define RSR_CCOMPARE(x,r) __asm__("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
+#define WSR_CCOUNT(r)    asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r))
+#define RSR_CCOUNT(r)    asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r))
+#define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r))
+#define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r))
 
 static inline unsigned long get_ccount (void)
 {