[rtems commit] Remove INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL

Sebastian Huber sebh at rtems.org
Fri Sep 21 06:08:05 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Sep 20 07:57:08 2018 +0200

Remove INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL

The configured interrupt stack size (CONFIGURE_INTERRUPT_STACK_SIZE) is
checked against the minimum task stack size.  The minium tasks task
stack size is also a configuration option
(CONFIGURE_MINIMUM_TASK_STACK_SIZE).  So, this check does not really
help in case of configuration errors.  In addition, the interrupt stack
is also re-used as the initialization stack in most BSPs.  It is
probably better to use a stack checker to detect problems.

Update #3459.

---

 cpukit/include/rtems/score/interr.h        |  2 +-
 cpukit/score/src/isr.c                     |  4 ----
 testsuites/sptests/Makefile.am             | 10 ----------
 testsuites/sptests/configure.ac            |  1 -
 testsuites/sptests/spfatal07/spfatal07.doc | 20 --------------------
 testsuites/sptests/spfatal07/spfatal07.scn |  3 ---
 testsuites/sptests/spfatal07/testcase.h    | 24 ------------------------
 7 files changed, 1 insertion(+), 63 deletions(-)

diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h
index f09072d..0c734e8 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -158,7 +158,7 @@ typedef enum {
   /* INTERNAL_ERROR_NO_CPU_TABLE = 1, */
   INTERNAL_ERROR_TOO_LITTLE_WORKSPACE = 2,
   INTERNAL_ERROR_WORKSPACE_ALLOCATION = 3,
-  INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL = 4,
+  /* INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL = 4, */
   INTERNAL_ERROR_THREAD_EXITTED = 5,
   INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION = 6,
   INTERNAL_ERROR_INVALID_NODE = 7,
diff --git a/cpukit/score/src/isr.c b/cpukit/score/src/isr.c
index 3bda275..6a1b307 100644
--- a/cpukit/score/src/isr.c
+++ b/cpukit/score/src/isr.c
@@ -47,10 +47,6 @@ void _ISR_Handler_initialization( void )
 #endif
 
   stack_size = rtems_configuration_get_interrupt_stack_size();
-
-  if ( !_Stack_Is_enough( stack_size ) )
-    _Internal_error( INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL );
-
   cpu_max = rtems_configuration_get_maximum_processors();
   stack_low = _Configuration_Interrupt_stack_area_begin;
 
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index d9a6bf2..7574dba 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -926,16 +926,6 @@ spfatal06_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal06) \
 	$(support_includes) -I$(top_srcdir)/spfatal06
 endif
 
-if TEST_spfatal07
-sp_tests += spfatal07
-sp_screens += spfatal07/spfatal07.scn
-sp_docs += spfatal07/spfatal07.doc
-spfatal07_SOURCES = spfatal_support/init.c spfatal_support/system.h \
-	spfatal07/testcase.h
-spfatal07_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spfatal07) \
-	$(support_includes) -I$(top_srcdir)/spfatal07
-endif
-
 if TEST_spfatal08
 sp_tests += spfatal08
 sp_screens += spfatal08/spfatal08.scn
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 6418ad0..36b3a17 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -140,7 +140,6 @@ RTEMS_TEST_CHECK([spfatal03])
 RTEMS_TEST_CHECK([spfatal04])
 RTEMS_TEST_CHECK([spfatal05])
 RTEMS_TEST_CHECK([spfatal06])
-RTEMS_TEST_CHECK([spfatal07])
 RTEMS_TEST_CHECK([spfatal08])
 RTEMS_TEST_CHECK([spfatal09])
 RTEMS_TEST_CHECK([spfatal10])
diff --git a/testsuites/sptests/spfatal07/spfatal07.doc b/testsuites/sptests/spfatal07/spfatal07.doc
deleted file mode 100644
index 07300ed..0000000
--- a/testsuites/sptests/spfatal07/spfatal07.doc
+++ /dev/null
@@ -1,20 +0,0 @@
-#  COPYRIGHT (c) 1989-2009.
-#  On-Line Applications Research Corporation (OAR).
-#
-#  The license and distribution terms for this file may be
-#  found in the file LICENSE in this distribution or at
-#  http://www.rtems.org/license/LICENSE.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name:  spfatal07
-
-directives:
-
-  None specifically
-
-concepts:
-
-+ Ensure that the error condition when the interrupt stack size configured
-  is too small is properly treated as a fatal error.
diff --git a/testsuites/sptests/spfatal07/spfatal07.scn b/testsuites/sptests/spfatal07/spfatal07.scn
deleted file mode 100644
index 5d7e820..0000000
--- a/testsuites/sptests/spfatal07/spfatal07.scn
+++ /dev/null
@@ -1,3 +0,0 @@
-*** TEST FATAL 7 ***
-Fatal error (Core Configuration Invalid ISR stack size) hit
-*** END OF TEST FATAL 7 ***
diff --git a/testsuites/sptests/spfatal07/testcase.h b/testsuites/sptests/spfatal07/testcase.h
deleted file mode 100644
index 156f9b5..0000000
--- a/testsuites/sptests/spfatal07/testcase.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Classic API Init task create failure
- *
- *  COPYRIGHT (c) 1989-2011.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#define FATAL_ERROR_TEST_NAME            "7"
-#define FATAL_ERROR_DESCRIPTION \
-        "Core Configuration Invalid ISR stack size"
-#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
-#define FATAL_ERROR_EXPECTED_ERROR       \
-          INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
-
-#define CONFIGURE_INTERRUPT_STACK_SIZE CPU_INTERRUPT_STACK_ALIGNMENT
-
-void force_error()
-{
-  /* we will not run this far */
-}




More information about the vc mailing list