[PATCH 15/41] bsps/irq: bsp_interrupt_vector_enable()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Jul 12 12:49:37 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 e34a89afff..7953a2fe1f 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 13f094e1fb..d47f0362e8 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 1b13f0b461..a4bfb1f83b 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 75dffdec9f..3cff5bfff2 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 d28e4c051f..bba91f1d08 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 0514099c6f..2b266a0822 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 b81920f7e9..5e8c93909f 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 0d82e12640..763ad30692 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 56b1b4c4f1..9fc8f1b3e8 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 2ce08a9fc8..a242071be5 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 47f951cb19..95be366525 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 a7e1465822..ef38ac32db 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 bb7debf89a..ad278e6224 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 bb3c98bdd3..54b8501f96 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 valdiate
+ * 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 c539220912..6ba09e9e27 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 7261da0344..372208e6ca 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 5b0aa60af1..3e144d876b 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 48b6ea7e29..e79067da6d 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -401,7 +401,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);
@@ -429,6 +429,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 e3d5f42d8d..ec035e14c3 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -418,7 +418,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;
@@ -436,6 +436,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 2a37787166..f0a04c0398 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 6bad2a9514..6fdf83e3b6 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 bfd373a502..48783a6056 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 e9af3d747f..419fc66ce1 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -80,10 +80,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 e6a9f09ea1..98d4ef1a42 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 4e746ba78e..14c1f7c8c7 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 56cb2dbb7f..0c0bb8f1e8 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 103af361b7..4903ef7696 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -105,7 +105,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));
@@ -114,6 +114,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 6436ee3feb..9a9f4eacb4 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -174,13 +174,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 58ac1e9ba5..1b58f86fc4 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 d53124864a..e651c828d5 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 deaae253a2..85cb543945 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 f4ac4b212e..89cac60901 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 de8e7c3b6b..a8f6de21d9 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 84c576084b..6f2793c3e1 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 d9bf9d4073..a9abaa3304 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 669a7be345..9315d6dadf 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 15081e9292..39c941b3e1 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