git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
asm-powerpc
/
timex.h
diff --git
a/include/asm-powerpc/timex.h
b/include/asm-powerpc/timex.h
index
3b9a8e7
..
92dedde
100644
(file)
--- a/
include/asm-powerpc/timex.h
+++ b/
include/asm-powerpc/timex.h
@@
-8,6
+8,7
@@
*/
#include <asm/cputable.h>
*/
#include <asm/cputable.h>
+#include <asm/reg.h>
#define CLOCK_TICK_RATE 1024000 /* Underlying HZ */
#define CLOCK_TICK_RATE 1024000 /* Underlying HZ */
@@
-15,13
+16,11
@@
typedef unsigned long cycles_t;
static inline cycles_t get_cycles(void)
{
static inline cycles_t get_cycles(void)
{
- cycles_t ret;
-
#ifdef __powerpc64__
#ifdef __powerpc64__
-
- __asm__ __volatile__("mftb %0" : "=r" (ret) : );
-
+ return mftb();
#else
#else
+ cycles_t ret;
+
/*
* For the "cycle" counter we use the timebase lower half.
* Currently only used on SMP.
/*
* For the "cycle" counter we use the timebase lower half.
* Currently only used on SMP.
@@
-30,18
+29,19
@@
static inline cycles_t get_cycles(void)
ret = 0;
__asm__ __volatile__(
ret = 0;
__asm__ __volatile__(
- "9
8
: mftb %0\n"
+ "9
7
: mftb %0\n"
"99:\n"
".section __ftr_fixup,\"a\"\n"
"99:\n"
".section __ftr_fixup,\"a\"\n"
+ ".align 2\n"
+ "98:\n"
" .long %1\n"
" .long 0\n"
" .long %1\n"
" .long 0\n"
- " .long 98b\n"
- " .long 99b\n"
+ " .long 9
7b-9
8b\n"
+ " .long 99b
-98b
\n"
".previous"
: "=r" (ret) : "i" (CPU_FTR_601));
".previous"
: "=r" (ret) : "i" (CPU_FTR_601));
-#endif
-
return ret;
return ret;
+#endif
}
#endif /* __KERNEL__ */
}
#endif /* __KERNEL__ */