[rtems commit] powerpc: Fix _CPU_Counter_read()
Sebastian Huber
sebh at rtems.org
Wed Jul 15 07:03:14 UTC 2015
Module: rtems
Branch: master
Commit: e2fcb7dc64c040b8298684148390aba6bf4f4912
Changeset: http://git.rtems.org/rtems/commit/?id=e2fcb7dc64c040b8298684148390aba6bf4f4912
Author: Nick Withers <nick.withers at anu.edu.au>
Date: Wed Jul 15 08:55:42 2015 +0200
powerpc: Fix _CPU_Counter_read()
The mftb is not available on Book E processors. Use SPR 268 instead.
Close #2369.
---
cpukit/score/cpu/powerpc/rtems/score/cpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 06cab2c..45298a4 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -842,7 +842,7 @@ static inline CPU_Counter_ticks _CPU_Counter_read( void )
/* Use Alternate Time Base */
__asm__ volatile( "mfspr %0, 526" : "=r" (value) );
#else
- __asm__ volatile( "mftb %0" : "=r" (value) );
+ __asm__ volatile( "mfspr %0, 268" : "=r" (value) );
#endif
return value;
More information about the vc
mailing list