#1959 closed defect

LEON_Is_interrupt_masked for Leon2 in leon.h

Reported by: Helder Silva Owned by: Daniel Hellstrom
Priority: normal Milestone: 4.11
Component: bsps Version: 4.11
Severity: minor Keywords:
Cc: jiri@… Blocked By:
Blocking:

Description

The function-like macro LEON_Is_interrupt_masked defined in leon2 (c/src/lib/libbsp/sparc/leon2/include) as:

#define LEON_Is_interrupt_masked( _source ) \

(LEON_REG.Interrupt_Masked & (1 << (_source)))

The LEON_REG is of type LEON_Register_Map structure and Interrupt_Masked does not exist in structure, instead Interrupt_Mask exists.

Proposed Solution: The LEON_Is_interrupt_masked should be updated to:

#define LEON_Is_interrupt_masked( _source ) \

(LEON_REG.Interrupt_Mask & (1 << (_source)))

Attachments (1)

0002-sparc-leon2-LEON_Is_interrupt_masked-for-Leon2-in-le.patch (1.0 KB) - added by Jiri Gaisler on Nov 23, 2014 at 10:15:26 PM.
Fixes the variable name and inverts condition.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on Nov 10, 2011 at 11:50:51 AM by Helder Silva

The function-like macro LEON_Is_interrupt_masked defined in leon2 (c/src/lib/libbsp/sparc/leon2/include) as:

#define LEON_Is_interrupt_masked( _source ) \

(LEON_REG.Interrupt_Masked & (1 << (_source)))

The LEON_REG is of type LEON_Register_Map structure and Interrupt_Masked does not exist in structure, instead Interrupt_Mask exists.

Proposed Solution: The LEON_Is_interrupt_masked should be updated to:

#define LEON_Is_interrupt_masked( _source ) \

(LEON_REG.Interrupt_Mask & (1 << (_source)))

comment:2 Changed on Nov 27, 2011 at 3:18:36 PM by Joel Sherrill

Cc: Jiri Gaisler added

comment:3 Changed on Nov 23, 2014 at 5:38:20 PM by Joel Sherrill

Owner: changed from Joel Sherrill to Daniel Hellstrom
Status: newassigned

Changed on Nov 23, 2014 at 10:15:26 PM by Jiri Gaisler

Fixes the variable name and inverts condition.

comment:4 Changed on Nov 23, 2014 at 10:16:59 PM by Jiri Gaisler

Resolution: fixed
Status: assignedclosed

comment:5 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

comment:6 Changed on Dec 2, 2014 at 1:04:33 PM by Jiri Gaisler <jiri@…>

In 2501814ee91a30ab6f12a02356707db3b9cc67f4/rtems:

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.

Note: See TracTickets for help on using tickets.