[rtems commit] sparc/leon2: LEON_Is_interrupt_masked for Leon2 in leon.h wrongly defined
Daniel Hellstrom
danielh at rtems.org
Tue Dec 2 13:04:27 UTC 2014
Module: rtems
Branch: master
Commit: 2501814ee91a30ab6f12a02356707db3b9cc67f4
Changeset: http://git.rtems.org/rtems/commit/?id=2501814ee91a30ab6f12a02356707db3b9cc67f4
Author: Jiri Gaisler <jiri at gaisler.se>
Date: Sun Nov 23 22:53:00 2014 +0100
sparc/leon2: LEON_Is_interrupt_masked for Leon2 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 #1959 in trac.
---
c/src/lib/libbsp/sparc/leon2/include/leon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c/src/lib/libbsp/sparc/leon2/include/leon.h b/c/src/lib/libbsp/sparc/leon2/include/leon.h
index 8d2f0c5c..7ec6b1d 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/leon.h
@@ -307,7 +307,7 @@ static __inline__ int bsp_irq_fixup(int irq)
(LEON_REG.Interrupt_Pending & (1 << (_source)))
#define LEON_Is_interrupt_masked( _source ) \
- (LEON_REG.Interrupt_Masked & (1 << (_source)))
+ (!(LEON_REG.Interrupt_Mask & (1 << (_source))))
#define LEON_Mask_interrupt( _source ) \
do { \
More information about the vc
mailing list