[PATCH v3 11/42] bsps/irq: Add rtems_interrupt_vector_is_enabled()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 23 13:56:19 UTC 2021
Add a default implementation which just returns RTEMS_UNSATISFIED for
valid parameters.
Update #3269.
---
bsps/arm/beagle/irq/irq.c | 11 +++++++++++
bsps/arm/csb336/irq/irq.c | 11 +++++++++++
bsps/arm/csb337/irq/irq.c | 11 +++++++++++
bsps/arm/edb7312/irq/irq.c | 11 +++++++++++
bsps/arm/gumstix/irq/irq.c | 11 +++++++++++
bsps/arm/lpc24xx/irq/irq.c | 11 +++++++++++
bsps/arm/lpc32xx/irq/irq.c | 11 +++++++++++
bsps/arm/raspberrypi/irq/irq.c | 11 +++++++++++
bsps/arm/rtl22xx/irq/irq.c | 11 +++++++++++
bsps/arm/shared/irq/irq-armv7m.c | 11 +++++++++++
bsps/arm/smdk2410/irq/irq.c | 11 +++++++++++
bsps/arm/tms570/irq/irq.c | 11 +++++++++++
bsps/i386/shared/irq/irq.c | 11 +++++++++++
bsps/include/bsp/irq-generic.h | 23 +++++++++++++++++++++++
bsps/lm32/shared/irq/irq.c | 11 +++++++++++
bsps/m68k/genmcf548x/irq/irq.c | 11 +++++++++++
bsps/mips/shared/irq/irq.c | 11 +++++++++++
bsps/powerpc/gen5200/irq/irq.c | 11 +++++++++++
bsps/powerpc/gen83xx/irq/irq.c | 11 +++++++++++
bsps/powerpc/mpc55xxevb/start/irq.c | 11 +++++++++++
bsps/powerpc/mpc8260ads/irq/irq.c | 11 +++++++++++
bsps/powerpc/psim/irq/irq_init.c | 11 +++++++++++
bsps/powerpc/qemuppc/irq/irq_init.c | 11 +++++++++++
bsps/powerpc/qoriq/irq/irq.c | 22 ++++++++++++++++++++++
bsps/powerpc/shared/irq/ppc-irq-generic.c | 11 +++++++++++
bsps/powerpc/t32mppc/irq/irq.c | 11 +++++++++++
bsps/powerpc/tqm8xx/irq/irq.c | 11 +++++++++++
bsps/powerpc/virtex/irq/irq_init.c | 11 +++++++++++
bsps/riscv/griscv/irq/irq.c | 11 +++++++++++
bsps/riscv/riscv/irq/irq.c | 11 +++++++++++
bsps/shared/dev/irq/arm-gicv2.c | 11 +++++++++++
bsps/shared/dev/irq/arm-gicv3.c | 11 +++++++++++
bsps/shared/irq/irq-default.c | 11 +++++++++++
bsps/shared/irq/irq-enable-disable.c | 19 ++++++++++++++++++-
bsps/sparc/leon3/start/eirq.c | 11 +++++++++++
bsps/sparc/shared/irq/irq-shared.c | 11 +++++++++++
bsps/x86_64/amd64/interrupts/idt.c | 11 +++++++++++
37 files changed, 437 insertions(+), 1 deletion(-)
diff --git a/bsps/arm/beagle/irq/irq.c b/bsps/arm/beagle/irq/irq.c
index 8e9294cae9..d0a07d1937 100644
--- a/bsps/arm/beagle/irq/irq.c
+++ b/bsps/arm/beagle/irq/irq.c
@@ -95,6 +95,17 @@ static uint32_t omap_get_mir_reg(rtems_vector_number vector, uint32_t *const mas
return mir_reg;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
uint32_t mask, cur;
diff --git a/bsps/arm/csb336/irq/irq.c b/bsps/arm/csb336/irq/irq.c
index e5887b9717..80914fe28f 100644
--- a/bsps/arm/csb336/irq/irq.c
+++ b/bsps/arm/csb336/irq/irq.c
@@ -26,6 +26,17 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/csb337/irq/irq.c b/bsps/arm/csb337/irq/irq.c
index 95e93845b9..5276374a1e 100644
--- a/bsps/arm/csb337/irq/irq.c
+++ b/bsps/arm/csb337/irq/irq.c
@@ -27,6 +27,17 @@ void bsp_interrupt_dispatch(void)
AIC_CTL_REG(AIC_EOICR) = 0;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/edb7312/irq/irq.c b/bsps/arm/edb7312/irq/irq.c
index 1d9151a1bd..d11cbf78c3 100644
--- a/bsps/arm/edb7312/irq/irq.c
+++ b/bsps/arm/edb7312/irq/irq.c
@@ -27,6 +27,17 @@ void edb7312_interrupt_dispatch(rtems_vector_number vector)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/gumstix/irq/irq.c b/bsps/arm/gumstix/irq/irq.c
index 425795b165..3b62b8f42c 100644
--- a/bsps/arm/gumstix/irq/irq.c
+++ b/bsps/arm/gumstix/irq/irq.c
@@ -24,6 +24,17 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/lpc24xx/irq/irq.c b/bsps/arm/lpc24xx/irq/irq.c
index ed07805a9a..efc7c8beaa 100644
--- a/bsps/arm/lpc24xx/irq/irq.c
+++ b/bsps/arm/lpc24xx/irq/irq.c
@@ -64,6 +64,17 @@ unsigned lpc24xx_irq_get_priority(rtems_vector_number vector)
#ifdef ARM_MULTILIB_ARCH_V4
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/lpc32xx/irq/irq.c b/bsps/arm/lpc32xx/irq/irq.c
index eac320000b..c8b2f33f51 100644
--- a/bsps/arm/lpc32xx/irq/irq.c
+++ b/bsps/arm/lpc32xx/irq/irq.c
@@ -260,6 +260,17 @@ void bsp_interrupt_dispatch(void)
lpc32xx.sic_2.er = er_sic_2 & lpc32xx_irq_enable.field.sic_2;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
rtems_interrupt_level level;
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index 835cdf97d9..625fbc5dad 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -143,6 +143,17 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/rtl22xx/irq/irq.c b/bsps/arm/rtl22xx/irq/irq.c
index 83e140bd7b..2653cb07bb 100644
--- a/bsps/arm/rtl22xx/irq/irq.c
+++ b/bsps/arm/rtl22xx/irq/irq.c
@@ -26,6 +26,17 @@ void bsp_interrupt_dispatch(void)
VICVectAddr = 0;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/shared/irq/irq-armv7m.c b/bsps/arm/shared/irq/irq-armv7m.c
index 2bf8c9df74..b1ab2afa62 100644
--- a/bsps/arm/shared/irq/irq-armv7m.c
+++ b/bsps/arm/shared/irq/irq-armv7m.c
@@ -38,6 +38,17 @@
#ifdef ARM_MULTILIB_ARCH_V7M
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/smdk2410/irq/irq.c b/bsps/arm/smdk2410/irq/irq.c
index ea8f610353..7dc219d447 100644
--- a/bsps/arm/smdk2410/irq/irq.c
+++ b/bsps/arm/smdk2410/irq/irq.c
@@ -27,6 +27,17 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/tms570/irq/irq.c b/bsps/arm/tms570/irq/irq.c
index 4abab8feb3..231d8f23c9 100644
--- a/bsps/arm/tms570/irq/irq.c
+++ b/bsps/arm/tms570/irq/irq.c
@@ -96,6 +96,17 @@ void bsp_interrupt_dispatch(void)
* @retval RTEMS_INVALID_ID vector is invalid.
* @retval RTEMS_SUCCESSFUL interrupt source enabled.
*/
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(
rtems_vector_number vector
)
diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index ac08f1f7be..69cd91e79b 100644
--- a/bsps/i386/shared/irq/irq.c
+++ b/bsps/i386/shared/irq/irq.c
@@ -270,6 +270,17 @@ static inline bool bsp_interrupt_vector_is_valid(rtems_vector_number vector)
return BSP_i8259a_irq_valid((const rtems_irq_number) vector);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
index 72c1d51332..cc45e63fed 100644
--- a/bsps/include/bsp/irq-generic.h
+++ b/bsps/include/bsp/irq-generic.h
@@ -217,6 +217,29 @@ void bsp_interrupt_initialize(void);
*/
rtems_status_code bsp_interrupt_facility_initialize(void);
+/**
+ * @brief Checks if the interrupt is enabled.
+ *
+ * The function checks if the interrupt associated with the interrupt vector
+ * specified by ``vector`` was enabled for the processor executing the function
+ * call at some time point during the call.
+ *
+ * @param vector is the interrupt vector number. It shall be valid.
+ *
+ * @param[out] enabled is the pointer to a ``bool`` object. It shall not be
+ * ``NULL``. When the function call is successful, the enabled status of
+ * the interrupt associated with the interrupt vector specified by ``vector``
+ * will be stored in this object. When the interrupt was enabled for the
+ * processor executing the function call at some time point during the call,
+ * the object will be set to true, otherwise to false.
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ */
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+);
+
/**
* @brief Enables the interrupt vector with number @a vector.
*
diff --git a/bsps/lm32/shared/irq/irq.c b/bsps/lm32/shared/irq/irq.c
index 79626ee449..cf15acd1c6 100644
--- a/bsps/lm32/shared/irq/irq.c
+++ b/bsps/lm32/shared/irq/irq.c
@@ -17,6 +17,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/m68k/genmcf548x/irq/irq.c b/bsps/m68k/genmcf548x/irq/irq.c
index 1e7cb25764..70999451be 100644
--- a/bsps/m68k/genmcf548x/irq/irq.c
+++ b/bsps/m68k/genmcf548x/irq/irq.c
@@ -59,6 +59,17 @@ static rtems_vector_number vector_to_exception_vector(
return vector + 64U;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
volatile uint32_t *imr = vector_to_imr(vector);
diff --git a/bsps/mips/shared/irq/irq.c b/bsps/mips/shared/irq/irq.c
index 9fed3db489..ea9081ae16 100644
--- a/bsps/mips/shared/irq/irq.c
+++ b/bsps/mips/shared/irq/irq.c
@@ -67,6 +67,17 @@ static inline bool bsp_irq_is_valid(rtems_vector_number vector)
return vector < BSP_INTERRUPT_VECTOR_COUNT;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/gen5200/irq/irq.c b/bsps/powerpc/gen5200/irq/irq.c
index 11d9e3992e..f459bd0489 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -359,6 +359,17 @@ static inline void BSP_disable_crit_irq_at_siu( rtems_vector_number
/*
* This function enables a given siu interrupt
*/
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable( rtems_vector_number vector)
{
int base_index = get_siu_irq_base_index( vector);
diff --git a/bsps/powerpc/gen83xx/irq/irq.c b/bsps/powerpc/gen83xx/irq/irq.c
index 7a8ce3cc0b..acbad2d463 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -376,6 +376,17 @@ rtems_status_code mpc83xx_ipic_set_highest_priority_interrupt(
/*
* functions to enable/disable a source at the ipic
*/
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable( rtems_vector_number vector)
{
rtems_vector_number vecnum = vector - BSP_IPIC_IRQ_LOWEST_OFFSET;
diff --git a/bsps/powerpc/mpc55xxevb/start/irq.c b/bsps/powerpc/mpc55xxevb/start/irq.c
index 283c54cdcc..2788c8f178 100644
--- a/bsps/powerpc/mpc55xxevb/start/irq.c
+++ b/bsps/powerpc/mpc55xxevb/start/irq.c
@@ -152,6 +152,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable( rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/mpc8260ads/irq/irq.c b/bsps/powerpc/mpc8260ads/irq/irq.c
index baca1e0e05..d4f868fae6 100644
--- a/bsps/powerpc/mpc8260ads/irq/irq.c
+++ b/bsps/powerpc/mpc8260ads/irq/irq.c
@@ -328,6 +328,17 @@ BSP_CPM_irq_init(void)
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(irqnum));
diff --git a/bsps/powerpc/psim/irq/irq_init.c b/bsps/powerpc/psim/irq/irq_init.c
index ece9d77777..e5e345832f 100644
--- a/bsps/powerpc/psim/irq/irq_init.c
+++ b/bsps/powerpc/psim/irq/irq_init.c
@@ -102,6 +102,17 @@ static int psim_exception_handler(
/*
* functions to enable/disable a source at the ipic
*/
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable( rtems_vector_number irqnum)
{
/* FIXME: do something */
diff --git a/bsps/powerpc/qemuppc/irq/irq_init.c b/bsps/powerpc/qemuppc/irq/irq_init.c
index 24b15dcd49..ce85f9ad7a 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -35,6 +35,17 @@ static int qemuppc_exception_handler(
return 0;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
/*
* functions to enable/disable a source at the ipic
*/
diff --git a/bsps/powerpc/qoriq/irq/irq.c b/bsps/powerpc/qoriq/irq/irq.c
index ffbff25dc6..0a59bd4864 100644
--- a/bsps/powerpc/qoriq/irq/irq.c
+++ b/bsps/powerpc/qoriq/irq/irq.c
@@ -77,6 +77,17 @@ void bsp_interrupt_get_affinity(
_Processor_mask_From_uint32_t(affinity, destination, 0);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
@@ -290,6 +301,17 @@ static void pic_vector_enable(rtems_vector_number vector, uint32_t msk)
rtems_interrupt_lock_release(&lock, &lock_context);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void 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 8a70109e52..ceb4fdc91f 100644
--- a/bsps/powerpc/shared/irq/ppc-irq-generic.c
+++ b/bsps/powerpc/shared/irq/ppc-irq-generic.c
@@ -95,6 +95,17 @@ int BSP_rtems_irq_generic_set(rtems_irq_global_settings* config)
return 1;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/t32mppc/irq/irq.c b/bsps/powerpc/t32mppc/irq/irq.c
index 5b2c34d2c9..57671d6e11 100644
--- a/bsps/powerpc/t32mppc/irq/irq.c
+++ b/bsps/powerpc/t32mppc/irq/irq.c
@@ -16,6 +16,17 @@
#include <bsp/irq-generic.h>
#include <bsp/vectors.h>
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/tqm8xx/irq/irq.c b/bsps/powerpc/tqm8xx/irq/irq.c
index 2a94c27d1b..74e55a59aa 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -63,6 +63,17 @@ static rtems_status_code bsp_irq_enable_at_CPM(rtems_vector_number irqnum)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/virtex/irq/irq_init.c b/bsps/powerpc/virtex/irq/irq_init.c
index 55194cb1e6..f455fee8f3 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -132,6 +132,17 @@ static void opb_intc_init(void)
(OPB_INTC_MER_HIE | OPB_INTC_MER_ME);
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/riscv/griscv/irq/irq.c b/bsps/riscv/griscv/irq/irq.c
index e68e69e393..915a3b64f6 100644
--- a/bsps/riscv/griscv/irq/irq.c
+++ b/bsps/riscv/griscv/irq/irq.c
@@ -87,6 +87,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
int irq = (int)vector;
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index ffd9bbe61f..535024732b 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -226,6 +226,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/dev/irq/arm-gicv2.c b/bsps/shared/dev/irq/arm-gicv2.c
index c29cae1d97..045b7822a8 100644
--- a/bsps/shared/dev/irq/arm-gicv2.c
+++ b/bsps/shared/dev/irq/arm-gicv2.c
@@ -64,6 +64,17 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
volatile gic_dist *dist = ARM_GIC_DIST;
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 75b089b6b5..0549b6bd72 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -164,6 +164,17 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
diff --git a/bsps/shared/irq/irq-default.c b/bsps/shared/irq/irq-default.c
index 943b4ea191..842cdd66e0 100644
--- a/bsps/shared/irq/irq-default.c
+++ b/bsps/shared/irq/irq-default.c
@@ -37,6 +37,17 @@
#include <bsp/irq-generic.h>
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/irq/irq-enable-disable.c b/bsps/shared/irq/irq-enable-disable.c
index 792f5e60c6..6bf4620018 100644
--- a/bsps/shared/irq/irq-enable-disable.c
+++ b/bsps/shared/irq/irq-enable-disable.c
@@ -6,7 +6,8 @@
* @ingroup bsp_interrupt
*
* @brief This source file contains the implementation of
- * rtems_interrupt_vector_enable() and rtems_interrupt_vector_disable().
+ * rtems_interrupt_vector_is_enabled(), rtems_interrupt_vector_enable() and
+ * rtems_interrupt_vector_disable().
*/
/*
@@ -36,6 +37,22 @@
#include <bsp/irq-generic.h>
+rtems_status_code rtems_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ if ( enabled == NULL ) {
+ return RTEMS_INVALID_ADDRESS;
+ }
+
+ if ( !bsp_interrupt_is_valid_vector( vector ) ) {
+ return RTEMS_INVALID_ID;
+ }
+
+ return bsp_interrupt_vector_is_enabled( vector, enabled );
+}
+
rtems_status_code rtems_interrupt_vector_enable( rtems_vector_number vector )
{
if ( !bsp_interrupt_is_valid_vector( vector ) ) {
diff --git a/bsps/sparc/leon3/start/eirq.c b/bsps/sparc/leon3/start/eirq.c
index 84e81a90a4..0382129271 100644
--- a/bsps/sparc/leon3/start/eirq.c
+++ b/bsps/sparc/leon3/start/eirq.c
@@ -61,6 +61,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
#if defined(RTEMS_SMP)
static void leon3_interrupt_vector_enable(rtems_vector_number vector)
{
diff --git a/bsps/sparc/shared/irq/irq-shared.c b/bsps/sparc/shared/irq/irq-shared.c
index 42e5b010fb..b06e9e438f 100644
--- a/bsps/sparc/shared/irq/irq-shared.c
+++ b/bsps/sparc/shared/irq/irq-shared.c
@@ -32,6 +32,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/x86_64/amd64/interrupts/idt.c b/bsps/x86_64/amd64/interrupts/idt.c
index e5964e36a1..4763d70f06 100644
--- a/bsps/x86_64/amd64/interrupts/idt.c
+++ b/bsps/x86_64/amd64/interrupts/idt.c
@@ -145,6 +145,17 @@ void bsp_interrupt_vector_disable(rtems_vector_number vector)
{
/* XXX */
}
+rtems_status_code bsp_interrupt_vector_is_enabled(
+ rtems_vector_number vector,
+ bool *enabled
+)
+{
+ bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+ bsp_interrupt_assert(enabled != NULL);
+ *enabled = false;
+ return RTEMS_UNSATISFIED;
+}
+
void bsp_interrupt_vector_enable(rtems_vector_number vector)
{
/* XXX */
--
2.26.2
More information about the devel
mailing list