[PATCH] confdefs.h: CONFIGURE_DISABLE_SMP_CONFIGURATION

Sebastian Huber sebastian.huber at embedded-brains.de
Thu May 11 09:56:01 UTC 2017


Enable the SMP configuration by default in case SMP is enabled.  Add
configuration option CONFIGURE_DISABLE_SMP_CONFIGURATION to disable it
explicitly.

Add CONFIGURE_DISABLE_SMP_CONFIGURATION to all test which would fail
otherwise.

Update #3001.
---
 cpukit/sapi/include/confdefs.h             | 8 ++++++--
 testsuites/libtests/block08/system.h       | 2 ++
 testsuites/psxtests/psx05/system.h         | 2 ++
 testsuites/sptests/sp04/system.h           | 2 ++
 testsuites/sptests/sp07/system.h           | 2 ++
 testsuites/sptests/sp12/system.h           | 2 ++
 testsuites/sptests/sp13/system.h           | 2 ++
 testsuites/sptests/sp16/system.h           | 2 ++
 testsuites/sptests/spfatal29/testcase.h    | 2 ++
 testsuites/sptests/spintrcritical06/init.c | 2 ++
 testsuites/sptests/spintrcritical15/init.c | 2 ++
 testsuites/sptests/spmrsp01/init.c         | 2 ++
 testsuites/sptests/spsimplesched02/init.c  | 2 ++
 testsuites/tmtests/tm04/system.h           | 2 ++
 testsuites/tmtests/tm15/system.h           | 2 ++
 testsuites/tmtests/tm20/system.h           | 2 ++
 testsuites/tmtests/tm24/system.h           | 2 ++
 17 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 239ddd9..06938b1 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -224,8 +224,12 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
  * An internal define to indicate that this is an SMP application
  * configuration.
  */
-#if defined(RTEMS_SMP) && CONFIGURE_MAXIMUM_PROCESSORS > 1
-  #define _CONFIGURE_SMP_APPLICATION
+#ifdef RTEMS_SMP
+  #if !defined(CONFIGURE_DISABLE_SMP_CONFIGURATION)
+    #define _CONFIGURE_SMP_APPLICATION
+  #elif CONFIGURE_MAXIMUM_PROCESSORS > 1
+    #error "CONFIGURE_DISABLE_SMP_CONFIGURATION and CONFIGURE_MAXIMUM_PROCESSORS > 1 makes no sense"
+  #endif
 #endif
 
 #ifdef CONFIGURE_SMP_APPLICATION
