From 60f016f59d170fb51d57d9b1618f86d28e3f79bb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 22 May 2007 20:57:34 +0000 Subject: 2007-05-22 Joel Sherrill * score/cpu/arm/cpu.c, score/cpu/avr/cpu.c, score/cpu/bfin/cpu.c, score/cpu/c4x/cpu.c, score/cpu/h8300/cpu.c, score/cpu/i386/cpu.c, score/cpu/m68k/cpu.c, score/cpu/mips/cpu.c, score/cpu/nios2/cpu.c, score/cpu/no_cpu/cpu.c, score/cpu/sh/cpu.c, score/cpu/sparc/cpu.c, cpukit/sapi/src/exinit.c: Move copying of CPU Table to shared executive initialization. --- cpukit/ChangeLog | 9 +++++++++ cpukit/sapi/src/exinit.c | 6 ++++++ cpukit/score/cpu/arm/cpu.c | 1 - cpukit/score/cpu/avr/cpu.c | 2 -- cpukit/score/cpu/bfin/cpu.c | 2 -- cpukit/score/cpu/c4x/cpu.c | 2 -- cpukit/score/cpu/h8300/cpu.c | 2 -- cpukit/score/cpu/i386/cpu.c | 2 -- cpukit/score/cpu/m68k/cpu.c | 2 -- cpukit/score/cpu/mips/cpu.c | 1 - cpukit/score/cpu/nios2/cpu.c | 2 -- cpukit/score/cpu/no_cpu/cpu.c | 2 -- cpukit/score/cpu/sh/cpu.c | 4 +--- cpukit/score/cpu/sparc/cpu.c | 6 ------ 14 files changed, 16 insertions(+), 27 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 70c47843d8..8561a37cd4 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,12 @@ +2007-05-22 Joel Sherrill + + * score/cpu/arm/cpu.c, score/cpu/avr/cpu.c, score/cpu/bfin/cpu.c, + score/cpu/c4x/cpu.c, score/cpu/h8300/cpu.c, score/cpu/i386/cpu.c, + score/cpu/m68k/cpu.c, score/cpu/mips/cpu.c, score/cpu/nios2/cpu.c, + score/cpu/no_cpu/cpu.c, score/cpu/sh/cpu.c, score/cpu/sparc/cpu.c, + cpukit/sapi/src/exinit.c: Move copying of CPU Table to shared + executive initialization. + 2007-05-22 Joel Sherrill * score/src/corerwlockrelease.c: Do not dereference NULL. diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index ec3c8fe232..e9be0b9534 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -100,6 +100,12 @@ rtems_interrupt_level rtems_initialize_executive_early( _System_state_Handler_initialization( FALSE ); #endif + /* + * Grab our own copy of the user's CPU table. + */ + + _CPU_Table = *cpu_table; + /* * Provided just for user convenience. */ diff --git a/cpukit/score/cpu/arm/cpu.c b/cpukit/score/cpu/arm/cpu.c index 81266b5465..6c942fe49e 100644 --- a/cpukit/score/cpu/arm/cpu.c +++ b/cpukit/score/cpu/arm/cpu.c @@ -37,7 +37,6 @@ void _CPU_Initialize( void (*thread_dispatch) /* ignored on this CPU */ ) { - _CPU_Table = *cpu_table; } /* diff --git a/cpukit/score/cpu/avr/cpu.c b/cpukit/score/cpu/avr/cpu.c index 2796c707ea..795db0aa53 100644 --- a/cpukit/score/cpu/avr/cpu.c +++ b/cpukit/score/cpu/avr/cpu.c @@ -56,8 +56,6 @@ void _CPU_Initialize( */ /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/bfin/cpu.c b/cpukit/score/cpu/bfin/cpu.c index 206db46f35..cc85487e2e 100644 --- a/cpukit/score/cpu/bfin/cpu.c +++ b/cpukit/score/cpu/bfin/cpu.c @@ -57,8 +57,6 @@ void _CPU_Initialize( */ /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/c4x/cpu.c b/cpukit/score/cpu/c4x/cpu.c index b9655b642f..e98bf9c9ed 100644 --- a/cpukit/score/cpu/c4x/cpu.c +++ b/cpukit/score/cpu/c4x/cpu.c @@ -59,8 +59,6 @@ void _CPU_Initialize( /* FP context initialization support goes here */ #endif - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/h8300/cpu.c b/cpukit/score/cpu/h8300/cpu.c index f49978bb55..b41a4f280c 100644 --- a/cpukit/score/cpu/h8300/cpu.c +++ b/cpukit/score/cpu/h8300/cpu.c @@ -51,8 +51,6 @@ void _CPU_Initialize( */ /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c index 15a5f61ddd..f6821e9927 100644 --- a/cpukit/score/cpu/i386/cpu.c +++ b/cpukit/score/cpu/i386/cpu.c @@ -41,8 +41,6 @@ void _CPU_Initialize( register Context_Control_fp *fp_context; #endif - _CPU_Table = *cpu_table; - /* * The following code saves a NULL i387 context which is given * to each task at start and restart time. The following code diff --git a/cpukit/score/cpu/m68k/cpu.c b/cpukit/score/cpu/m68k/cpu.c index 8e4161a53d..4ae862d8d5 100644 --- a/cpukit/score/cpu/m68k/cpu.c +++ b/cpukit/score/cpu/m68k/cpu.c @@ -44,8 +44,6 @@ void _CPU_Initialize( _CPU_ISR_jump_table[slot].isr_handler = (uint32_t ) 0xDEADDEAD; } #endif /* M68K_HAS_VBR */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/mips/cpu.c b/cpukit/score/cpu/mips/cpu.c index 320fc7ba2f..87099df7d7 100644 --- a/cpukit/score/cpu/mips/cpu.c +++ b/cpukit/score/cpu/mips/cpu.c @@ -94,7 +94,6 @@ void _CPU_Initialize( control register to prevent underflow and inexact exceptions */ #endif - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/nios2/cpu.c b/cpukit/score/cpu/nios2/cpu.c index f2f9863cf0..de736f6ddc 100644 --- a/cpukit/score/cpu/nios2/cpu.c +++ b/cpukit/score/cpu/nios2/cpu.c @@ -55,8 +55,6 @@ void _CPU_Initialize( */ /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/no_cpu/cpu.c b/cpukit/score/cpu/no_cpu/cpu.c index 2796c707ea..795db0aa53 100644 --- a/cpukit/score/cpu/no_cpu/cpu.c +++ b/cpukit/score/cpu/no_cpu/cpu.c @@ -56,8 +56,6 @@ void _CPU_Initialize( */ /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; } /*PAGE diff --git a/cpukit/score/cpu/sh/cpu.c b/cpukit/score/cpu/sh/cpu.c index 3ed3131199..0e79192755 100644 --- a/cpukit/score/cpu/sh/cpu.c +++ b/cpukit/score/cpu/sh/cpu.c @@ -82,10 +82,8 @@ void _CPU_Initialize( _CPU_Null_fp_context.fpscr = SH4_FPSCR_DN | SH4_FPSCR_RM; #endif - _CPU_Table = *cpu_table; - /* enable interrupts */ - _CPU_ISR_Set_level( level); + _CPU_ISR_Set_level( level ) ; } /*PAGE diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c index 5e6bf3717d..e18acad6cc 100644 --- a/cpukit/score/cpu/sparc/cpu.c +++ b/cpukit/score/cpu/sparc/cpu.c @@ -66,12 +66,6 @@ void _CPU_Initialize( _CPU_Context_save_fp( &pointer ); #endif - /* - * Grab our own copy of the user's CPU table. - */ - - _CPU_Table = *cpu_table; - /* * Since no tasks have been created yet and no interrupts have occurred, * there is no way that the currently executing thread can have an -- cgit v1.2.3