diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-05 13:59:07 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-05 15:46:29 +0100 |
commit | 3ef2d175fa56e418a928f8abf3c92b7cd9639245 (patch) | |
tree | 1c67642af7f93b34fc5600192e23692bcac07843 | |
parent | bsp/leon3: Use printk() only if debug is enabled (diff) | |
download | rtems-3ef2d175fa56e418a928f8abf3c92b7cd9639245.tar.bz2 |
bsp/leon3: Install IPI handler early
Install inter-processor interrupt (IPI) handler before secondary CPUs
are started. This ensures that secondary CPUs fetch the newly installed
handler.
Remove superfluous return statement.
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c | 11 |
1 files changed, 4 insertions, 7 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 7a0449222f..0a87dad4c2 100644 --- a/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c +++ b/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c @@ -82,8 +82,10 @@ uint32_t bsp_smp_initialize( uint32_t configured_cpu_count ) } #endif - if ( found_cpus == 1 ) - return 1; + if ( found_cpus > 1 ) { + LEON_Unmask_interrupt(LEON3_MP_IRQ); + set_vector(bsp_ap_ipi_isr, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1); + } for ( cpu=1 ; cpu < found_cpus ; cpu++ ) { const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); @@ -107,11 +109,6 @@ uint32_t bsp_smp_initialize( uint32_t configured_cpu_count ) ); #endif } - - if ( found_cpus > 1 ) { - LEON_Unmask_interrupt(LEON3_MP_IRQ); - set_vector(bsp_ap_ipi_isr, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1); - } return found_cpus; } |