[PATCH v3 15/42] bsps/irq: bsp_interrupt_vector_enable()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 23 13:56:23 UTC 2021


Return a status code for bsp_interrupt_vector_enable().

Update #3269.
---
 bsps/arm/beagle/irq/irq.c                 |  3 ++-
 bsps/arm/csb336/irq/irq.c                 |  4 +++-
 bsps/arm/csb337/irq/irq.c                 |  3 ++-
 bsps/arm/edb7312/irq/irq.c                |  4 +++-
 bsps/arm/gumstix/irq/irq.c                |  3 ++-
 bsps/arm/lpc24xx/irq/irq.c                |  3 ++-
 bsps/arm/lpc32xx/irq/irq.c                |  4 +++-
 bsps/arm/raspberrypi/irq/irq.c            |  3 ++-
 bsps/arm/rtl22xx/irq/irq.c                |  3 ++-
 bsps/arm/shared/irq/irq-armv7m.c          |  3 ++-
 bsps/arm/smdk2410/irq/irq.c               |  3 ++-
 bsps/arm/tms570/irq/irq.c                 |  3 ++-
 bsps/i386/shared/irq/irq.c                |  3 ++-
 bsps/include/bsp/irq-generic.h            | 16 ++++++++++------
 bsps/lm32/shared/irq/irq.c                |  3 ++-
 bsps/m68k/genmcf548x/irq/irq.c            |  4 +++-
 bsps/mips/shared/irq/irq.c                |  3 ++-
 bsps/powerpc/gen5200/irq/irq.c            |  4 +++-
 bsps/powerpc/gen83xx/irq/irq.c            |  4 +++-
 bsps/powerpc/mpc55xxevb/start/irq.c       |  3 ++-
 bsps/powerpc/mpc8260ads/irq/irq.c         |  4 +++-
 bsps/powerpc/psim/irq/irq_init.c          |  3 ++-
 bsps/powerpc/qemuppc/irq/irq_init.c       |  3 ++-
 bsps/powerpc/qoriq/irq/irq.c              |  5 +++--
 bsps/powerpc/shared/irq/ppc-irq-generic.c |  3 ++-
 bsps/powerpc/t32mppc/irq/irq.c            |  3 ++-
 bsps/powerpc/tqm8xx/irq/irq.c             |  4 +++-
 bsps/powerpc/virtex/irq/irq_init.c        |  4 +++-
 bsps/riscv/griscv/irq/irq.c               |  3 ++-
 bsps/riscv/riscv/irq/irq.c                |  4 +++-
 bsps/shared/dev/irq/arm-gicv2.c           |  3 ++-
 bsps/shared/dev/irq/arm-gicv3.c           |  4 +++-
 bsps/shared/irq/irq-default.c             |  3 ++-
 bsps/shared/irq/irq-enable-disable.c      |  4 +---
 bsps/sparc/leon3/start/eirq.c             |  3 ++-
 bsps/sparc/shared/irq/irq-shared.c        |  3 ++-
 bsps/x86_64/amd64/interrupts/idt.c        |  3 ++-
 37 files changed, 93 insertions(+), 45 deletions(-)

diff --git a/bsps/arm/beagle/irq/irq.c b/bsps/arm/beagle/irq/irq.c
index b0b7f77011..ff5ab4d15f 100644
--- a/bsps/arm/beagle/irq/irq.c
+++ b/bsps/arm/beagle/irq/irq.c
@@ -137,7 +137,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   uint32_t mask, cur;
   uint32_t mir_reg = omap_get_mir_reg(vector, &mask);
