[PATCH] LEON3: add support for IRQ16..31 for CPU!=0
Daniel Hellstrom
daniel at gaisler.com
Fri May 23 12:26:56 UTC 2014
---
c/src/lib/libbsp/sparc/leon3/include/leon.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index bda28f2..d21f054 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -25,6 +25,7 @@
#include <rtems.h>
#include <amba.h>
+#include <rtems/score/cpu.h>
#ifdef __cplusplus
extern "C" {
@@ -130,11 +131,12 @@ extern int LEON3_IrqCtrl_EIrq;
static __inline__ int bsp_irq_fixup(int irq)
{
- int eirq;
+ int eirq, cpu;
if (LEON3_IrqCtrl_EIrq != 0 && irq == LEON3_IrqCtrl_EIrq) {
/* Get interrupt number from IRQ controller */
- eirq = LEON3_IrqCtrl_Regs->intid[LEON3_Cpu_Index] & 0x1f;
+ cpu = _LEON3_Get_current_processor();
+ eirq = LEON3_IrqCtrl_Regs->intid[cpu] & 0x1f;
if (eirq & 0x10)
irq = eirq;
}
--
1.7.0.4
More information about the devel
mailing list