[PATCH 13/16] bsps: Interrupt initialization error is fatal

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 14 15:47:07 UTC 2012


---
 c/src/lib/libbsp/arm/csb336/startup/bspstart.c     |    4 +--
 c/src/lib/libbsp/arm/csb337/startup/bspstart.c     |    4 +--
 c/src/lib/libbsp/arm/edb7312/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/arm/gba/startup/bspstart.c        |    4 +--
 c/src/lib/libbsp/arm/gp32/startup/bspstart.c       |    4 +--
 c/src/lib/libbsp/arm/gumstix/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c   |    4 +--
 c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c    |    4 +--
 c/src/lib/libbsp/i386/shared/irq/irq_init.c        |    8 +----
 .../lib/libbsp/powerpc/gen5200/startup/bspstart.c  |    5 +--
 .../lib/libbsp/powerpc/gen83xx/startup/bspstart.c  |    5 +--
 c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c |    5 +--
 .../libbsp/powerpc/mpc55xxevb/startup/bspstart.c   |    5 +--
 .../libbsp/powerpc/mpc8260ads/startup/bspstart.c   |    6 +---
 .../lib/libbsp/powerpc/qemuppc/startup/bspstart.c  |    5 +--
 c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c  |    5 +--
 .../lib/libbsp/powerpc/t32mppc/startup/bspstart.c  |    5 +--
 c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c |    5 +--
 c/src/lib/libbsp/shared/include/bootcard.h         |    7 ++++
 c/src/lib/libbsp/shared/include/irq-generic.h      |   12 +++++--
 c/src/lib/libbsp/shared/src/irq-generic.c          |   33 ++++++++------------
 c/src/lib/libbsp/sparc/erc32/include/bsp.h         |    2 +-
 c/src/lib/libbsp/sparc/leon2/include/bsp.h         |    2 +-
 c/src/lib/libbsp/sparc/leon3/include/bsp.h         |    2 +-
 c/src/lib/libbsp/sparc/shared/irq/irq-shared.c     |    8 +---
 28 files changed, 54 insertions(+), 110 deletions(-)

diff --git a/c/src/lib/libbsp/arm/csb336/startup/bspstart.c b/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
index d3b64e2..253052d 100644
--- a/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
@@ -63,9 +63,7 @@ void bsp_start_default( void )
   /*
    * Init rtems interrupt management
    */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 } /* bsp_start */
 
 /* Calcuate the frequency for perclk1 */
diff --git a/c/src/lib/libbsp/arm/csb337/startup/bspstart.c b/c/src/lib/libbsp/arm/csb337/startup/bspstart.c
index ce899b8..d0bc764 100644
--- a/c/src/lib/libbsp/arm/csb337/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/csb337/startup/bspstart.c
@@ -62,9 +62,7 @@ void bsp_start_default( void )
   /*
    * Init rtems interrupt management
    */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 
 } /* bsp_start */
 
diff --git a/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c b/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
index 9799465..1ae7b67 100644
--- a/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/edb7312/startup/bspstart.c
@@ -43,9 +43,7 @@ void bsp_start_default( void )
   /*
    * Init rtems interrupt management
    */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 } /* bsp_start */
 
 /*
diff --git a/c/src/lib/libbsp/arm/gba/startup/bspstart.c b/c/src/lib/libbsp/arm/gba/startup/bspstart.c
index 4af85fb..0bc1ab5 100644
--- a/c/src/lib/libbsp/arm/gba/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/gba/startup/bspstart.c
@@ -46,9 +46,7 @@ void bsp_start_default( void )
   /* rtems_exception_init_mngt(); */
 
   /* Init rtems interrupt management */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 }
 
 /**
diff --git a/c/src/lib/libbsp/arm/gp32/startup/bspstart.c b/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
index 0eca8a9..cfedc24 100644
--- a/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
@@ -92,9 +92,7 @@ void bsp_start_default( void )
   /*
    * Init rtems interrupt management
    */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 }
 
 /*
diff --git a/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c b/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c
index b184269..369e3fc 100644
--- a/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/gumstix/startup/bspstart.c
@@ -34,9 +34,7 @@ void bsp_start_default( void )
   /* disable interrupts */
   XSCALE_INT_ICMR = 0x0;
   rtems_exception_init_mngt();
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 } /* bsp_start */
 
 /*
diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c
index dfd68f5..a8b54f2 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c
@@ -20,7 +20,5 @@
 
 void bsp_start(void)
 {
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 }
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c b/c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c
index a68e6b8..4a1b119 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c
@@ -87,9 +87,7 @@ void bsp_start(void)
   initialize_console();
 
   /* Interrupts */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 
   /* DMA */
   lpc24xx_dma_initialize();
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c
index ec900a5..67ab94a 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c
@@ -29,7 +29,5 @@
 
 void bsp_start(void)
 {
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 }
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c b/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
index bf63ee3..f550ad1 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
@@ -85,9 +85,7 @@ void bsp_start_default( void )
   /*
    * Init rtems interrupt management
    */
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 } /* bsp_start */
 
 /*
diff --git a/c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c b/c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c
index fb1d5b1..3bea8f9 100644
--- a/c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c
@@ -22,7 +22,5 @@ void bsp_start(void)
 {
   stm32f4_gpio_set_config_array(&stm32f4_start_config_gpio [0]);
 
-  if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-    _CPU_Fatal_halt(0xe);
-  }
+  bsp_interrupt_initialize();
 }
diff --git a/c/src/lib/libbsp/i386/shared/irq/irq_init.c b/c/src/lib/libbsp/i386/shared/irq/irq_init.c
index ff06ce4..938df7b 100644
--- a/c/src/lib/libbsp/i386/shared/irq/irq_init.c
+++ b/c/src/lib/libbsp/i386/shared/irq/irq_init.c
@@ -158,13 +158,7 @@ void  rtems_irq_mngt_init(void)
     /*
      * Init initial Interrupt management config
      */
