On 05/23/2014 03:17 PM, Joel Sherrill wrote:
On 5/23/2014 7:26 AM, Daniel Hellstrom wrote:
---
  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>
I am surprised you need this. It is included as a side-effect of
including rtems.h.

Just to be sure I checked the dependencies for init.c for the
hello world sample and it listed rtems/score/cpu.h. Try
compiling with that .h
You're right, I will check this and resend the patch.

  #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;
Will LEON3_Cpu_Index end up being removed?
I don't think so, since it carries the boot processor in a SMP system. But lets 
see, I can try removing it piece by piece.

+               cpu = _LEON3_Get_current_processor();
+               eirq = LEON3_IrqCtrl_Regs->intid[cpu] & 0x1f;
                 if (eirq & 0x10)
                         irq = eirq;
         }
Does this method use tabs or 8 space indentation? Either isn't right.

I didn't change the coding style here. But I can make an additional patch 
converting to 2 spaces, applied after this so that it is clear what is changed.

Thanks for your quick response!

Daniel
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to