Module: xenomai-forge Branch: master Commit: f40f046eaf8d76cb2b45ab67f145d4998a1d9391 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f40f046eaf8d76cb2b45ab67f145d4998a1d9391
Author: Charles Retailleau <charles.retaill...@axesseurope.com> Date: Fri Aug 17 20:23:15 2012 +0200 cobalt/powerpc: fix __xn_rdtsc for newer ppc cores Where the mftb and mftbu instructions are not supported. Replace them with mfspr. --- include/asm-powerpc/syscall.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-powerpc/syscall.h b/include/asm-powerpc/syscall.h index 44f257b..2095402 100644 --- a/include/asm-powerpc/syscall.h +++ b/include/asm-powerpc/syscall.h @@ -169,9 +169,9 @@ static inline unsigned long long __xn_rdtsc(void) } u; unsigned long __tbu; - __asm__ __volatile__("1: mftbu %0\n" - "mftb %1\n" - "mftbu %2\n" + __asm__ __volatile__("1: mfspr %0,269\n" + "mfspr %1,268\n" + "mfspr %2,269\n" "cmpw %2,%0\n" "bne- 1b\n":"=r"(u.v[0]), "=r"(u.v[1]), "=r"(__tbu)); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git