@@ -147,6 +147,7 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
   cur = mmio_read(omap_intr.base + mir_reg);
   mmio_write(omap_intr.base + mir_reg, cur & ~mask);
   flush_data_cache();
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/csb336/irq/irq.c b/bsps/arm/csb336/irq/irq.c
index c16a6d8773..4cdce1a207 100644
--- a/bsps/arm/csb336/irq/irq.c
+++ b/bsps/arm/csb336/irq/irq.c
@@ -68,12 +68,14 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
   if (vector < MC9328MXL_NUM_INTS)
     MC9328MXL_AITC_INTENNUM = vector;
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/csb337/irq/irq.c b/bsps/arm/csb337/irq/irq.c
index 98d775ce28..f2e2dbbed8 100644
--- a/bsps/arm/csb337/irq/irq.c
+++ b/bsps/arm/csb337/irq/irq.c
@@ -69,10 +69,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   AIC_CTL_REG(AIC_IECR) = 1 << vector;
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/edb7312/irq/irq.c b/bsps/arm/edb7312/irq/irq.c
index 9a64e069d0..820628a61d 100644
--- a/bsps/arm/edb7312/irq/irq.c
+++ b/bsps/arm/edb7312/irq/irq.c
@@ -69,7 +69,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
     bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
@@ -93,6 +93,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
         /* interrupt managed by INTMR3 and INTSR3 */
         *EP7312_INTMR3 |= (1 << (vector - 21));
     }
+
+    return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/gumstix/irq/irq.c b/bsps/arm/gumstix/irq/irq.c
index ff465c0308..da90bc77d9 100644
--- a/bsps/arm/gumstix/irq/irq.c
+++ b/bsps/arm/gumstix/irq/irq.c
@@ -66,10 +66,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   XSCALE_INT_ICMR |= 1 << vector;
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/lpc24xx/irq/irq.c b/bsps/arm/lpc24xx/irq/irq.c
index 0475bb2cc7..94ea9f880b 100644
--- a/bsps/arm/lpc24xx/irq/irq.c
+++ b/bsps/arm/lpc24xx/irq/irq.c
@@ -106,10 +106,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   VICIntEnable = 1U << vector;
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/lpc32xx/irq/irq.c b/bsps/arm/lpc32xx/irq/irq.c
index 73c91defb5..6bd7455d63 100644
--- a/bsps/arm/lpc32xx/irq/irq.c
+++ b/bsps/arm/lpc32xx/irq/irq.c
@@ -302,7 +302,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   rtems_interrupt_level level;
 
