#1257 closed defect (fixed)

missing compiler memory barrier when using _CPU_ISR_Disable()/_CPU_ISR_Enable()

Reported by: strauman Owned by: Joel Sherrill
Priority: low Milestone: 4.7
Component: bsps Version: 4.7
Severity: major Keywords:
Cc: Blocked By:
Blocking:

Description

_CPU_ISR_Disable()/_CPU_ISR_Enable() are still widely used in libbsp, libcpu and in a few cases even in cpukit.
However, using the _CPU_ISR_xxx macros directly circumvents the compiler memory barrier that has been added to _ISR_Disable()/_ISR_Enable() recently.

I suggest that direct use of _CPU_ISR_Disable()/_CPU_ISR_Enable() be
eliminated and replaced by _ISR_Disable()/_ISR_Enable() to ensure presence
of the critical barrier. Where acceptable, the RTEMS API should be used
(rtems_interrupt_disable/rtems_interrupt_enable).

(Thanks to Pavel for bringing to our attention)

Attachments (3)

remove-cpu-isr-ables.diff (39.3 KB) - added by Chris Johns on Sep 8, 2007 at 6:25:49 AM.
Remove _CPU_ISR_*able from libbsp
cpu_isr-2.diff (91.3 KB) - added by Joel Sherrill on Sep 11, 2007 at 10:05:11 PM.
Replace CPU_ISR with rtems_interrupt in BSP and LIBCPU
cpu_isr-3.diff (91.3 KB) - added by Joel Sherrill on Sep 11, 2007 at 10:22:36 PM.
Manually verified.. version of previous patch

Download all attachments as: .zip

Change History (5)

Changed on Sep 8, 2007 at 6:25:49 AM by Chris Johns

Attachment: remove-cpu-isr-ables.diff added

Remove _CPU_ISR_*able from libbsp

Changed on Sep 11, 2007 at 10:05:11 PM by Joel Sherrill

Attachment: cpu_isr-2.diff added

Replace CPU_ISR with rtems_interrupt in BSP and LIBCPU

Changed on Sep 11, 2007 at 10:22:36 PM by Joel Sherrill

Attachment: cpu_isr-3.diff added

Manually verified.. version of previous patch

comment:1 Changed on Sep 11, 2007 at 10:22:36 PM by Joel Sherrill

attachments.isobsolete: 01, 1

comment:2 Changed on May 7, 2008 at 8:25:21 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Code was committed -- should have been closed.

Note: See TracTickets for help on using tickets.