diff --git a/testsuites/libtests/block08/system.h b/testsuites/libtests/block08/system.h
index 60cf9c8..f2ba2ec 100644
--- a/testsuites/libtests/block08/system.h
+++ b/testsuites/libtests/block08/system.h
@@ -54,6 +54,8 @@ rtems_task Init(
 
 #define CONFIGURE_EXTRA_TASK_STACKS         (13 * RTEMS_MINIMUM_STACK_SIZE)
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
diff --git a/testsuites/psxtests/psx05/system.h b/testsuites/psxtests/psx05/system.h
index 9ce25e0..a3615d4 100644
--- a/testsuites/psxtests/psx05/system.h
+++ b/testsuites/psxtests/psx05/system.h
@@ -43,6 +43,8 @@ void *Task_3(
 
 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* global variables */
diff --git a/testsuites/sptests/sp04/system.h b/testsuites/sptests/sp04/system.h
index 2181b8c..9606368 100644
--- a/testsuites/sptests/sp04/system.h
+++ b/testsuites/sptests/sp04/system.h
@@ -52,6 +52,8 @@ void Task_switch(
 #define CONFIGURE_MAXIMUM_TASKS             4
 #define CONFIGURE_MAXIMUM_TIMERS            1
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* global variables */
diff --git a/testsuites/sptests/sp07/system.h b/testsuites/sptests/sp07/system.h
index 8bea0fb..3f8cb26 100644
--- a/testsuites/sptests/sp07/system.h
+++ b/testsuites/sptests/sp07/system.h
@@ -74,6 +74,8 @@ void Task_exit_extension(
 #define CONFIGURE_EXTRA_TASK_STACKS         (4 * RTEMS_MINIMUM_STACK_SIZE)
 #define CONFIGURE_MAXIMUM_TASKS             5
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* global variables */
diff --git a/testsuites/sptests/sp12/system.h b/testsuites/sptests/sp12/system.h
index c91a8bd..299169f 100644
--- a/testsuites/sptests/sp12/system.h
+++ b/testsuites/sptests/sp12/system.h
@@ -65,6 +65,8 @@ rtems_task Task5(
 
 #define CONFIGURE_EXTRA_TASK_STACKS         (6 * RTEMS_MINIMUM_STACK_SIZE)
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* global variables */
diff --git a/testsuites/sptests/sp13/system.h b/testsuites/sptests/sp13/system.h
index 20ecc2f..e8632e4 100644
--- a/testsuites/sptests/sp13/system.h
+++ b/testsuites/sptests/sp13/system.h
@@ -97,6 +97,8 @@ TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
 
 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
diff --git a/testsuites/sptests/sp16/system.h b/testsuites/sptests/sp16/system.h
index 139c757..a812663 100644
--- a/testsuites/sptests/sp16/system.h
+++ b/testsuites/sptests/sp16/system.h
@@ -54,6 +54,8 @@ rtems_task Task5(
 
 #define CONFIGURE_EXTRA_TASK_STACKS         (1 * RTEMS_MINIMUM_STACK_SIZE)
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* global variables */
diff --git a/testsuites/sptests/spfatal29/testcase.h b/testsuites/sptests/spfatal29/testcase.h
index 63f74f8..87545f7 100644
--- a/testsuites/sptests/spfatal29/testcase.h
+++ b/testsuites/sptests/spfatal29/testcase.h
@@ -19,6 +19,8 @@
 
 #define CONFIGURE_MAXIMUM_TIMERS 1
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 static void timer(rtems_id id, void *arg)
 {
   rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
diff --git a/testsuites/sptests/spintrcritical06/init.c b/testsuites/sptests/spintrcritical06/init.c
index 8d51922..423e4b5 100644
--- a/testsuites/sptests/spintrcritical06/init.c
+++ b/testsuites/sptests/spintrcritical06/init.c
@@ -139,6 +139,8 @@ rtems_task Init(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #define CONFIGURE_INIT
 #include <rtems/confdefs.h>
 
diff --git a/testsuites/sptests/spintrcritical15/init.c b/testsuites/sptests/spintrcritical15/init.c
index b680987..72e4832 100644
--- a/testsuites/sptests/spintrcritical15/init.c
+++ b/testsuites/sptests/spintrcritical15/init.c
@@ -111,6 +111,8 @@ rtems_task Init(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #define CONFIGURE_INIT
 #include <rtems/confdefs.h>
 
diff --git a/testsuites/sptests/spmrsp01/init.c b/testsuites/sptests/spmrsp01/init.c
index e5e522f..bf144a9 100644
--- a/testsuites/sptests/spmrsp01/init.c
+++ b/testsuites/sptests/spmrsp01/init.c
@@ -335,6 +335,8 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #define CONFIGURE_INIT
 
 #include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c
index 2b3a58e..884a3ab 100644
--- a/testsuites/sptests/spsimplesched02/init.c
+++ b/testsuites/sptests/spsimplesched02/init.c
@@ -156,6 +156,8 @@ rtems_task Init(
 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
 #define CONFIGURE_INIT_TASK_PRIORITY        4
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #define CONFIGURE_INIT
 #include <rtems/confdefs.h>
 /* end of include file */
diff --git a/testsuites/tmtests/tm04/system.h b/testsuites/tmtests/tm04/system.h
index 4fb9b46..9147efb 100644
--- a/testsuites/tmtests/tm04/system.h
+++ b/testsuites/tmtests/tm04/system.h
@@ -33,6 +33,8 @@ rtems_task Init(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
diff --git a/testsuites/tmtests/tm15/system.h b/testsuites/tmtests/tm15/system.h
index 1438c9a..47d0121 100644
--- a/testsuites/tmtests/tm15/system.h
+++ b/testsuites/tmtests/tm15/system.h
@@ -34,6 +34,8 @@ rtems_id   Task_id[ OPERATION_COUNT+1 ];   /* array of task ids */
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
diff --git a/testsuites/tmtests/tm20/system.h b/testsuites/tmtests/tm20/system.h
index e1f95e9..4344d53 100644
--- a/testsuites/tmtests/tm20/system.h
+++ b/testsuites/tmtests/tm20/system.h
@@ -37,6 +37,8 @@ rtems_id   Task_id[ OPERATION_COUNT+1 ];   /* array of task ids */
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
diff --git a/testsuites/tmtests/tm24/system.h b/testsuites/tmtests/tm24/system.h
index 68e1fcd..dc4fac4 100644
--- a/testsuites/tmtests/tm24/system.h
+++ b/testsuites/tmtests/tm24/system.h
@@ -32,6 +32,8 @@ rtems_task Init(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
 #include <rtems/confdefs.h>
 
 /* end of include file */
-- 
1.8.4.5



More information about the devel mailing list