[rtems commit] sparc/leon3: LEON_Is_interrupt_masked for Leon3 in leon.h wrongly defined

Daniel Hellstrom danielh at rtems.org
Tue Dec 2 13:04:27 UTC 2014


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

Author:    Jiri Gaisler <jiri at gaisler.se>
Date:      Sun Nov 23 22:53:00 2014 +0100

sparc/leon3: LEON_Is_interrupt_masked for Leon3 in leon.h wrongly defined

Condition needs to be inverted, as a 1 in the mask register means
that the interrupt is enabled. Solves ticket #1958 in trac.

---

 c/src/lib/libbsp/sparc/leon3/include/leon.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 92c36b7..c7270cf 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -158,9 +158,7 @@ extern rtems_interrupt_lock LEON3_IrqCtrl_Lock;
   (LEON3_IrqCtrl_Regs->ipend & (1 << (_source)))
 
 #define LEON_Cpu_Is_interrupt_masked( _source, _cpu ) \
-  do {\
-     (LEON3_IrqCtrl_Regs->mask[_cpu] & (1 << (_source))); \
-   } while (0)
+     (!(LEON3_IrqCtrl_Regs->mask[_cpu] & (1 << (_source))))
 
 #define LEON_Cpu_Mask_interrupt( _source, _cpu ) \
   do { \




More information about the vc mailing list