summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-23 10:11:59 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-23 10:21:41 +0200
commitb4420323ae542d42f5a3569f61c3fa1200802cf9 (patch)
treebe3c4a540880f52b886fca6408030e61e6968953
parentbsps: Move extern "C" to not cover includes (diff)
downloadrtems-b4420323ae542d42f5a3569f61c3fa1200802cf9.tar.bz2
bsp/leon3: Fix LEON3_mp_irq definition
Provide it also if RTEMS_MULTIPROCESSING is defined.
-rw-r--r--c/src/lib/libbsp/sparc/leon3/include/bsp.h3
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c5
-rw-r--r--c/src/lib/libbsp/sparc/leon3/startup/bspstart.c7
3 files changed, 9 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
index 83510810df..2514190750 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
@@ -220,12 +220,13 @@ extern void BSP_shared_interrupt_unmask(int irq);
*/
extern void BSP_shared_interrupt_mask(int irq);
+#if defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING)
/* Irq used by the shared memory driver and for inter-processor interrupts.
* The variable is weakly linked. Redefine the variable in your application
* to override the BSP default.
- * See startup/bspsmp.c for the default value.
*/
extern const unsigned char LEON3_mp_irq;
+#endif
#ifdef RTEMS_SMP
/* Weak table used to implement static interrupt CPU affinity in a SMP
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c b/c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c
index 42bc15da12..ec83e31a7a 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c
@@ -22,11 +22,6 @@
#include <rtems/score/smpimpl.h>
#include <stdlib.h>
-/* Irq used by shared memory driver and for inter-processor interrupts.
- * Can be overridden by being defined in the application.
- */
-const unsigned char LEON3_mp_irq __attribute__((weak)) = 14;
-
#if !defined(__leon__) || defined(RTEMS_PARAVIRT)
uint32_t _CPU_SMP_Get_current_processor( void )
{
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
index b810b63c43..ca4f38f6a0 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
@@ -21,6 +21,13 @@
#include <rtems/bspIo.h>
#include <bsp/bootcard.h>
+#if defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING)
+/* Irq used by shared memory driver and for inter-processor interrupts.
+ * Can be overridden by being defined in the application.
+ */
+const unsigned char LEON3_mp_irq __attribute__((weak)) = 14;
+#endif
+
/*
* Tells us if data cache snooping is available
*/