From 8fc202c7ace4bb474244397cbd8fce38517ca620 Mon Sep 17 00:00:00 2001
From: Jiri Gaisler <jiri@gaisler.se>
Date: Sun, 23 Nov 2014 22:43:24 +0100
Subject: [PATCH 2/2] 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
|
b
|
static __inline__ int bsp_irq_fixup(int irq) |
307 | 307 | (LEON_REG.Interrupt_Pending & (1 << (_source))) |
308 | 308 | |
309 | 309 | #define LEON_Is_interrupt_masked( _source ) \ |
310 | | (LEON_REG.Interrupt_Masked & (1 << (_source))) |
| 310 | (!(LEON_REG.Interrupt_Mask & (1 << (_source)))) |
311 | 311 | |
312 | 312 | #define LEON_Mask_interrupt( _source ) \ |
313 | 313 | do { \ |