From b4420323ae542d42f5a3569f61c3fa1200802cf9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 23 Oct 2014 10:11:59 +0200 Subject: 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 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 #include -/* 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 #include +#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 */ -- cgit v1.2.3