@@ -312,6 +312,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
   lpc32xx_irq_set_bit_in_register(vector, LPC32XX_IRQ_OFFSET_ER);
   lpc32xx_irq_set_bit_in_field(vector, &lpc32xx_irq_enable);
   rtems_interrupt_enable(level);
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index 96a7d6d42d..1298a8935b 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -196,11 +196,12 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   BCM2835_REG(bsp_vector_to_reg(vector)->enable_reg_addr) =
               bsp_vector_to_mask(vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/rtl22xx/irq/irq.c b/bsps/arm/rtl22xx/irq/irq.c
index 1600745d19..2212bcea4e 100644
--- a/bsps/arm/rtl22xx/irq/irq.c
+++ b/bsps/arm/rtl22xx/irq/irq.c
@@ -68,10 +68,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   VICIntEnable |= 1 << vector;
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/shared/irq/irq-armv7m.c b/bsps/arm/shared/irq/irq-armv7m.c
index 6b11fc88ca..a51fb53718 100644
--- a/bsps/arm/shared/irq/irq-armv7m.c
+++ b/bsps/arm/shared/irq/irq-armv7m.c
@@ -80,10 +80,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   _ARMV7M_NVIC_Set_enable((int) vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/smdk2410/irq/irq.c b/bsps/arm/smdk2410/irq/irq.c
index ac9067299f..b4ea8d30ce 100644
--- a/bsps/arm/smdk2410/irq/irq.c
+++ b/bsps/arm/smdk2410/irq/irq.c
@@ -69,9 +69,10 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/arm/tms570/irq/irq.c b/bsps/arm/tms570/irq/irq.c
index ec088d9b6b..df3f097a1e 100644
--- a/bsps/arm/tms570/irq/irq.c
+++ b/bsps/arm/tms570/irq/irq.c
@@ -138,12 +138,13 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(
+rtems_status_code bsp_interrupt_vector_enable(
   rtems_vector_number vector
 )
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   TMS570_VIM.REQENASET[vector >> 5] = 1 << (vector & 0x1f);
+  return RTEMS_SUCCESSFUL;
 }
 
 /**
diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index b1bf04dd1b..edb7a257d7 100644
--- a/bsps/i386/shared/irq/irq.c
+++ b/bsps/i386/shared/irq/irq.c
@@ -312,10 +312,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   BSP_irq_enable_at_i8259a(vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
index c7888b5be4..8cd771ca16 100644
--- a/bsps/include/bsp/irq-generic.h
+++ b/bsps/include/bsp/irq-generic.h
@@ -258,20 +258,24 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
 );
 
 /**
- * @brief Enables the interrupt vector with number @a vector.
+ * @brief Enables the interrupt vector.
  *
  * This function shall enable the vector at the corresponding facility (in most
  * cases the interrupt controller).  It will be called then the first handler
  * is installed for the vector in bsp_interrupt_handler_install() for example.
  *
  * @note The implementation should use
- * bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector)) to valdiate the
- * vector number.
+ * bsp_interrupt_assert( bsp_interrupt_is_valid_vector( vector ) ) to validate
+ * the vector number in ::RTEMS_DEBUG configurations.
  *
- * @note You must not install or remove an interrupt handler in this function.
- * This may result in a deadlock.
+ * @param vector is the interrupt vector number.
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ *
+ * @retval ::RTEMS_UNSATISFIED The request to enable the interrupt vector has
+ *   not been satisfied.
  */
-void bsp_interrupt_vector_enable(rtems_vector_number vector);
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number vector );
 
 /**
  * @brief Disables the interrupt vector with number @a vector.
diff --git a/bsps/lm32/shared/irq/irq.c b/bsps/lm32/shared/irq/irq.c
index 7a1d10db92..6358eb88e6 100644
--- a/bsps/lm32/shared/irq/irq.c
+++ b/bsps/lm32/shared/irq/irq.c
@@ -59,10 +59,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   lm32_interrupt_unmask(1 << vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/m68k/genmcf548x/irq/irq.c b/bsps/m68k/genmcf548x/irq/irq.c
index 81dbf08fa4..5d6446f9b2 100644
--- a/bsps/m68k/genmcf548x/irq/irq.c
+++ b/bsps/m68k/genmcf548x/irq/irq.c
@@ -101,7 +101,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   volatile uint32_t *imr = vector_to_imr(vector);
   uint32_t bit = vector_to_bit(vector);
@@ -112,6 +112,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
   rtems_interrupt_disable(level);
   *imr &= ~bit;
   rtems_interrupt_enable(level);
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/mips/shared/irq/irq.c b/bsps/mips/shared/irq/irq.c
index b78ea7a2a0..35e1419515 100644
--- a/bsps/mips/shared/irq/irq.c
+++ b/bsps/mips/shared/irq/irq.c
@@ -109,9 +109,10 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/powerpc/gen5200/irq/irq.c b/bsps/powerpc/gen5200/irq/irq.c
index 07b080a335..a3969ef5cb 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -399,7 +399,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable( rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number vector)
 {
   int base_index = get_siu_irq_base_index( vector);
 
@@ -427,6 +427,8 @@ void bsp_interrupt_vector_enable( rtems_vector_number vector)
 
     rtems_interrupt_enable( level);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 /*
diff --git a/bsps/powerpc/gen83xx/irq/irq.c b/bsps/powerpc/gen83xx/irq/irq.c
index 918e398e9b..4e48a484f9 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -416,7 +416,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable( rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number vector)
 {
   rtems_vector_number vecnum = vector - BSP_IPIC_IRQ_LOWEST_OFFSET;
   const BSP_isrc_rsc_t *rsc_ptr;
@@ -434,6 +434,8 @@ void bsp_interrupt_vector_enable( rtems_vector_number vector)
       rtems_interrupt_enable(level);
     }
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable( rtems_vector_number vector)
diff --git a/bsps/powerpc/mpc55xxevb/start/irq.c b/bsps/powerpc/mpc55xxevb/start/irq.c
index 246dfb11a5..9a685857d8 100644
--- a/bsps/powerpc/mpc55xxevb/start/irq.c
+++ b/bsps/powerpc/mpc55xxevb/start/irq.c
@@ -194,10 +194,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable( rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number vector)
 {
 	bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 	mpc55xx_intc_set_priority( vector, MPC55XX_INTC_DEFAULT_PRIORITY);
+	return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable( rtems_vector_number vector)
diff --git a/bsps/powerpc/mpc8260ads/irq/irq.c b/bsps/powerpc/mpc8260ads/irq/irq.c
index 7b536aa73b..395e737c93 100644
--- a/bsps/powerpc/mpc8260ads/irq/irq.c
+++ b/bsps/powerpc/mpc8260ads/irq/irq.c
@@ -370,7 +370,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(irqnum));
 
@@ -380,6 +380,8 @@ void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
      */
     BSP_irq_enable_at_cpm (irqnum);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
diff --git a/bsps/powerpc/psim/irq/irq_init.c b/bsps/powerpc/psim/irq/irq_init.c
index a278e2c3bd..20d38aeffb 100644
--- a/bsps/powerpc/psim/irq/irq_init.c
+++ b/bsps/powerpc/psim/irq/irq_init.c
@@ -144,10 +144,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
 {
   /* FIXME: do something */
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(irqnum));
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
diff --git a/bsps/powerpc/qemuppc/irq/irq_init.c b/bsps/powerpc/qemuppc/irq/irq_init.c
index bf7cb4e77d..a8da699c9b 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -78,10 +78,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
 /*
  * functions to enable/disable a source at the ipic
  */
-void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
+rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum)
 {
   /* FIXME: do something */
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(irqnum));
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable( rtems_vector_number irqnum)
diff --git a/bsps/powerpc/qoriq/irq/irq.c b/bsps/powerpc/qoriq/irq/irq.c
index 141a2a85fc..502d8b7030 100644
--- a/bsps/powerpc/qoriq/irq/irq.c
+++ b/bsps/powerpc/qoriq/irq/irq.c
@@ -130,10 +130,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
 	bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 	ev_int_set_mask(vector, 0);
