[rtems commit] SMP: make IPI fatal code unique

Sebastian Huber sebh at rtems.org
Fri May 23 13:44:44 UTC 2014


Module:    rtems
Branch:    master
Commit:    0af322c51eaac6d169d3dfc96ee67d44c77b21d5
Changeset: http://git.rtems.org/rtems/commit/?id=0af322c51eaac6d169d3dfc96ee67d44c77b21d5

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Fri May 23 14:27:12 2014 +0200

SMP: make IPI fatal code unique

The same smp fatal code is used in percpu
_Per_CPU_State_change(). In order to determine which CPU
requested a fatal shutdown and which CPU responds to it a
unique code should be used.

A unique code makes it also possible to handle the CPUs
differently in the fatal exception handler.

---

 cpukit/score/include/rtems/score/smpimpl.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h
index ac04833..4ef5045 100644
--- a/cpukit/score/include/rtems/score/smpimpl.h
+++ b/cpukit/score/include/rtems/score/smpimpl.h
@@ -59,7 +59,8 @@ typedef enum {
   SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER,
   SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT,
   SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR,
-  SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED
+  SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED,
+  SMP_FATAL_SHUTDOWN_RESPONSE
 } SMP_Fatal_code;
 
 static inline void _SMP_Fatal( SMP_Fatal_code code )
@@ -140,7 +141,7 @@ static inline void _SMP_Inter_processor_interrupt_handler( void )
     );
 
     if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) {
-      rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN );
+      rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN_RESPONSE );
       /* does not continue past here */
     }
 




More information about the vc mailing list