summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/irq/i8259.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:16:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:16:41 +0000
commitfc57b7b20c0691ca9a8f637fc5830d902d73871b (patch)
tree4bd3909d2234cc13512e1a065a40e94ecd130deb /c/src/lib/libbsp/powerpc/shared/irq/i8259.c
parent2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-fc57b7b20c0691ca9a8f637fc5830d902d73871b.tar.bz2
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1257/bsps * shared/irq/i8259.c, shared/irq/irq.c: Code outside of cpukit should use the public API for rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the public API and directly accessing _CPU_ISR_Disable and _CPU_ISR_Enable, they were bypassing the compiler memory barrier directive which could lead to problems. This patch also changes the type of the variable passed into these routines and addresses minor style issues.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/i8259.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/i8259.c b/c/src/lib/libbsp/powerpc/shared/irq/i8259.c
index 6e28b3c73d..a133d16898 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/i8259.c
+++ b/c/src/lib/libbsp/powerpc/shared/irq/i8259.c
@@ -33,15 +33,15 @@ volatile rtems_i8259_masks i8259s_cache = 0xfffb;
+--------------------------------------------------------------------------*/
int BSP_irq_disable_at_i8259s (const rtems_irq_number irqLine)
{
- unsigned short mask;
- unsigned int level;
+ unsigned short mask;
+ rtems_interrupt_level level;
if ( ((int)irqLine < BSP_ISA_IRQ_LOWEST_OFFSET) ||
((int)irqLine > BSP_ISA_IRQ_MAX_OFFSET)
)
return 1;
- _CPU_ISR_Disable(level);
+ rtems_interrupt_disable(level);
mask = 1 << irqLine;
i8259s_cache |= mask;
@@ -54,7 +54,7 @@ int BSP_irq_disable_at_i8259s (const rtems_irq_number irqLine)
{
outport_byte(PIC_SLAVE_IMR_IO_PORT, ((i8259s_cache & 0xff00) >> 8));
}
- _CPU_ISR_Enable (level);
+ rtems_interrupt_enable(level);
return 0;
}
@@ -68,15 +68,15 @@ int BSP_irq_disable_at_i8259s (const rtems_irq_number irqLine)
+--------------------------------------------------------------------------*/
int BSP_irq_enable_at_i8259s (const rtems_irq_number irqLine)
{
- unsigned short mask;
- unsigned int level;
+ unsigned short mask;
+ rtems_interrupt_level level;
if ( ((int)irqLine < BSP_ISA_IRQ_LOWEST_OFFSET) ||
((int)irqLine > BSP_ISA_IRQ_MAX_OFFSET )
)
return 1;
- _CPU_ISR_Disable(level);
+ rtems_interrupt_disable(level);
mask = ~(1 << irqLine);
i8259s_cache &= mask;
@@ -89,7 +89,7 @@ int BSP_irq_enable_at_i8259s (const rtems_irq_number irqLine)
{
outport_byte(PIC_SLAVE_IMR_IO_PORT, ((i8259s_cache & 0xff00) >> 8));
}
- _CPU_ISR_Enable (level);
+ rtems_interrupt_enable(level);
return 0;
} /* mask_irq */