forked from Imagelibrary/rtems
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1257/bsps * at91rm9200/irq/irq.c, lpc22xx/irq/irq.c, mc9328mxl/irq/irq.c, s3c2400/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.
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
|
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1257/bsps
|
||||||
|
* at91rm9200/irq/irq.c, lpc22xx/irq/irq.c, mc9328mxl/irq/irq.c,
|
||||||
|
s3c2400/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.
|
||||||
|
|
||||||
2007-05-01 Ray Xu <xr@trasin.net>
|
2007-05-01 Ray Xu <xr@trasin.net>
|
||||||
|
|
||||||
* lpc22xx/clock/clockdrv.c, lpc22xx/include/lpc22xx.h,
|
* lpc22xx/clock/clockdrv.c, lpc22xx/include/lpc22xx.h,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the new handler
|
* store the new handler
|
||||||
@@ -68,7 +68,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
irq->on(irq);
|
irq->on(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
if (AIC_SVR_REG(irq->name * 4) != (uint32_t) irq->hdl) {
|
if (AIC_SVR_REG(irq->name * 4) != (uint32_t) irq->hdl) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mask interrupt
|
* mask interrupt
|
||||||
@@ -109,7 +109,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
*/
|
*/
|
||||||
AIC_SVR_REG(irq->name * 4) = (uint32_t) default_int_handler;
|
AIC_SVR_REG(irq->name * 4) = (uint32_t) default_int_handler;
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the new handler
|
* store the new handler
|
||||||
@@ -76,7 +76,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
|
|
||||||
irq_counter++;
|
irq_counter++;
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
VICIntEnClr = 1 << irq->name;
|
VICIntEnClr = 1 << irq->name;
|
||||||
|
|
||||||
@@ -119,8 +119,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
*/
|
*/
|
||||||
bsp_tbl[irq->name] = default_int_handler;
|
bsp_tbl[irq->name] = default_int_handler;
|
||||||
|
|
||||||
|
rtems_interrupt_enable(level);
|
||||||
_CPU_ISR_Enable(level);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the new handler
|
* store the new handler
|
||||||
@@ -66,7 +66,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
irq->on(irq);
|
irq->on(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -106,7 +106,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
bsp_vector_table[irq->name].vector = default_int_handler;
|
bsp_vector_table[irq->name].vector = default_int_handler;
|
||||||
bsp_vector_table[irq->name].data = NULL;
|
bsp_vector_table[irq->name].data = NULL;
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the new handler
|
* store the new handler
|
||||||
@@ -69,7 +69,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
irq->on(irq);
|
irq->on(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
if (*(HdlTable + irq->name) != irq->hdl) {
|
if (*(HdlTable + irq->name) != irq->hdl) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_CPU_ISR_Disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable interrupt on device
|
* Disable interrupt on device
|
||||||
@@ -104,7 +104,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
|||||||
*/
|
*/
|
||||||
*(HdlTable + irq->name) = default_int_handler;
|
*(HdlTable + irq->name) = default_int_handler;
|
||||||
|
|
||||||
_CPU_ISR_Enable(level);
|
rtems_interrupt_enable(level);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user