diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-26 14:10:25 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-30 09:53:23 +0200 |
commit | fe52e7c07cc330e98484fd4acc38586722b93132 (patch) | |
tree | 3fb3e92e5174a2c2e636eb53efd9cacf36ab58c4 /c/src/lib/libbsp/sparc | |
parent | smp: Use Thread_Control.is_executing (diff) | |
download | rtems-fe52e7c07cc330e98484fd4acc38586722b93132.tar.bz2 |
smp: Add and use _Per_CPU_Get()
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index(). Add
_Per_CPU_Send_interrupt(). This avoids direct access of
_Per_CPU_Information.
Diffstat (limited to 'c/src/lib/libbsp/sparc')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c b/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c index 8862ca5f7a..f7b70f3b14 100644 --- a/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c +++ b/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c @@ -86,12 +86,13 @@ uint32_t bsp_smp_initialize( uint32_t configured_cpu_count ) return 1; for ( cpu=1 ; cpu < found_cpus ; cpu++ ) { - + const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); + #if defined(RTEMS_DEBUG) printk( "Waking CPU %d\n", cpu ); #endif - bsp_ap_stack = _Per_CPU_Information[cpu].interrupt_stack_high - + bsp_ap_stack = per_cpu->interrupt_stack_high - CPU_MINIMUM_STACK_FRAME_SIZE; bsp_ap_entry = leon3_secondary_cpu_initialize; @@ -101,9 +102,8 @@ uint32_t bsp_smp_initialize( uint32_t configured_cpu_count ) printk( "CPU %d is %s\n", cpu, - _Per_CPU_Information[cpu].state - == PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING ? - "online" : "offline" + per_cpu->state == PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING ? + "online" : "offline" ); #endif } |