Index: c/src/lib/libbsp/powerpc/ep1a/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision 5797b67d2dd448f78f899ef26b1c41788ecc5516)
+++ c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision fc57b7b20c0691ca9a8f637fc5830d902d73871b)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* 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-08-01	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: c/src/lib/libbsp/powerpc/ep1a/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/irq/irq.c	(revision 5797b67d2dd448f78f899ef26b1c41788ecc5516)
+++ c/src/lib/libbsp/powerpc/ep1a/irq/irq.c	(revision fc57b7b20c0691ca9a8f637fc5830d902d73871b)
@@ -101,5 +101,5 @@
 int BSP_install_rtems_shared_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level   level;
     rtems_irq_connect_data* vchain;
 
@@ -110,8 +110,8 @@
     printk("Install Shared interrupt %d\n", irq->name);
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
 
     if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected to an unshared handler\n",irq->name);
       return 0;
@@ -157,5 +157,5 @@
     irq->on(irq);
     
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -169,5 +169,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -182,7 +182,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected\n",irq->name);
       return 0;
@@ -219,5 +219,5 @@
     irq->on(irq);
     
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -227,19 +227,19 @@
 int BSP_get_current_rtems_irq_handler	(rtems_irq_connect_data* irq)
 {
-     unsigned int level;
-
-     if (!isValidInterrupt(irq->name)) {
-      return 0;
-     }
-     _CPU_ISR_Disable(level);
-     *irq = rtems_hdl_tbl[irq->name];
-     _CPU_ISR_Enable(level);
-     return 1;
+    rtems_interrupt_level       level;
+
+    if (!isValidInterrupt(irq->name)) {
+      return 0;
+    }
+    rtems_interrupt_disable(level);
+      *irq = rtems_hdl_tbl[irq->name];
+    rtems_interrupt_enable(level);
+    return 1;
 }
 
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-   rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
-    unsigned int level;
+    rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
+    rtems_interrupt_level   level;
   
     if (!isValidInterrupt(irq->name)) {
@@ -253,7 +253,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       return 0;
     }
@@ -275,5 +275,5 @@
        if( !found )
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
           return 0;
        }
@@ -283,5 +283,5 @@
        if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) 
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
          return 0;
        }
@@ -336,5 +336,5 @@
     }
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -347,9 +347,10 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
 {
-    int i;
-    unsigned int level;
-   /*
-    * Store various code accelerators
-    */
+    int                    i;
+    rtems_interrupt_level  level;
+
+    /*
+     * Store various code accelerators
+     */
     internal_config 		= config;
     default_rtems_entry 	= config->defaultEntry;
@@ -357,5 +358,5 @@
     return 1;  
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     /*
      * set up internal tables used by rtems interrupt prologue
@@ -429,5 +430,5 @@
       }
     }
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
     return 1;
 }
