Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #1959: 0002-sparc-leon2-LEON_Is_interrupt_masked-for-Leon2-in-le.patch

File 0002-sparc-leon2-LEON_Is_interrupt_masked-for-Leon2-in-le.patch, 1.0 KB (added by Jiri Gaisler, on 11/23/14 at 22:15:26)

Fixes the variable name and inverts condition.

  • c/src/lib/libbsp/sparc/leon2/include/leon.h

    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) 
    307307  (LEON_REG.Interrupt_Pending & (1 << (_source)))
    308308
    309309#define LEON_Is_interrupt_masked( _source ) \
    310   (LEON_REG.Interrupt_Masked & (1 << (_source)))
     310  (!(LEON_REG.Interrupt_Mask & (1 << (_source))))
    311311
    312312#define LEON_Mask_interrupt( _source ) \
    313313  do { \