[PATCH 13/41] bsps/irq: Add rtems_interrupt_get_attributes()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 12 12:49:35 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            |  8 ++++++
 bsps/powerpc/gen83xx/irq/irq.c            |  8 ++++++
 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       |  8 ++++++
 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             |  8 ++++++
 bsps/powerpc/virtex/irq/irq_init.c        |  8 ++++++
 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(+), 2 deletions(-)

diff --git a/bsps/arm/beagle/irq/irq.c b/bsps/arm/beagle/irq/irq.c
index 9ba317f64f..d54b49f0ca 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_cause(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 4c24c4c09d..2cc4f5bb5c 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_cause(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 730b680b6a..1679b89dc3 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_cause(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 6096bf7023..573e4f015d 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_cause(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 dc69274df3..9a185e247b 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_cause(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 74313b3f10..ef23824f33 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_cause(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 ca9377cdcc..083a5fa343 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_cause(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 a08379220a..bcc7a7b71a 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_cause(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 6da7ad927d..45bf207c5c 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_cause(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 1abc04bbf5..00a25413c6 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_cause(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 4300889483..73cfd58a48 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_cause(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 688aa69e75..7c50543f3c 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_cause(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 39a49aa57a..a91e8ba146 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_cause(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 f4de468a49..4a87c6e3a6 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 c48ec82fd1..a4ac0feef8 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_cause(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 643c1783ac..3df7b92abc 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_cause(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 ab1101e781..a602bee5dc 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_cause(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 fafc58ee0a..7f0c338808 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -359,6 +359,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_cause(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 9a452d2b09..62d0ef7f96 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -376,6 +376,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_cause(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 67f6715d52..0c5cffd106 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_cause(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 f065b2841f..d4f33870d9 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_cause(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 8c0e1adb5a..4b6cf796cf 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_cause(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 277aa49830..b8f7f58160 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -35,6 +35,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_cause(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 23598880c1..c4523e3211 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_cause(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_cause(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 3aed893fe6..e5d3ca56e3 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_cause(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 79dc6de172..95c00ad583 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_cause(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 c538ed4dc8..2c7e30fe60 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -63,6 +63,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_cause(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 6582e8a060..6476fddceb 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -132,6 +132,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_cause(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 cfa015e6e8..5572f3cba2 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_cause(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 51ed9cc8de..1c5ddd1dd9 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_cause(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 6d59233de4..a9655be75c 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_cause(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 3fdc5f9d04..3628f5c472 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_cause(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 627b1df189..69242854ee 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_cause(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..84c576084b 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_cause_on = attributes->can_cause;
+  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 0067fcb62e..151726b1a5 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_cause(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 a58cf99c80..90262a8b8c 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_cause(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 478d975e41..cda78cb774 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_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
-- 
2.26.2



More information about the devel mailing list