[PATCH v3 3/5] Add ARM Paravirtualization support

Joel Sherrill joel at rtems.org
Fri Feb 16 17:31:27 UTC 2018


Closes #3305.
---
 cpukit/score/cpu/arm/cpu_asm.S                 | 2 ++
 cpukit/score/cpu/arm/include/rtems/score/cpu.h | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/cpukit/score/cpu/arm/cpu_asm.S b/cpukit/score/cpu/arm/cpu_asm.S
index f58b99d..a508cc5 100644
--- a/cpukit/score/cpu/arm/cpu_asm.S
+++ b/cpukit/score/cpu/arm/cpu_asm.S
@@ -110,9 +110,11 @@ DEFINE_FUNCTION_ARM(_CPU_Context_switch)
 	vldm	r5, {d8-d15}
 #endif
 
+#ifndef RTEMS_PARAVIRT
 #ifdef ARM_MULTILIB_HAS_THREAD_ID_REGISTER
 	mcr	p15, 0, r3, c13, c0, 3
 #endif
+#endif
 
 	str	r4, [r2, #PER_CPU_ISR_DISPATCH_DISABLE]
 
diff --git a/cpukit/score/cpu/arm/include/rtems/score/cpu.h b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
index 05e236c..69ec34c 100644
--- a/cpukit/score/cpu/arm/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
@@ -297,6 +297,11 @@ static inline void _ARM_Instruction_synchronization_barrier( void )
 #endif
 }
 
+#if defined(RTEMS_PARAVIRT)
+uint32_t arm_interrupt_disable( void );
+void arm_interrupt_enable( uint32_t level );
+void arm_interrupt_flash( uint32_t level );
+#else
 static inline uint32_t arm_interrupt_disable( void )
 {
   uint32_t level;
@@ -387,6 +392,7 @@ static inline void arm_interrupt_flash( uint32_t level )
   );
 #endif
 }
+#endif  /* !RTEMS_PARAVIRT */
 
 #define _CPU_ISR_Disable( _isr_cookie ) \
   do { \
-- 
1.8.3.1




More information about the devel mailing list