From 82d30a310c69a9a374f45a571b551b0d0a838777 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 11 Nov 2016 10:16:33 +0100 Subject: score: Move CPU_PER_CPU_CONTROL_SIZE Move CPU_PER_CPU_CONTROL_SIZE and the optional CPU_Per_CPU_control to to hide it from . --- 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 736898adc6..21d09a7737 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 1e9e101219..75a2952da9 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 +#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 30999c2a9c..fb5198e227 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 6b8b601cb0..789f2badd9 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 +#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 4c9d3fceea..23da66b4e8 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 6b8b601cb0..789f2badd9 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 +#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 127c12c032..4ba3b272fb 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 6b8b601cb0..789f2badd9 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 +#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 4c5632477e..feff8e6bc1 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 6b8b601cb0..789f2badd9 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 +#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 87c7b13eb6..6b9e73e716 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 6b8b601cb0..789f2badd9 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 +#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 7cb06cabce..307fae120b 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 6b8b601cb0..789f2badd9 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 +#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 b54bd6cf37..d39e17db9d 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 6b8b601cb0..789f2badd9 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 +#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 b89766bacd..d38492a8ce 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 6b8b601cb0..789f2badd9 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 +#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 984b40705c..b1defd2ef9 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 6b8b601cb0..789f2badd9 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 +#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 5950650f72..a32dc37346 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -360,14 +360,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. @@ -384,20 +376,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 * diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h index f1b03435ba..85214d7f6c 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,12 +17,34 @@ #include +/** + * @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 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 86cefbc8c5..9efc582cf3 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 6b8b601cb0..789f2badd9 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 +#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 7a779b6181..2223090f7f 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 6b8886d42a..a3761d28d7 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 +#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 1b6685113e..02c719de5c 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 6b8b601cb0..789f2badd9 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 +#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 6339a79f59..a4d3eef3dc 100644 --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h @@ -347,28 +347,8 @@ 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 * @@ -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 bb53bf996f..27a8d776b8 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 +#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 2bcdc230fb..f273a594ad 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 6b8b601cb0..789f2badd9 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 +#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 900e6a4c65..47b90550e6 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 6b8b601cb0..789f2badd9 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 +#define CPU_PER_CPU_CONTROL_SIZE 0 + #ifndef ASM #ifdef __cplusplus -- cgit v1.2.3