aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/timex.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/timex.h')
-rw-r--r--arch/powerpc/include/asm/timex.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/timex.h b/arch/powerpc/include/asm/timex.h
index 18908caa1f3b..2cf846edb3fc 100644
--- a/arch/powerpc/include/asm/timex.h
+++ b/arch/powerpc/include/asm/timex.h
@@ -29,7 +29,11 @@ static inline cycles_t get_cycles(void)
29 ret = 0; 29 ret = 0;
30 30
31 __asm__ __volatile__( 31 __asm__ __volatile__(
32#ifdef CONFIG_8xx
33 "97: mftb %0\n"
34#else
32 "97: mfspr %0, %2\n" 35 "97: mfspr %0, %2\n"
36#endif
33 "99:\n" 37 "99:\n"
34 ".section __ftr_fixup,\"a\"\n" 38 ".section __ftr_fixup,\"a\"\n"
35 ".align 2\n" 39 ".align 2\n"
@@ -41,7 +45,11 @@ static inline cycles_t get_cycles(void)
41 " .long 0\n" 45 " .long 0\n"
42 " .long 0\n" 46 " .long 0\n"
43 ".previous" 47 ".previous"
48#ifdef CONFIG_8xx
49 : "=r" (ret) : "i" (CPU_FTR_601));
50#else
44 : "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL)); 51 : "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL));
52#endif
45 return ret; 53 return ret;
46#endif 54#endif
47} 55}