summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/rtems/score/cpu.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-19 13:52:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-21 09:38:54 +0100
commit47d6013417c63115356042695e7125ecfcfe4696 (patch)
treee45e767e2d794cbd7ab5d0932aba9d38dfc22e87 /cpukit/score/cpu/powerpc/rtems/score/cpu.h
parentscore: _Thread_Start_multitasking() (diff)
downloadrtems-47d6013417c63115356042695e7125ecfcfe4696.tar.bz2
score: _CPU_SMP_Get_current_processor()
Remove RTEMS_COMPILER_PURE_ATTRIBUTE from _SMP_Get_current_processor() and all _CPU_SMP_Get_current_processor(). Make inline ASM statements volatile again. Test smptests/smpmigration01 showed that GCC optimizes too much otherwise.
Diffstat (limited to 'cpukit/score/cpu/powerpc/rtems/score/cpu.h')
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/cpu.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 5e9e5f9949..4e6fc74587 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -1036,13 +1036,12 @@ void _CPU_Context_validate( uintptr_t pattern );
#ifdef RTEMS_SMP
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
- RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
- _CPU_SMP_Get_current_processor( void )
+ static inline uint32_t _CPU_SMP_Get_current_processor( void )
{
uint32_t pir;
/* Use Book E Processor ID Register (PIR) */
- __asm__ (
+ __asm__ volatile (
"mfspr %[pir], 286"
: [pir] "=&r" (pir)
);