From 47d6013417c63115356042695e7125ecfcfe4696 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 19 Feb 2014 13:52:41 +0100 Subject: 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. --- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpukit/score/cpu/powerpc/rtems/score/cpu.h') 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) ); -- cgit v1.2.3