[PATCH v3 13/42] bsps/irq: Add rtems_interrupt_get_attributes()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 23 13:56:21 UTC 2021
Add a default implementation which clears the attributes to zero and
just returns RTEMS_SUCCESSFUL for valid parameters.
Update #3269.
---
bsps/arm/beagle/irq/irq.c | 8 ++++++
bsps/arm/csb336/irq/irq.c | 8 ++++++
bsps/arm/csb337/irq/irq.c | 8 ++++++
bsps/arm/edb7312/irq/irq.c | 8 ++++++
bsps/arm/gumstix/irq/irq.c | 8 ++++++
bsps/arm/lpc24xx/irq/irq.c | 8 ++++++
bsps/arm/lpc32xx/irq/irq.c | 8 ++++++
bsps/arm/raspberrypi/irq/irq.c | 8 ++++++
bsps/arm/rtl22xx/irq/irq.c | 8 ++++++
bsps/arm/shared/irq/irq-armv7m.c | 8 ++++++
bsps/arm/smdk2410/irq/irq.c | 8 ++++++
bsps/arm/tms570/irq/irq.c | 8 ++++++
bsps/i386/shared/irq/irq.c | 8 ++++++
bsps/include/bsp/irq-generic.h | 17 ++++++++++++
bsps/lm32/shared/irq/irq.c | 8 ++++++
bsps/m68k/genmcf548x/irq/irq.c | 8 ++++++
bsps/mips/shared/irq/irq.c | 8 ++++++
bsps/powerpc/gen5200/irq/irq.c | 10 +++++--
bsps/powerpc/gen83xx/irq/irq.c | 10 +++++--
bsps/powerpc/mpc55xxevb/start/irq.c | 8 ++++++
bsps/powerpc/mpc8260ads/irq/irq.c | 8 ++++++
bsps/powerpc/psim/irq/irq_init.c | 8 ++++++
bsps/powerpc/qemuppc/irq/irq_init.c | 10 +++++--
bsps/powerpc/qoriq/irq/irq.c | 16 +++++++++++
bsps/powerpc/shared/irq/ppc-irq-generic.c | 8 ++++++
bsps/powerpc/t32mppc/irq/irq.c | 8 ++++++
bsps/powerpc/tqm8xx/irq/irq.c | 10 +++++--
bsps/powerpc/virtex/irq/irq_init.c | 10 +++++--
bsps/riscv/griscv/irq/irq.c | 8 ++++++
bsps/riscv/riscv/irq/irq.c | 8 ++++++
bsps/shared/dev/irq/arm-gicv2.c | 8 ++++++
bsps/shared/dev/irq/arm-gicv3.c | 8 ++++++
bsps/shared/irq/irq-default.c | 8 ++++++
bsps/shared/irq/irq-enable-disable.c | 33 +++++++++++++++++++++--
bsps/sparc/leon3/start/eirq.c | 8 ++++++
bsps/sparc/shared/irq/irq-shared.c | 8 ++++++
bsps/x86_64/amd64/interrupts/idt.c | 9 +++++++
37 files changed, 337 insertions(+), 12 deletions(-)
diff --git a/bsps/arm/beagle/irq/irq.c b/bsps/arm/beagle/irq/irq.c
index 4a89189a32..0285e46442 100644
--- a/bsps/arm/beagle/irq/irq.c
+++ b/bsps/arm/beagle/irq/irq.c
@@ -95,6 +95,14 @@ static uint32_t omap_get_mir_reg(rtems_vector_number vector, uint32_t *const mas
return mir_reg;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/csb336/irq/irq.c b/bsps/arm/csb336/irq/irq.c
index 3c9e6a7ea7..85137195ef 100644
--- a/bsps/arm/csb336/irq/irq.c
+++ b/bsps/arm/csb336/irq/irq.c
@@ -26,6 +26,14 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 d097a92259..e06c9f20b6 100644
--- a/bsps/arm/csb337/irq/irq.c
+++ b/bsps/arm/csb337/irq/irq.c
@@ -27,6 +27,14 @@ void bsp_interrupt_dispatch(void)
AIC_CTL_REG(AIC_EOICR) = 0;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 0522e40bd8..c1d166049b 100644
--- a/bsps/arm/edb7312/irq/irq.c
+++ b/bsps/arm/edb7312/irq/irq.c
@@ -27,6 +27,14 @@ void edb7312_interrupt_dispatch(rtems_vector_number vector)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 0e7340dab2..8d66edaaf6 100644
--- a/bsps/arm/gumstix/irq/irq.c
+++ b/bsps/arm/gumstix/irq/irq.c
@@ -24,6 +24,14 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 3a0ddb5186..6260f2206f 100644
--- a/bsps/arm/lpc24xx/irq/irq.c
+++ b/bsps/arm/lpc24xx/irq/irq.c
@@ -64,6 +64,14 @@ unsigned lpc24xx_irq_get_priority(rtems_vector_number vector)
#ifdef ARM_MULTILIB_ARCH_V4
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 b76c7da3c4..20a1dffcee 100644
--- a/bsps/arm/lpc32xx/irq/irq.c
+++ b/bsps/arm/lpc32xx/irq/irq.c
@@ -260,6 +260,14 @@ void bsp_interrupt_dispatch(void)
lpc32xx.sic_2.er = er_sic_2 & lpc32xx_irq_enable.field.sic_2;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index add044d406..c49f8300dd 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -143,6 +143,14 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 6f9b1137b5..af4e0bffaa 100644
--- a/bsps/arm/rtl22xx/irq/irq.c
+++ b/bsps/arm/rtl22xx/irq/irq.c
@@ -26,6 +26,14 @@ void bsp_interrupt_dispatch(void)
VICVectAddr = 0;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 45e5472aae..07db0e714c 100644
--- a/bsps/arm/shared/irq/irq-armv7m.c
+++ b/bsps/arm/shared/irq/irq-armv7m.c
@@ -38,6 +38,14 @@
#ifdef ARM_MULTILIB_ARCH_V7M
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 eaba9fe4b0..9b134445b0 100644
--- a/bsps/arm/smdk2410/irq/irq.c
+++ b/bsps/arm/smdk2410/irq/irq.c
@@ -27,6 +27,14 @@ void bsp_interrupt_dispatch(void)
bsp_interrupt_handler_dispatch(vector);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 24f9972b56..78c5b31038 100644
--- a/bsps/arm/tms570/irq/irq.c
+++ b/bsps/arm/tms570/irq/irq.c
@@ -96,6 +96,14 @@ void bsp_interrupt_dispatch(void)
* @retval RTEMS_INVALID_ID vector is invalid.
* @retval RTEMS_SUCCESSFUL interrupt source enabled.
*/
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index 3d26d45b75..7c9c84140f 100644
--- a/bsps/i386/shared/irq/irq.c
+++ b/bsps/i386/shared/irq/irq.c
@@ -270,6 +270,14 @@ 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_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 d2d5e1ed90..cdd269a3af 100644
--- a/bsps/include/bsp/irq-generic.h
+++ b/bsps/include/bsp/irq-generic.h
@@ -217,6 +217,23 @@ void bsp_interrupt_initialize(void);
*/
rtems_status_code bsp_interrupt_facility_initialize(void);
+/**
+ * @brief Gets the attributes of the interrupt vector.
+ *
+ * @param vector is the interrupt vector number. It shall be valid.
+ *
+ * @param[out] attributes is the pointer to an rtems_interrupt_attributes
+ * object. When the function call is successful, the attributes of the
+ * interrupt vector will be stored in this object. The pointer shall not be
+ * NULL. The object shall be cleared to zero by the caller.
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ */
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+);
+
/**
* @brief Checks if the interrupt is enabled.
*
diff --git a/bsps/lm32/shared/irq/irq.c b/bsps/lm32/shared/irq/irq.c
index 0796c5c1e6..e89dd1f4d6 100644
--- a/bsps/lm32/shared/irq/irq.c
+++ b/bsps/lm32/shared/irq/irq.c
@@ -17,6 +17,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 8e4737cc20..a51cf83c47 100644
--- a/bsps/m68k/genmcf548x/irq/irq.c
+++ b/bsps/m68k/genmcf548x/irq/irq.c
@@ -59,6 +59,14 @@ static rtems_vector_number vector_to_exception_vector(
return vector + 64U;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/mips/shared/irq/irq.c b/bsps/mips/shared/irq/irq.c
index 235d8e7365..daeb368e5c 100644
--- a/bsps/mips/shared/irq/irq.c
+++ b/bsps/mips/shared/irq/irq.c
@@ -67,6 +67,14 @@ static inline bool bsp_irq_is_valid(rtems_vector_number vector)
return vector < BSP_INTERRUPT_VECTOR_COUNT;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 f464507fcf..bbe409227f 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -1,4 +1,3 @@
-/*===============================================================*\
| Project: RTEMS generic MPC5200 BSP |
+-----------------------------------------------------------------+
| Partially based on the code references which are named below. |
@@ -18,7 +17,6 @@
| |
+-----------------------------------------------------------------+
| this file contains the irq controller handler |
-\*===============================================================*/
/***********************************************************************/
/* */
/* Module: irq.c */
@@ -359,6 +357,14 @@ static inline void BSP_disable_crit_irq_at_siu( rtems_vector_number
/*
* This function enables a given siu interrupt
*/
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/gen83xx/irq/irq.c b/bsps/powerpc/gen83xx/irq/irq.c
index 1a509cf30d..ab8e13f70e 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -1,4 +1,3 @@
-/*===============================================================*\
| Project: RTEMS generic MPC83xx BSP |
+-----------------------------------------------------------------+
| Copyright (c) 2007 |
@@ -15,7 +14,6 @@
| |
+-----------------------------------------------------------------+
| this file integrates the IPIC irq controller |
-\*===============================================================*/
#include <mpc83xx/mpc83xx.h>
@@ -376,6 +374,14 @@ rtems_status_code mpc83xx_ipic_set_highest_priority_interrupt(
/*
* functions to enable/disable a source at the ipic
*/
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/mpc55xxevb/start/irq.c b/bsps/powerpc/mpc55xxevb/start/irq.c
index 241798b3be..dac0efa5e6 100644
--- a/bsps/powerpc/mpc55xxevb/start/irq.c
+++ b/bsps/powerpc/mpc55xxevb/start/irq.c
@@ -152,6 +152,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 2cfe37d28a..ce8642c2b0 100644
--- a/bsps/powerpc/mpc8260ads/irq/irq.c
+++ b/bsps/powerpc/mpc8260ads/irq/irq.c
@@ -328,6 +328,14 @@ BSP_CPM_irq_init(void)
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/psim/irq/irq_init.c b/bsps/powerpc/psim/irq/irq_init.c
index d9f4aca9c9..9a4898fa17 100644
--- a/bsps/powerpc/psim/irq/irq_init.c
+++ b/bsps/powerpc/psim/irq/irq_init.c
@@ -102,6 +102,14 @@ static int psim_exception_handler(
/*
* functions to enable/disable a source at the ipic
*/
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/qemuppc/irq/irq_init.c b/bsps/powerpc/qemuppc/irq/irq_init.c
index 5aa6deb528..3665785fb9 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -1,4 +1,3 @@
-/*===============================================================*\
| Project: RTEMS generic MPC83xx BSP |
+-----------------------------------------------------------------+
| Copyright (c) 2007 |
@@ -15,7 +14,6 @@
| |
+-----------------------------------------------------------------+
| this file integrates the IPIC irq controller |
-\*===============================================================*/
#include <rtems.h>
@@ -35,6 +33,14 @@ static int qemuppc_exception_handler(
return 0;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/qoriq/irq/irq.c b/bsps/powerpc/qoriq/irq/irq.c
index 5bbaf76a30..7175e6a201 100644
--- a/bsps/powerpc/qoriq/irq/irq.c
+++ b/bsps/powerpc/qoriq/irq/irq.c
@@ -77,6 +77,14 @@ void bsp_interrupt_get_affinity(
_Processor_mask_From_uint32_t(affinity, destination, 0);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
@@ -324,6 +332,14 @@ static void pic_vector_enable(rtems_vector_number vector, uint32_t msk)
rtems_interrupt_lock_release(&lock, &lock_context);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/shared/irq/ppc-irq-generic.c b/bsps/powerpc/shared/irq/ppc-irq-generic.c
index a98b3ce54f..5f54523014 100644
--- a/bsps/powerpc/shared/irq/ppc-irq-generic.c
+++ b/bsps/powerpc/shared/irq/ppc-irq-generic.c
@@ -95,6 +95,14 @@ int BSP_rtems_irq_generic_set(rtems_irq_global_settings* config)
return 1;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 bea5381552..f5edbf5691 100644
--- a/bsps/powerpc/t32mppc/irq/irq.c
+++ b/bsps/powerpc/t32mppc/irq/irq.c
@@ -16,6 +16,14 @@
#include <bsp/irq-generic.h>
#include <bsp/vectors.h>
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 74ff2cede8..b4a66aecba 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -1,4 +1,3 @@
-/*===============================================================*\
| Project: RTEMS TQM8xx BSP |
+-----------------------------------------------------------------+
| This file has been adapted to MPC8xx by |
@@ -19,7 +18,6 @@
| |
+-----------------------------------------------------------------+
| this file contains the console driver |
-\*===============================================================*/
/* derived from: generic MPC83xx BSP */
#include <rtems.h>
@@ -63,6 +61,14 @@ static rtems_status_code bsp_irq_enable_at_CPM(rtems_vector_number irqnum)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 82460f4be1..5adc78b2c4 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -1,4 +1,3 @@
-/*===============================================================*\
| Project: RTEMS virtex BSP |
+-----------------------------------------------------------------+
| Partially based on the code references which are named below. |
@@ -18,7 +17,6 @@
| |
+-----------------------------------------------------------------+
| this file contains the irq controller handler |
-\*===============================================================*/
/* Content moved from opbintctrl.c:
*
@@ -132,6 +130,14 @@ static void opb_intc_init(void)
(OPB_INTC_MER_HIE | OPB_INTC_MER_ME);
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 f7540f91d1..c20afdd8cc 100644
--- a/bsps/riscv/griscv/irq/irq.c
+++ b/bsps/riscv/griscv/irq/irq.c
@@ -87,6 +87,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 817a0440b0..b655825a8e 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -226,6 +226,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 299ed5a089..509449c47d 100644
--- a/bsps/shared/dev/irq/arm-gicv2.c
+++ b/bsps/shared/dev/irq/arm-gicv2.c
@@ -64,6 +64,14 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 82f3d3730d..7223ec1039 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -164,6 +164,14 @@ void bsp_interrupt_dispatch(void)
}
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/irq/irq-default.c b/bsps/shared/irq/irq-default.c
index 63ba0c37ee..745e1eb139 100644
--- a/bsps/shared/irq/irq-default.c
+++ b/bsps/shared/irq/irq-default.c
@@ -37,6 +37,14 @@
#include <bsp/irq-generic.h>
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 6bf4620018..1d46203d90 100644
--- a/bsps/shared/irq/irq-enable-disable.c
+++ b/bsps/shared/irq/irq-enable-disable.c
@@ -6,8 +6,8 @@
* @ingroup bsp_interrupt
*
* @brief This source file contains the implementation of
- * rtems_interrupt_vector_is_enabled(), rtems_interrupt_vector_enable() and
- * rtems_interrupt_vector_disable().
+ * rtems_interrupt_get_attributes(), rtems_interrupt_vector_is_enabled(),
+ * rtems_interrupt_vector_enable() and rtems_interrupt_vector_disable().
*/
/*
@@ -37,6 +37,35 @@
#include <bsp/irq-generic.h>
+#include <string.h>
+
+rtems_status_code rtems_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ rtems_status_code sc;
+
+ if ( attributes == NULL ) {
+ return RTEMS_INVALID_ADDRESS;
+ }
+
+ memset( attributes, 0, sizeof( *attributes ) );
+
+ if ( !bsp_interrupt_is_valid_vector( vector ) ) {
+ return RTEMS_INVALID_ID;
+ }
+
+ sc = bsp_interrupt_get_attributes( vector, attributes );
+#if !defined(RTEMS_SMP)
+ attributes->can_raise_on = attributes->can_raise;
+ attributes->can_get_affinity = true;
+ attributes->can_set_affinity = true;
+#endif
+
+ return sc;
+}
+
rtems_status_code rtems_interrupt_vector_is_enabled(
rtems_vector_number vector,
bool *enabled
diff --git a/bsps/sparc/leon3/start/eirq.c b/bsps/sparc/leon3/start/eirq.c
index 327af78fbe..60f87fafa8 100644
--- a/bsps/sparc/leon3/start/eirq.c
+++ b/bsps/sparc/leon3/start/eirq.c
@@ -61,6 +61,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/sparc/shared/irq/irq-shared.c b/bsps/sparc/shared/irq/irq-shared.c
index 7c7b4e0507..ab08a920a4 100644
--- a/bsps/sparc/shared/irq/irq-shared.c
+++ b/bsps/sparc/shared/irq/irq-shared.c
@@ -32,6 +32,14 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
return RTEMS_SUCCESSFUL;
}
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(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 4fb6e2c732..897fd906b1 100644
--- a/bsps/x86_64/amd64/interrupts/idt.c
+++ b/bsps/x86_64/amd64/interrupts/idt.c
@@ -145,6 +145,15 @@ void bsp_interrupt_vector_disable(rtems_vector_number vector)
{
/* XXX */
}
+
+rtems_status_code bsp_interrupt_get_attributes(
+ rtems_vector_number vector,
+ rtems_interrupt_attributes *attributes
+)
+{
+ return RTEMS_SUCCESSFUL;
+}
+
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
{
bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
--
2.26.2
More information about the devel
mailing list