#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 11/23/14 at 22:15:26.
Fixes the variable name and inverts condition.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on 11/10/11 at 11:50:51 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 11/27/11 at 15:18:36 by Joel Sherrill

Cc: Jiri Gaisler added

comment:3 Changed on 11/23/14 at 17:38:20 by Joel Sherrill

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

Changed on 11/23/14 at 22:15:26 by Jiri Gaisler

Fixes the variable name and inverts condition.

comment:4 Changed on 11/23/14 at 22:16:59 by Jiri Gaisler

Resolution: fixed
Status: assignedclosed

comment:5 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

Version: HEAD4.11

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

comment:6 Changed on 12/02/14 at 13:04:33 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.