diff options
author | Chris Zankel <chris@zankel.net> | 2007-12-19 10:21:50 -0800 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2008-02-13 17:24:47 -0800 |
commit | de6b03456e2e11cbff9f4bb147177374b260d04e (patch) | |
tree | 0890edb9c5efe46689eb641792b1a66cfb1b1d1d /include/asm-xtensa | |
parent | 03dfa442e5aaf644bb9b3b506abbd76786867eb1 (diff) | |
download | kernel_samsung_smdk4412-de6b03456e2e11cbff9f4bb147177374b260d04e.zip kernel_samsung_smdk4412-de6b03456e2e11cbff9f4bb147177374b260d04e.tar.gz kernel_samsung_smdk4412-de6b03456e2e11cbff9f4bb147177374b260d04e.tar.bz2 |
[XTENSA] Add volatile keyword to asm statements accessing counter registers
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>
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r-- | include/asm-xtensa/timex.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-xtensa/timex.h b/include/asm-xtensa/timex.h index a5fca59..b83a818 100644 --- a/include/asm-xtensa/timex.h +++ b/include/asm-xtensa/timex.h @@ -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) { |