From f442e6b45cfd91e68839510e3a2b4131d16ab593 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 27 Mar 2012 17:37:00 +0200 Subject: ARM: PR2042: Provide stub for ARMv6-M --- cpukit/score/cpu/arm/rtems/score/arm.h | 1 - cpukit/score/cpu/arm/rtems/score/cpu.h | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h index 91d2756bc1..5275b0bb97 100644 --- a/cpukit/score/cpu/arm/rtems/score/arm.h +++ b/cpukit/score/cpu/arm/rtems/score/arm.h @@ -76,7 +76,6 @@ extern "C" { #elif defined(__ARM_ARCH_6M__) # define CPU_MODEL_NAME "ARMv6M" -# define ARM_MULTILIB_ARCH_V7M #elif defined(__ARM_ARCH_7__) # define CPU_MODEL_NAME "ARMv7" diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index 2543ddef41..f098db3ece 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -246,6 +246,8 @@ typedef struct { void *register_lr; void *register_sp; uint32_t isr_nest_level; +#else + void *register_sp; #endif } Context_Control; @@ -259,9 +261,10 @@ extern uint32_t arm_cpu_mode; static inline uint32_t arm_interrupt_disable( void ) { + uint32_t level; + #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; - uint32_t level; __asm__ volatile ( ARM_SWITCH_TO_ARM @@ -271,10 +274,7 @@ static inline uint32_t arm_interrupt_disable( void ) ARM_SWITCH_BACK : [arm_switch_reg] "=&r" (arm_switch_reg), [level] "=&r" (level) ); - - return level; #elif defined(ARM_MULTILIB_ARCH_V7M) - uint32_t level; uint32_t basepri = 0x80; __asm__ volatile ( @@ -283,9 +283,11 @@ static inline uint32_t arm_interrupt_disable( void ) : [level] "=&r" (level) : [basepri] "r" (basepri) ); +#else + level = 0; +#endif return level; -#endif } static inline void arm_interrupt_enable( uint32_t level ) @@ -564,11 +566,11 @@ typedef struct { typedef CPU_Exception_frame CPU_Interrupt_frame; -#elif defined(ARM_MULTILIB_ARCH_V7M) +#else /* !defined(ARM_MULTILIB_ARCH_V4) */ typedef void CPU_Interrupt_frame; -#endif /* defined(ARM_MULTILIB_ARCH_V7M) */ +#endif /* !defined(ARM_MULTILIB_ARCH_V4) */ #ifdef __cplusplus } -- cgit v1.2.3