summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-03 15:13:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-03 15:13:47 +0000
commit562eab5c4edcc347a08ad7bcf8c3d71a8068ba5f (patch)
treec06a2914cfa1e4a2d67296df1a0875be14e5801b
parent2009-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-562eab5c4edcc347a08ad7bcf8c3d71a8068ba5f.tar.bz2
2009-07-03 Daniel Hellstrom <daniel@gaisler.com>
* sapi/src/exinit.c, score/include/rtems/score/objectmp.h, score/src/objectmp.c: Ensure local node number is set early enough in MP configurations.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/sapi/src/exinit.c4
-rw-r--r--cpukit/score/include/rtems/score/objectmp.h7
-rw-r--r--cpukit/score/src/objectmp.c24
4 files changed, 35 insertions, 6 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 721106dbb2..caf30fe775 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-03 Daniel Hellstrom <daniel@gaisler.com>
+
+ * sapi/src/exinit.c, score/include/rtems/score/objectmp.h,
+ score/src/objectmp.c: Ensure local node number is set early enough in
+ MP configurations.
+
2009-07-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/score/coremsg.h, score/src/coremsgflushwait.c:
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index f6b5fbf13d..41cf37e2ce 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -96,6 +96,10 @@ void rtems_initialize_data_structures(void)
*/
_CPU_Initialize();
+ #if defined(RTEMS_MULTIPROCESSING)
+ _Objects_MP_Handler_early_initialization();
+ #endif
+
/*
* Do this as early as possible to ensure no debugging output
* is even attempted to be printed.
diff --git a/cpukit/score/include/rtems/score/objectmp.h b/cpukit/score/include/rtems/score/objectmp.h
index 03605f49d7..aba3a73676 100644
--- a/cpukit/score/include/rtems/score/objectmp.h
+++ b/cpukit/score/include/rtems/score/objectmp.h
@@ -53,6 +53,13 @@ typedef struct {
*/
void _Objects_MP_Handler_initialization(void);
+/** @brief Objects MP Handler Early initialization
+ *
+ * This routine intializes the global object node number
+ * used in the ID field of all objects.
+ */
+void _Objects_MP_Handler_early_initialization(void);
+
/** @brief Objects MP Open
*
* This routine place the specified global object in the
diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c
index a6e6b9c534..916bb8169d 100644
--- a/cpukit/score/src/objectmp.c
+++ b/cpukit/score/src/objectmp.c
@@ -25,19 +25,16 @@
/*PAGE
*
- * _Objects_MP_Handler_initialization
+ * _Objects_MP_Handler_early_initialization
*
*/
-
-void _Objects_MP_Handler_initialization(void)
+void _Objects_MP_Handler_early_initialization(void)
{
uint32_t node;
uint32_t maximum_nodes;
- uint32_t maximum_global_objects;
node = _Configuration_MP_table->node;
maximum_nodes = _Configuration_MP_table->maximum_nodes;
- maximum_global_objects = _Configuration_MP_table->maximum_global_objects;
if ( node < 1 || node > maximum_nodes )
_Internal_error_Occurred(
@@ -46,9 +43,23 @@ void _Objects_MP_Handler_initialization(void)
INTERNAL_ERROR_INVALID_NODE
);
-
_Objects_Local_node = node;
_Objects_Maximum_nodes = maximum_nodes;
+}
+
+/*PAGE
+ *
+ * _Objects_MP_Handler_initialization
+ *
+ */
+
+void _Objects_MP_Handler_initialization(void)
+{
+
+ uint32_t maximum_global_objects;
+
+ maximum_global_objects = _Configuration_MP_table->maximum_global_objects;
+
_Objects_MP_Maximum_global_objects = maximum_global_objects;
if ( maximum_global_objects == 0 ) {
@@ -293,3 +304,4 @@ void _Objects_MP_Is_remote (
*the_object = NULL;
}
+