[rtems commit] Score ISR - Minimize Capabilities When Not Simple Vectored

Joel Sherrill joel at rtems.org
Wed May 9 21:55:53 UTC 2012


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon May  7 18:29:56 2012 -0500

Score ISR - Minimize Capabilities When Not Simple Vectored

In particular CPU_INTERRUPT_NUMBER_OF_VECTORS and
CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER are only used on
Simple Vectored Architectures, so do not depend on
them being defined. This disables as much as possible
that is specific to the Simple Vectored Model and
not expected to be used on architectures which use
the Programmable Interrupt Controller model for
interrupt handler vectoring.

---

 cpukit/rtems/include/rtems/rtems/intr.h    |    8 ++++++--
 cpukit/score/cpu/powerpc/rtems/score/cpu.h |   10 ++++++----
 cpukit/score/include/rtems/score/isr.h     |    8 ++++++--
 cpukit/score/inline/rtems/score/isr.inl    |    4 +++-
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/cpukit/rtems/include/rtems/rtems/intr.h b/cpukit/rtems/include/rtems/rtems/intr.h
index 9b0b1b4..f1085d5 100644
--- a/cpukit/rtems/include/rtems/rtems/intr.h
+++ b/cpukit/rtems/include/rtems/rtems/intr.h
@@ -48,8 +48,13 @@ typedef ISR_Vector_number rtems_vector_number;
 /**
  *  @brief Return type for interrupt handler.
  */
-typedef void rtems_isr;
+typedef ISR_Handler rtems_isr;
 
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
+
+typedef ISR_Handler_entry rtems_isr_entry;
+
+#else
 /**
  *  @brief Interrupt handler type.
  *
@@ -59,7 +64,6 @@ typedef rtems_isr ( *rtems_isr_entry )(
                  rtems_vector_number
              );
 
-#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
 /**
  *  @brief Implementation of the rtems_interrupt_catch directive.
  *
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 9a4d944..bd05247 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -3,7 +3,7 @@
  */
 
 /*
- *  COPYRIGHT (c) 1989-2007.
+ *  COPYRIGHT (c) 1989-2012.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  COPYRIGHT (c) 1995 i-cubed ltd.
@@ -624,11 +624,13 @@ SCORE_EXTERN struct {
 /*
  *  This defines the number of entries in the ISR_Vector_table managed
  *  by RTEMS.
+ *
+ *  NOTE: CPU_INTERRUPT_NUMBER_OF_VECTORS and 
+ *        CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER are only used on
+ *        Simple Vectored Architectures and thus are not defined
+ *        for this architecture.
  */
 
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS     (0)
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (UINT32_MAX)
-
 /*
  *  This is defined if the port has a special way to report the ISR nesting
  *  level.  Most ports maintain the variable _ISR_Nest_level. Note that
diff --git a/cpukit/score/include/rtems/score/isr.h b/cpukit/score/include/rtems/score/isr.h
index c0963a5..6a146df 100644
--- a/cpukit/score/include/rtems/score/isr.h
+++ b/cpukit/score/include/rtems/score/isr.h
@@ -8,7 +8,7 @@
  */
 
 /*
- *  COPYRIGHT (c) 1989-2006.
+ *  COPYRIGHT (c) 1989-2012.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -50,6 +50,11 @@ typedef uint32_t   ISR_Vector_number;
  */
 typedef void ISR_Handler;
 
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
+
+typedef void * ISR_Handler_entry; 
+
+#else
 /**
  *  Pointer to an ISR Handler
  */
@@ -76,7 +81,6 @@ typedef ISR_Handler ( *ISR_Handler_entry )(
  */
 #define ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER  CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER
 
-#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
 /**
  *  The following declares the Vector Table.  Application
  *  interrupt service routines are vectored by the ISR Handler via this table.
diff --git a/cpukit/score/inline/rtems/score/isr.inl b/cpukit/score/inline/rtems/score/isr.inl
index 605dfee..a4e7866 100644
--- a/cpukit/score/inline/rtems/score/isr.inl
+++ b/cpukit/score/inline/rtems/score/isr.inl
@@ -6,7 +6,7 @@
  */
 
 /*
- *  COPYRIGHT (c) 1989-2004.
+ *  COPYRIGHT (c) 1989-2012.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -28,6 +28,7 @@
  *  @{
  */
 
+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
 /**
  *  This function returns true if the vector is a valid vector number
  *  for this processor and false otherwise.
@@ -51,6 +52,7 @@ RTEMS_INLINE_ROUTINE bool _ISR_Is_valid_user_handler (
 {
   return (handler != NULL);
 }
+#endif
 
 /**@}*/
 




More information about the vc mailing list