+	return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
@@ -396,7 +397,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
 	pic_vector_enable(vector, 0);
 }
diff --git a/bsps/powerpc/shared/irq/ppc-irq-generic.c b/bsps/powerpc/shared/irq/ppc-irq-generic.c
index 60d9ad476e..8f706a0f31 100644
--- a/bsps/powerpc/shared/irq/ppc-irq-generic.c
+++ b/bsps/powerpc/shared/irq/ppc-irq-generic.c
@@ -137,10 +137,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   BSP_enable_irq_at_pic(vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/powerpc/t32mppc/irq/irq.c b/bsps/powerpc/t32mppc/irq/irq.c
index 27afe14f29..09f563721e 100644
--- a/bsps/powerpc/t32mppc/irq/irq.c
+++ b/bsps/powerpc/t32mppc/irq/irq.c
@@ -58,9 +58,10 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
 	bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+	return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_dispatch(uintptr_t exception_number)
diff --git a/bsps/powerpc/tqm8xx/irq/irq.c b/bsps/powerpc/tqm8xx/irq/irq.c
index 479e7ca705..41861971bc 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -103,7 +103,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
@@ -112,6 +112,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
   } else if (BSP_IS_SIU_IRQ(vector)) {
     bsp_irq_enable_at_SIU(vector);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/powerpc/virtex/irq/irq_init.c b/bsps/powerpc/virtex/irq/irq_init.c
index 0f1d6e7d6f..1b3a34856b 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -172,13 +172,15 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
   if (BSP_IS_OPBINTC_IRQ(vector)) {
     BSP_irq_enable_at_opbintc(vector);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/riscv/griscv/irq/irq.c b/bsps/riscv/griscv/irq/irq.c
index ae2aedf8bc..44251a0479 100644
--- a/bsps/riscv/griscv/irq/irq.c
+++ b/bsps/riscv/griscv/irq/irq.c
@@ -140,11 +140,12 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   int irq = (int)vector;
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   GRLIB_Cpu_Unmask_interrupt(irq, bsp_irq_cpu(irq));
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 1f74169579..7672ec649a 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -279,7 +279,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
@@ -319,6 +319,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
 
     rtems_interrupt_lock_release(&riscv_plic_lock, &lock_context);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/shared/dev/irq/arm-gicv2.c b/bsps/shared/dev/irq/arm-gicv2.c
index f53137c17b..16169c4ea9 100644
--- a/bsps/shared/dev/irq/arm-gicv2.c
+++ b/bsps/shared/dev/irq/arm-gicv2.c
@@ -117,13 +117,14 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   volatile gic_dist *dist = ARM_GIC_DIST;
 
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
 
   gic_id_enable(dist, vector);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index fc48f4349d..027de85338 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -217,7 +217,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
 
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
@@ -239,6 +239,8 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
     /* Set enable */
     sgi_ppi->icspiser[0] = 1 << (vector % 32);
   }
+
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/shared/irq/irq-default.c b/bsps/shared/irq/irq-default.c
index 09e0cec052..f786c71d3e 100644
--- a/bsps/shared/irq/irq-default.c
+++ b/bsps/shared/irq/irq-default.c
@@ -79,10 +79,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   (void)vector;
+  return RTEMS_UNSATISFIED;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/shared/irq/irq-enable-disable.c b/bsps/shared/irq/irq-enable-disable.c
index 1d46203d90..36b7babe4e 100644
--- a/bsps/shared/irq/irq-enable-disable.c
+++ b/bsps/shared/irq/irq-enable-disable.c
@@ -88,9 +88,7 @@ rtems_status_code rtems_interrupt_vector_enable( rtems_vector_number vector )
     return RTEMS_INVALID_ID;
   }
 
