[PATCH 1/3] i386/smp: Define unused CPU_Interrupt_frame to fix compiler error

Amaan Cheval amaan.cheval at gmail.com
Sat Mar 10 14:11:37 UTC 2018


CPU_INTERRUPT_FRAME_SIZE needs to also be set to allow the RTEMS_STATIC_ASSERT
in percpuasm.c to be fulfilled.

Updates #3331
---
 cpukit/score/cpu/i386/include/rtems/score/cpu.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index f78149c24b..b8ac218acc 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -271,12 +271,20 @@ typedef void (*cpuExcHandlerType) (CPU_Exception_frame*);
 extern cpuExcHandlerType _currentExcHandler;
 extern void rtems_exception_init_mngt(void);
 
+#ifdef RTEMS_SMP
+  #define CPU_INTERRUPT_FRAME_SIZE 4
+#endif
+
 /*
  * This port does not pass any frame info to the
  * interrupt handler.
+ * For SMP, RTEMS assumes CPU_Interrupt_frame exists,
+ * so we make it a fixed size which is never used.
  */
 
-typedef void CPU_Interrupt_frame;
+typedef struct {
+  uint32_t unused_field;
+} CPU_Interrupt_frame;
 
 typedef enum {
   I386_EXCEPTION_DIVIDE_BY_ZERO      = 0,
-- 
2.13.0




More information about the devel mailing list