-    if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
-      /*
-       * put something here that will show the failure...
-       */
-      printk("Unable to initialize RTEMS interrupt Management!!! System locked\n");
-      while (1);
-    }
+    bsp_interrupt_initialize();
 
     /*
      * #define DEBUG
diff --git a/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
index ef948fc..b71d6c5 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c
@@ -184,10 +184,7 @@ void bsp_start(void)
   ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler);
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts");
-  }
+  bsp_interrupt_initialize();
 
   /*
    *  If the BSP was built with IRQ benchmarking enabled,
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
index 9149c7b..6baf0ca 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c
@@ -150,10 +150,7 @@ void bsp_start( void)
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts\n");
-  }
+  bsp_interrupt_initialize();
 
 #ifdef SHOW_MORE_INIT_SETTINGS
   printk("Exit from bspstart\n");
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
index c4e9638..1e76c45 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
@@ -123,10 +123,7 @@ void bsp_start(void)
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if ( sc != RTEMS_SUCCESSFUL ) {
-    BSP_panic( "cannot initialize interrupts" );
-  }
+  bsp_interrupt_initialize();
 
   /*
    *  initialize the device driver parameters
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
index 94f2f93..d6a29e4 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c
@@ -130,10 +130,7 @@ void bsp_start(void)
 	ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler);
 
 	/* Initialize interrupts */
-	sc = bsp_interrupt_initialize();
-	if (sc != RTEMS_SUCCESSFUL) {
-		BSP_panic( "Cannot initialize interrupts");
-	}
+	bsp_interrupt_initialize();
 
 	mpc55xx_edma_init();
 	#ifdef MPC55XX_EMIOS_PRESCALER
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
index 26581ad..d1f91f0 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
@@ -183,11 +183,7 @@ void bsp_start(void)
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts");
-  }
-
+  bsp_interrupt_initialize();
 
 /*
   mmu_init();
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
index c0549de..4c10af9 100644
--- a/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c
@@ -107,10 +107,7 @@ void bsp_start( void )
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts");
-  }
+  bsp_interrupt_initialize();
 
 #if 0
   /*
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
index 147254b..d76dae5 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c
@@ -126,10 +126,7 @@ void bsp_start(void)
   );
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts\n");
-  }
+  bsp_interrupt_initialize();
 
   /* Disable boot page translation */
   qoriq.lcc.bptr &= ~BPTR_EN;
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c b/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
index 299f760..50db2cd 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
@@ -77,8 +77,5 @@ void bsp_start(void)
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot initialize interrupts\n");
-  }
+  bsp_interrupt_initialize();
 }
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
index dd8aa59..7657390 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c
@@ -192,10 +192,7 @@ void bsp_start( void)
   }
 
   /* Initalize interrupt support */
-  sc = bsp_interrupt_initialize();
-  if (sc != RTEMS_SUCCESSFUL) {
-    BSP_panic("cannot intitialize interrupts");
-  }
+  bsp_interrupt_initialize();
 
 #ifdef SHOW_MORE_INIT_SETTINGS
   printk("Exit from bspstart\n");
diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h
index 1350bb6..610f175 100644
--- a/c/src/lib/libbsp/shared/include/bootcard.h
+++ b/c/src/lib/libbsp/shared/include/bootcard.h
@@ -51,6 +51,13 @@ extern "C" {
  */
 
 /**
+ * @brief Generic BSP fatal error codes.
+ */
+typedef enum {
+  BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
+} bsp_generic_fatal_code;
+
+/**
  * @brief Global pointer to the command line of boot_card().
  */
 extern const char *bsp_boot_cmdline;
diff --git a/c/src/lib/libbsp/shared/include/irq-generic.h b/c/src/lib/libbsp/shared/include/irq-generic.h
index d7d5cd0..e3f4d07 100644
--- a/c/src/lib/libbsp/shared/include/irq-generic.h
+++ b/c/src/lib/libbsp/shared/include/irq-generic.h
@@ -163,11 +163,15 @@ void bsp_interrupt_handler_default(rtems_vector_number vector);
  * @brief Initialize BSP interrupt support.
  *
  * You must call this function before you can install, remove and dispatch
- * interrupt handlers.  The BSP specific bsp_interrupt_facility_initialize()
- * function will be called after all internals are initialized.  Initialization
- * is complete if everything was successful.
+ * interrupt handlers.  There is no protection against concurrent
+ * initialization.  This function must be called at most once.  The BSP
+ * specific bsp_interrupt_facility_initialize() function will be called after
+ * all internals are initialized.  If the BSP specific initialization fails,
+ * then this is a fatal error.  The fatal error source is
+ * RTEMS_FATAL_SOURCE_BSP_GENERIC and the fatal error code is
+ * BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION.
  */
-rtems_status_code bsp_interrupt_initialize(void);
+void bsp_interrupt_initialize(void);
 
 /**
  * @brief BSP specific initialization.
diff --git a/c/src/lib/libbsp/shared/src/irq-generic.c b/c/src/lib/libbsp/shared/src/irq-generic.c
index d0d5932..5cf9c91 100644
--- a/c/src/lib/libbsp/shared/src/irq-generic.c
+++ b/c/src/lib/libbsp/shared/src/irq-generic.c
@@ -9,12 +9,13 @@
 /*
  * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
  *
- * Copyright (c) 2008, 2009
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * D-82178 Puchheim
- * Germany
- * <rtems at embedded-brains.de>
+ * Copyright (c) 2008-2012 embedded brains GmbH.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
  *
  * The license and distribution terms for this file may be
  * found in the file LICENSE in this distribution or at
@@ -22,6 +23,7 @@
  */
 
 #include <bsp/irq-generic.h>
+#include <bsp/bootcard.h>
 
 #include <stdlib.h>
 
@@ -155,18 +157,11 @@ static void bsp_interrupt_unlock(void)
   }
 }
 
-rtems_status_code bsp_interrupt_initialize(void)
+void bsp_interrupt_initialize(void)
 {
   rtems_status_code sc = RTEMS_SUCCESSFUL;
   size_t i = 0;
 
-  bsp_interrupt_lock();
-
-  if (bsp_interrupt_is_initialized()) {
-    bsp_interrupt_unlock();
-    return RTEMS_INTERNAL_ERROR;
-  }
-
   /* Initialize handler table */
   for (i = 0; i < BSP_INTERRUPT_HANDLER_TABLE_SIZE; ++i) {
     bsp_interrupt_handler_table [i].handler = bsp_interrupt_handler_empty;
@@ -175,15 +170,13 @@ rtems_status_code bsp_interrupt_initialize(void)
 
   sc = bsp_interrupt_facility_initialize();
   if (sc != RTEMS_SUCCESSFUL) {
-    bsp_interrupt_unlock();
-    return sc;
+    rtems_fatal(
+      RTEMS_FATAL_SOURCE_BSP_GENERIC,
+      BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
+    );
   }
 
   bsp_interrupt_set_initialized();
-
-  bsp_interrupt_unlock();
-
-  return RTEMS_SUCCESSFUL;
 }
 
 /**
diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
index 5b3731d..652af55 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
@@ -93,7 +93,7 @@ void *bsp_early_malloc(int size);
 typedef void (*bsp_shared_isr)(void *arg);
 
 /* Initializes the Shared System Interrupt service */
-extern int BSP_shared_interrupt_init(void);
+extern void BSP_shared_interrupt_init(void);
 
 /* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  * interrupt handlers may use the same IRQ number, all ISRs will be called
diff --git a/c/src/lib/libbsp/sparc/leon2/include/bsp.h b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
index 26b16a3..a3fef56 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
@@ -113,7 +113,7 @@ void *bsp_early_malloc(int size);
 typedef void (*bsp_shared_isr)(void *arg);
 
 /* Initializes the Shared System Interrupt service */
-extern int BSP_shared_interrupt_init(void);
+extern void BSP_shared_interrupt_init(void);
 
 /* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  * interrupt handlers may use the same IRQ number, all ISRs will be called
diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
index 3811423..8915246 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
@@ -126,7 +126,7 @@ void *bsp_early_malloc(int size);
 typedef void (*bsp_shared_isr)(void *arg);
 
 /* Initializes the Shared System Interrupt service */
-extern int BSP_shared_interrupt_init(void);
+extern void BSP_shared_interrupt_init(void);
 
 /* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  * interrupt handlers may use the same IRQ number, all ISRs will be called
diff --git a/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c b/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c
index 22f2564..d2e7768 100644
--- a/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c
+++ b/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c
@@ -25,7 +25,7 @@ static void BSP_ISR_handler(rtems_vector_number vector)
 }
 
 /* Initialize interrupts */
-int BSP_shared_interrupt_init(void)
+void BSP_shared_interrupt_init(void)
 {
        rtems_vector_number vector;
        rtems_isr_entry previous_isr;
@@ -37,11 +37,7 @@ int BSP_shared_interrupt_init(void)
        }
 
        /* Initalize interrupt support */
-       sc = bsp_interrupt_initialize();
-       if (sc != RTEMS_SUCCESSFUL)
-               return -1;
-
-       return 0;
+       bsp_interrupt_initialize();
 }
 
 /* Callback from bsp_interrupt_initialize() */
-- 
1.7.7




More information about the devel mailing list