-  bsp_interrupt_vector_enable( vector );
-
-  return RTEMS_SUCCESSFUL;
+  return bsp_interrupt_vector_enable( vector );
 }
 
 rtems_status_code rtems_interrupt_vector_disable( rtems_vector_number vector )
diff --git a/bsps/sparc/leon3/start/eirq.c b/bsps/sparc/leon3/start/eirq.c
index 8527cdb645..810918c534 100644
--- a/bsps/sparc/leon3/start/eirq.c
+++ b/bsps/sparc/leon3/start/eirq.c
@@ -151,7 +151,7 @@ static void leon3_interrupt_vector_enable(rtems_vector_number vector)
 }
 #endif
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
 #if defined(RTEMS_SMP)
   rtems_interrupt_lock_context lock_context;
@@ -164,6 +164,7 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector)
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   BSP_Cpu_Unmask_interrupt(vector, _LEON3_Get_current_processor());
 #endif
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/sparc/shared/irq/irq-shared.c b/bsps/sparc/shared/irq/irq-shared.c
index 9f85d9298a..3629a1f9e8 100644
--- a/bsps/sparc/shared/irq/irq-shared.c
+++ b/bsps/sparc/shared/irq/irq-shared.c
@@ -85,10 +85,11 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
   BSP_Cpu_Unmask_interrupt(vector, 0);
+  return RTEMS_SUCCESSFUL;
 }
 
 void bsp_interrupt_vector_disable(rtems_vector_number vector)
diff --git a/bsps/x86_64/amd64/interrupts/idt.c b/bsps/x86_64/amd64/interrupts/idt.c
index 4cb71a6c66..fb0b4bca47 100644
--- a/bsps/x86_64/amd64/interrupts/idt.c
+++ b/bsps/x86_64/amd64/interrupts/idt.c
@@ -188,7 +188,8 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   return RTEMS_UNSATISFIED;
 }
 
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
+rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
 {
   /* XXX */
+  return RTEMS_SUCCESSFUL;
 }
-- 
2.26.2



More information about the devel mailing list