[rtems commit] score: Move CPU_PER_CPU_CONTROL_SIZE

Sebastian Huber sebh at rtems.org
Fri Nov 18 06:59:52 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Nov 11 10:16:33 2016 +0100

score: Move CPU_PER_CPU_CONTROL_SIZE

Move CPU_PER_CPU_CONTROL_SIZE and the optional CPU_Per_CPU_control to
<rtems/score/cpuimpl.h> to hide it from <rtems.h>.

---

 cpukit/score/cpu/arm/rtems/score/cpu.h          |  2 --
 cpukit/score/cpu/arm/rtems/score/cpuimpl.h      |  4 +++
 cpukit/score/cpu/bfin/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/bfin/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/epiphany/rtems/score/cpu.h     |  1 -
 cpukit/score/cpu/epiphany/rtems/score/cpuimpl.h |  4 +++
 cpukit/score/cpu/i386/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/i386/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/lm32/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/lm32/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/m32c/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/m32c/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/m68k/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/m68k/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/mips/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/mips/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/moxie/rtems/score/cpu.h        |  2 --
 cpukit/score/cpu/moxie/rtems/score/cpuimpl.h    |  4 +++
 cpukit/score/cpu/nios2/rtems/score/cpu.h        |  2 --
 cpukit/score/cpu/nios2/rtems/score/cpuimpl.h    |  4 +++
 cpukit/score/cpu/no_cpu/rtems/score/cpu.h       | 22 -------------
 cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h   | 24 +++++++++++++-
 cpukit/score/cpu/or1k/rtems/score/cpu.h         |  1 -
 cpukit/score/cpu/or1k/rtems/score/cpuimpl.h     |  4 +++
 cpukit/score/cpu/powerpc/rtems/score/cpu.h      |  2 --
 cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h  |  4 ++-
 cpukit/score/cpu/sh/rtems/score/cpu.h           |  2 --
 cpukit/score/cpu/sh/rtems/score/cpuimpl.h       |  4 +++
 cpukit/score/cpu/sparc/rtems/score/cpu.h        | 41 -----------------------
 cpukit/score/cpu/sparc/rtems/score/cpuimpl.h    | 44 ++++++++++++++++++++++++-
 cpukit/score/cpu/sparc64/rtems/score/cpu.h      |  2 --
 cpukit/score/cpu/sparc64/rtems/score/cpuimpl.h  |  4 +++
 cpukit/score/cpu/v850/rtems/score/cpu.h         |  2 --
 cpukit/score/cpu/v850/rtems/score/cpuimpl.h     |  4 +++
 34 files changed, 125 insertions(+), 94 deletions(-)

diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index 736898a..21d09a7 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -197,8 +197,6 @@
 
 #define CPU_USE_GENERIC_BITFIELD_CODE TRUE
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /** @} */
diff --git a/cpukit/score/cpu/arm/rtems/score/cpuimpl.h b/cpukit/score/cpu/arm/rtems/score/cpuimpl.h
index 1e9e101..75a2952 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h
index 30999c2..fb5198e 100644
--- a/cpukit/score/cpu/bfin/rtems/score/cpu.h
+++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h
@@ -329,8 +329,6 @@ extern "C" {
  */
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/bfin/rtems/score/cpuimpl.h b/cpukit/score/cpu/bfin/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/bfin/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/bfin/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
index 4c9d3fc..23da66b 100644
--- a/cpukit/score/cpu/epiphany/rtems/score/cpu.h
+++ b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
@@ -671,7 +671,6 @@ void _CPU_Context_Initialize(
  */
 #define CPU_SIZEOF_POINTER 4
 #define CPU_EXCEPTION_FRAME_SIZE 260
-#define CPU_PER_CPU_CONTROL_SIZE 0
 
 #define CPU_MAXIMUM_PROCESSORS 32
 
diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpuimpl.h b/cpukit/score/cpu/epiphany/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/epiphany/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/epiphany/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 127c12c..4ba3b27 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -120,8 +120,6 @@ extern "C" {
 #define CPU_BIG_ENDIAN                           FALSE
 #define CPU_LITTLE_ENDIAN                        TRUE
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 #define I386_CONTEXT_CONTROL_EFLAGS_OFFSET 0
diff --git a/cpukit/score/cpu/i386/rtems/score/cpuimpl.h b/cpukit/score/cpu/i386/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h
index 4c56324..feff8e6 100644
--- a/cpukit/score/cpu/lm32/rtems/score/cpu.h
+++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h
@@ -323,8 +323,6 @@ extern "C" {
  */
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/lm32/rtems/score/cpuimpl.h b/cpukit/score/cpu/lm32/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/lm32/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/lm32/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/m32c/rtems/score/cpu.h b/cpukit/score/cpu/m32c/rtems/score/cpu.h
index 87c7b13..6b9e73e 100644
--- a/cpukit/score/cpu/m32c/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m32c/rtems/score/cpu.h
@@ -346,8 +346,6 @@ extern "C" {
  */
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/m32c/rtems/score/cpuimpl.h b/cpukit/score/cpu/m32c/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/m32c/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/m32c/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
index 7cb06ca..307fae1 100644
--- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h
@@ -111,8 +111,6 @@ extern "C" {
 #define CPU_BIG_ENDIAN                           TRUE
 #define CPU_LITTLE_ENDIAN                        FALSE
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 #if ( CPU_HARDWARE_FP == TRUE ) && !defined( __mcoldfire__ )
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpuimpl.h b/cpukit/score/cpu/m68k/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/m68k/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/m68k/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
index b54bd6c..d39e17d 100644
--- a/cpukit/score/cpu/mips/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/rtems/score/cpu.h
@@ -292,8 +292,6 @@ extern "C" {
 
 #define CPU_SIZEOF_POINTER 4
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/mips/rtems/score/cpuimpl.h b/cpukit/score/cpu/mips/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/mips/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/mips/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/moxie/rtems/score/cpu.h b/cpukit/score/cpu/moxie/rtems/score/cpu.h
index b89766b..d38492a 100644
--- a/cpukit/score/cpu/moxie/rtems/score/cpu.h
+++ b/cpukit/score/cpu/moxie/rtems/score/cpu.h
@@ -261,8 +261,6 @@ extern "C" {
  */
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/moxie/rtems/score/cpuimpl.h b/cpukit/score/cpu/moxie/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/moxie/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/moxie/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
index 984b407..b1defd2 100644
--- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h
@@ -102,8 +102,6 @@ extern "C" {
 
 #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 #ifndef ASM
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpuimpl.h b/cpukit/score/cpu/nios2/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/nios2/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/nios2/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index 5950650..a32dc37 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -361,14 +361,6 @@ extern "C" {
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
 /**
- * @brief The size of the CPU specific per-CPU control.
- *
- * This define must be visible to assember files since it is used to derive
- * structure offsets.
- */
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
-/**
  * @brief Maximum number of processors of all systems supported by this CPU
  * port.
  */
@@ -385,20 +377,6 @@ extern "C" {
 /* may need to put some structures here.  */
 
 /**
- * @brief The CPU specific per-CPU control.
- *
- * The CPU port can place here all state information that must be available and
- * maintained for each processor in the system.  This structure must contain at
- * least one field for C/C++ compatibility.  In GNU C empty structures have a
- * size of zero.  In C++ structures have a non-zero size.  In case
- * CPU_PER_CPU_CONTROL_SIZE is defined to zero, then this structure is not
- * used.
- */
-typedef struct {
-  /* CPU specific per-CPU state */
-} CPU_Per_CPU_control;
-
-/**
  * @defgroup CPUContext Processor Dependent Context Management
  *
  * From the highest level viewpoint, there are 2 types of context to save.
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
index f1b0343..85214d7 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (c) 2015, 2016 embedded brains GmbH
+ * Copyright (c) 2013, 2016 embedded brains GmbH
  *
  * The license and distribution terms for this file may be
  * found in the file LICENSE in this distribution or at
@@ -17,6 +17,14 @@
 
 #include <rtems/score/cpu.h>
 
+/**
+ * @brief The size of the CPU specific per-CPU control.
+ *
+ * This define must be visible to assember files since it is used to derive
+ * structure offsets.
+ */
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
@@ -24,6 +32,20 @@ extern "C" {
 #endif
 
 /**
+ * @brief The CPU specific per-CPU control.
+ *
+ * The CPU port can place here all state information that must be available and
+ * maintained for each processor in the system.  This structure must contain at
+ * least one field for C/C++ compatibility.  In GNU C empty structures have a
+ * size of zero.  In C++ structures have a non-zero size.  In case
+ * CPU_PER_CPU_CONTROL_SIZE is defined to zero, then this structure is not
+ * used.
+ */
+typedef struct {
+  /* CPU specific per-CPU state */
+} CPU_Per_CPU_control;
+
+/**
  * @brief Special register pointing to the per-CPU control of the current
  * processor.
  *
diff --git a/cpukit/score/cpu/or1k/rtems/score/cpu.h b/cpukit/score/cpu/or1k/rtems/score/cpu.h
index 86cefbc..9efc582 100644
--- a/cpukit/score/cpu/or1k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/or1k/rtems/score/cpu.h
@@ -658,7 +658,6 @@ void _CPU_Context_Initialize(
 #endif /* ASM */
 
 #define CPU_SIZEOF_POINTER 4
-#define CPU_PER_CPU_CONTROL_SIZE 0
 
 #define CPU_MAXIMUM_PROCESSORS 32
 
diff --git a/cpukit/score/cpu/or1k/rtems/score/cpuimpl.h b/cpukit/score/cpu/or1k/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/or1k/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/or1k/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 7a779b6..2223090 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -152,8 +152,6 @@ extern "C" {
 
 #define CPU_IDLE_TASK_IS_FP      FALSE
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h b/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
index 6b8886d..a3761d2 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (c) 2016 embedded brains GmbH
+ * Copyright (c) 2013, 2016 embedded brains GmbH
  *
  * The license and distribution terms for this file may be
  * found in the file LICENSE in this distribution or at
@@ -17,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifdef RTEMS_SMP
 
 /* Use SPRG0 for the per-CPU control of the current processor */
diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
index 1b66851..02c719d 100644
--- a/cpukit/score/cpu/sh/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/rtems/score/cpu.h
@@ -239,8 +239,6 @@ extern "C" {
 
 #define CPU_MODES_INTERRUPT_MASK   0x0000000f
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/sh/rtems/score/cpuimpl.h b/cpukit/score/cpu/sh/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/sh/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/sh/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index 6339a79..a4d3eef 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -347,29 +347,9 @@ typedef struct {
 /** This defines the size of the minimum stack frame. */
 #define CPU_MINIMUM_STACK_FRAME_SIZE          0x60
 
-#if ( SPARC_HAS_FPU == 1 )
-  #define CPU_PER_CPU_CONTROL_SIZE 8
-#else
-  #define CPU_PER_CPU_CONTROL_SIZE 4
-#endif
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /**
- * @brief Offset of the CPU_Per_CPU_control::isr_dispatch_disable field
- * relative to the Per_CPU_Control begin.
- */
-#define SPARC_PER_CPU_ISR_DISPATCH_DISABLE 0
-
-#if ( SPARC_HAS_FPU == 1 )
-  /**
-   * @brief Offset of the CPU_Per_CPU_control::fsr field relative to the
-   * Per_CPU_Control begin.
-   */
-  #define SPARC_PER_CPU_FSR_OFFSET 4
-#endif
-
-/**
  * @defgroup Contexts SPARC Context Structures
  *
  * @ingroup Score
@@ -392,27 +372,6 @@ typedef struct {
 
 #ifndef ASM
 
-typedef struct {
-  /**
-   * This flag is context switched with each thread.  It indicates
-   * that THIS thread has an _ISR_Dispatch stack frame on its stack.
-   * By using this flag, we can avoid nesting more interrupt dispatching
-   * attempts on a previously interrupted thread's stack.
-   */
-  uint32_t isr_dispatch_disable;
-
-#if ( SPARC_HAS_FPU == 1 )
-  /**
-   * @brief Memory location to store the FSR register during interrupt
-   * processing.
-   *
-   * This is a write-only field.  The FSR is written to force a completion of
-   * floating point operations in progress.
-   */
-  uint32_t fsr;
-#endif
-} CPU_Per_CPU_control;
-
 /**
  * @brief SPARC basic context.
  *
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h b/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
index bb53bf9..27a8d77 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpuimpl.h
@@ -5,7 +5,8 @@
  */
 
 /*
- * Copyright (c) 2015, 2016 embedded brains GmbH
+ * Copyright (c) 2007 On-Line Applications Research Corporation (OAR)
+ * Copyright (c) 2013, 2016 embedded brains GmbH
  *
  * The license and distribution terms for this file may be
  * found in the file LICENSE in this distribution or at
@@ -17,12 +18,53 @@
 
 #include <rtems/score/cpu.h>
 
+#if ( SPARC_HAS_FPU == 1 )
+  #define CPU_PER_CPU_CONTROL_SIZE 8
+#else
+  #define CPU_PER_CPU_CONTROL_SIZE 4
+#endif
+
+/**
+ * @brief Offset of the CPU_Per_CPU_control::isr_dispatch_disable field
+ * relative to the Per_CPU_Control begin.
+ */
+#define SPARC_PER_CPU_ISR_DISPATCH_DISABLE 0
+
+#if ( SPARC_HAS_FPU == 1 )
+  /**
+   * @brief Offset of the CPU_Per_CPU_control::fsr field relative to the
+   * Per_CPU_Control begin.
+   */
+  #define SPARC_PER_CPU_FSR_OFFSET 4
+#endif
+
 #ifndef ASM
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+typedef struct {
+  /**
+   * This flag is context switched with each thread.  It indicates
+   * that THIS thread has an _ISR_Dispatch stack frame on its stack.
+   * By using this flag, we can avoid nesting more interrupt dispatching
+   * attempts on a previously interrupted thread's stack.
+   */
+  uint32_t isr_dispatch_disable;
+
+#if ( SPARC_HAS_FPU == 1 )
+  /**
+   * @brief Memory location to store the FSR register during interrupt
+   * processing.
+   *
+   * This is a write-only field.  The FSR is written to force a completion of
+   * floating point operations in progress.
+   */
+  uint32_t fsr;
+#endif
+} CPU_Per_CPU_control;
+
 /**
  * @brief The pointer to the current per-CPU control is available via register
  * g6.
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
index 2bcdc23..f273a59 100644
--- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
@@ -198,8 +198,6 @@ extern "C" {
 
 #define CPU_MODES_INTERRUPT_MASK   0x0000000F
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /*
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpuimpl.h b/cpukit/score/cpu/sparc64/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/sparc64/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus
diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h
index 900e6a4..47b9055 100644
--- a/cpukit/score/cpu/v850/rtems/score/cpu.h
+++ b/cpukit/score/cpu/v850/rtems/score/cpu.h
@@ -322,8 +322,6 @@ extern "C" {
  */
 #define CPU_MODES_INTERRUPT_MASK   0x00000001
 
-#define CPU_PER_CPU_CONTROL_SIZE 0
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 /**
diff --git a/cpukit/score/cpu/v850/rtems/score/cpuimpl.h b/cpukit/score/cpu/v850/rtems/score/cpuimpl.h
index 6b8b601..789f2ba 100644
--- a/cpukit/score/cpu/v850/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/v850/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
  */
 
 /*
+ * Copyright (c) 2013 embedded brains GmbH
+ *
  * 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.
@@ -15,6 +17,8 @@
 
 #include <rtems/score/cpu.h>
 
+#define CPU_PER_CPU_CONTROL_SIZE 0
+
 #ifndef ASM
 
 #ifdef __cplusplus



More information about the vc mailing list