diff options
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r-- | arch/sparc64/kernel/time.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 459c8fbe02b4..a22930d62adf 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -280,9 +280,9 @@ static struct sparc64_tick_ops stick_operations __read_mostly = { | |||
280 | * Since STICK is constantly updating, we have to access it carefully. | 280 | * Since STICK is constantly updating, we have to access it carefully. |
281 | * | 281 | * |
282 | * The sequence we use to read is: | 282 | * The sequence we use to read is: |
283 | * 1) read low | 283 | * 1) read high |
284 | * 2) read high | 284 | * 2) read low |
285 | * 3) read low again, if it rolled over increment high by 1 | 285 | * 3) read high again, if it rolled re-read both low and high again. |
286 | * | 286 | * |
287 | * Writing STICK safely is also tricky: | 287 | * Writing STICK safely is also tricky: |
288 | * 1) write low to zero | 288 | * 1) write low to zero |
@@ -295,18 +295,18 @@ static struct sparc64_tick_ops stick_operations __read_mostly = { | |||
295 | static unsigned long __hbird_read_stick(void) | 295 | static unsigned long __hbird_read_stick(void) |
296 | { | 296 | { |
297 | unsigned long ret, tmp1, tmp2, tmp3; | 297 | unsigned long ret, tmp1, tmp2, tmp3; |
298 | unsigned long addr = HBIRD_STICK_ADDR; | 298 | unsigned long addr = HBIRD_STICK_ADDR+8; |
299 | 299 | ||
300 | __asm__ __volatile__("ldxa [%1] %5, %2\n\t" | 300 | __asm__ __volatile__("ldxa [%1] %5, %2\n" |
301 | "add %1, 0x8, %1\n\t" | 301 | "1:\n\t" |
302 | "ldxa [%1] %5, %3\n\t" | ||
303 | "sub %1, 0x8, %1\n\t" | 302 | "sub %1, 0x8, %1\n\t" |
303 | "ldxa [%1] %5, %3\n\t" | ||
304 | "add %1, 0x8, %1\n\t" | ||
304 | "ldxa [%1] %5, %4\n\t" | 305 | "ldxa [%1] %5, %4\n\t" |
305 | "cmp %4, %2\n\t" | 306 | "cmp %4, %2\n\t" |
306 | "blu,a,pn %%xcc, 1f\n\t" | 307 | "bne,a,pn %%xcc, 1b\n\t" |
307 | " add %3, 1, %3\n" | 308 | " mov %4, %2\n\t" |
308 | "1:\n\t" | 309 | "sllx %4, 32, %4\n\t" |
309 | "sllx %3, 32, %3\n\t" | ||
310 | "or %3, %4, %0\n\t" | 310 | "or %3, %4, %0\n\t" |
311 | : "=&r" (ret), "=&r" (addr), | 311 | : "=&r" (ret), "=&r" (addr), |
312 | "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) | 312 | "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) |