[rtems commit] bsp/leon3: Fix LEON3_mp_irq definition

Sebastian Huber sebh at rtems.org
Thu Oct 23 08:33:54 UTC 2014


Module:    rtems
Branch:    master
Commit:    b4420323ae542d42f5a3569f61c3fa1200802cf9
Changeset: http://git.rtems.org/rtems/commit/?id=b4420323ae542d42f5a3569f61c3fa1200802cf9

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Oct 23 10:11:59 2014 +0200

bsp/leon3: Fix LEON3_mp_irq definition

Provide it also if RTEMS_MULTIPROCESSING is defined.

---

 c/src/lib/libbsp/sparc/leon3/include/bsp.h      |    3 ++-
 c/src/lib/libbsp/sparc/leon3/startup/bspsmp.c   |    5 -----
 c/src/lib/libbsp/sparc/leon3/startup/bspstart.c |    7 +++++++
 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 8351081..2514190 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 42bc15d..ec83e31 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 b810b63..ca4f38f 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
  */



More information about the vc mailing list