summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-12 09:53:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-16 09:48:32 +0200
commit6bc63df199f82b90a3ffe471b452f813bf7c7a70 (patch)
tree808da9bb2b7142457d397f8b855153ad451851c5
parentconfdefs.h: Fix compile error in non-SMP cfg (diff)
downloadrtems-6bc63df199f82b90a3ffe471b452f813bf7c7a70.tar.bz2
confdefs.h: Add SMP enabled field to configuration
Do not use the processor count to determine if SMP is enabled. Instead use a dedicated configuration option. Enable SMP by default in SMP configurations. Add CONFIGURE_DISABLE_SMP_CONFIGURATION to all test which would fail otherwise. Update #3001.
-rwxr-xr-xcpukit/sapi/include/confdefs.h7
-rw-r--r--cpukit/sapi/include/rtems/config.h6
-rw-r--r--testsuites/libtests/cpuuse/system.h2
-rw-r--r--testsuites/libtests/rtmonuse/system.h2
-rw-r--r--testsuites/libtests/termios05/init.c2
-rw-r--r--testsuites/sptests/sp01/system.h2
-rw-r--r--testsuites/sptests/sp08/init.c2
-rw-r--r--testsuites/sptests/sp14/system.h2
-rw-r--r--testsuites/sptests/sp20/system.h2
-rw-r--r--testsuites/sptests/sp37/system.h2
-rw-r--r--testsuites/sptests/spcbssched01/system.h2
-rw-r--r--testsuites/sptests/spcbssched02/system.h2
-rw-r--r--testsuites/sptests/spcbssched03/system.h2
-rw-r--r--testsuites/sptests/spedfsched01/system.h2
-rw-r--r--testsuites/sptests/spedfsched02/system.h2
-rw-r--r--testsuites/sptests/spedfsched03/system.h2
-rw-r--r--testsuites/sptests/spfifo03/init.c2
-rw-r--r--testsuites/sptests/spfifo05/init.c2
-rw-r--r--testsuites/tmtests/tm08/system.h2
-rw-r--r--testsuites/tmtests/tm22/system.h2
20 files changed, 46 insertions, 3 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 331e747fcc..604539b5e8 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -3320,6 +3320,13 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#else
false,
#endif
+ #ifdef RTEMS_SMP
+ #ifdef _CONFIGURE_SMP_APPLICATION
+ true,
+ #else
+ false,
+ #endif
+ #endif
_CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of static extensions */
CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to static extensions */
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index ddcb77cc87..2993e70543 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -237,6 +237,10 @@ typedef struct {
*/
bool stack_allocator_avoids_work_space;
+ #ifdef RTEMS_SMP
+ bool smp_enabled;
+ #endif
+
uint32_t number_of_initial_extensions;
const rtems_extensions_table *User_extension_table;
#if defined(RTEMS_MULTIPROCESSING)
@@ -360,7 +364,7 @@ extern const rtems_configuration_table Configuration;
*/
#ifdef RTEMS_SMP
#define rtems_configuration_is_smp_enabled() \
- (rtems_configuration_get_maximum_processors() > 1)
+ (Configuration.smp_enabled)
#else
#define rtems_configuration_is_smp_enabled() \
false
diff --git a/testsuites/libtests/cpuuse/system.h b/testsuites/libtests/cpuuse/system.h
index 0501d4186f..562f2dbbff 100644
--- a/testsuites/libtests/cpuuse/system.h
+++ b/testsuites/libtests/cpuuse/system.h
@@ -50,6 +50,8 @@ void Task_switch(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/libtests/rtmonuse/system.h b/testsuites/libtests/rtmonuse/system.h
index 1544f80bf0..b7bb5f136f 100644
--- a/testsuites/libtests/rtmonuse/system.h
+++ b/testsuites/libtests/rtmonuse/system.h
@@ -47,6 +47,8 @@ void Get_all_counters( void );
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)
+
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/libtests/termios05/init.c b/testsuites/libtests/termios05/init.c
index 3cdf969b97..e9f15314b4 100644
--- a/testsuites/libtests/termios05/init.c
+++ b/testsuites/libtests/termios05/init.c
@@ -166,6 +166,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/sp01/system.h b/testsuites/sptests/sp01/system.h
index a317dd9656..68f8277214 100644
--- a/testsuites/sptests/sp01/system.h
+++ b/testsuites/sptests/sp01/system.h
@@ -31,6 +31,8 @@ rtems_task Task_1_through_3(
#define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MAXIMUM_TASKS 4
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/sptests/sp08/init.c b/testsuites/sptests/sp08/init.c
index 77e9819a02..2364c70287 100644
--- a/testsuites/sptests/sp08/init.c
+++ b/testsuites/sptests/sp08/init.c
@@ -300,6 +300,8 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
/* end of file */
diff --git a/testsuites/sptests/sp14/system.h b/testsuites/sptests/sp14/system.h
index 7721366f34..3a63a8d119 100644
--- a/testsuites/sptests/sp14/system.h
+++ b/testsuites/sptests/sp14/system.h
@@ -51,6 +51,8 @@ rtems_task Task_2(
#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/sp20/system.h b/testsuites/sptests/sp20/system.h
index dfefe4b6c6..cbc926aa34 100644
--- a/testsuites/sptests/sp20/system.h
+++ b/testsuites/sptests/sp20/system.h
@@ -47,6 +47,8 @@ void Get_all_counters( void );
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/sptests/sp37/system.h b/testsuites/sptests/sp37/system.h
index 6bb47ec11f..67a62d22a9 100644
--- a/testsuites/sptests/sp37/system.h
+++ b/testsuites/sptests/sp37/system.h
@@ -39,6 +39,8 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_MAXIMUM_TIMERS 1
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* end of include file */
diff --git a/testsuites/sptests/spcbssched01/system.h b/testsuites/sptests/spcbssched01/system.h
index 2ba1db5458..813a7a094e 100644
--- a/testsuites/sptests/spcbssched01/system.h
+++ b/testsuites/sptests/spcbssched01/system.h
@@ -37,6 +37,8 @@ rtems_task Task_1_through_3(
#define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MAXIMUM_TASKS 4
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/sptests/spcbssched02/system.h b/testsuites/sptests/spcbssched02/system.h
index dba3d13d32..302b9b54c2 100644
--- a/testsuites/sptests/spcbssched02/system.h
+++ b/testsuites/sptests/spcbssched02/system.h
@@ -43,6 +43,8 @@ rtems_task Task_Periodic(
#define CONFIGURE_SCHEDULER_CBS
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
#include <rtems/rtems/clock.h>
diff --git a/testsuites/sptests/spcbssched03/system.h b/testsuites/sptests/spcbssched03/system.h
index 4ad5204fa1..7ce4884eb7 100644
--- a/testsuites/sptests/spcbssched03/system.h
+++ b/testsuites/sptests/spcbssched03/system.h
@@ -47,6 +47,8 @@ rtems_task Tasks_Aperiodic(
#define CONFIGURE_SCHEDULER_CBS
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
#include <rtems/rtems/clock.h>
diff --git a/testsuites/sptests/spedfsched01/system.h b/testsuites/sptests/spedfsched01/system.h
index b930cb1283..e673b1f4d3 100644
--- a/testsuites/sptests/spedfsched01/system.h
+++ b/testsuites/sptests/spedfsched01/system.h
@@ -37,6 +37,8 @@ rtems_task Task_1_through_3(
#define CONFIGURE_EXTRA_TASK_STACKS (4 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MAXIMUM_TASKS 4
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/sptests/spedfsched02/system.h b/testsuites/sptests/spedfsched02/system.h
index c92a3980a3..cbdb7ad564 100644
--- a/testsuites/sptests/spedfsched02/system.h
+++ b/testsuites/sptests/spedfsched02/system.h
@@ -49,6 +49,8 @@ void Get_all_counters( void );
#define CONFIGURE_SCHEDULER_EDF
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* global variables */
diff --git a/testsuites/sptests/spedfsched03/system.h b/testsuites/sptests/spedfsched03/system.h
index 95922aecc4..ec5af826d1 100644
--- a/testsuites/sptests/spedfsched03/system.h
+++ b/testsuites/sptests/spedfsched03/system.h
@@ -47,6 +47,8 @@ rtems_task Tasks_Aperiodic(
#define CONFIGURE_SCHEDULER_EDF
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
#include <rtems/rtems/clock.h>
diff --git a/testsuites/sptests/spfifo03/init.c b/testsuites/sptests/spfifo03/init.c
index 0fb024a537..5aa48004ec 100644
--- a/testsuites/sptests/spfifo03/init.c
+++ b/testsuites/sptests/spfifo03/init.c
@@ -215,9 +215,9 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 1
-#define CONFIGURE_INIT
#define CONFIGURE_MAXIMUM_FIFOS 1
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spfifo05/init.c b/testsuites/sptests/spfifo05/init.c
index 1ccdd49e09..a5ce3130a5 100644
--- a/testsuites/sptests/spfifo05/init.c
+++ b/testsuites/sptests/spfifo05/init.c
@@ -270,9 +270,9 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 2
-#define CONFIGURE_INIT
#define CONFIGURE_MAXIMUM_FIFOS 1
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
diff --git a/testsuites/tmtests/tm08/system.h b/testsuites/tmtests/tm08/system.h
index 3610fe954d..e6af3c12af 100644
--- a/testsuites/tmtests/tm08/system.h
+++ b/testsuites/tmtests/tm08/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 */
diff --git a/testsuites/tmtests/tm22/system.h b/testsuites/tmtests/tm22/system.h
index fa7795f42b..89c7138efc 100644
--- a/testsuites/tmtests/tm22/system.h
+++ b/testsuites/tmtests/tm22/system.h
@@ -38,6 +38,8 @@ rtems_task Init(
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(100, MESSAGE_SIZE )
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_DISABLE_SMP_CONFIGURATION
+
#include <rtems/confdefs.h>
/* end of include file */