summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-01 16:40:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-01 16:43:35 +0200
commitcb7d26845eace12596046019f2cd0614f73adad2 (patch)
tree752b2fdbf0167cf9f083c9c55a4092a265b6b5f3
parent52fb74ca651be4dceeb0f65274cd2ee1047b5204 (diff)
downloadrtems-cb7d26845eace12596046019f2cd0614f73adad2.tar.bz2
bsp/leon3: Move bsp_interrupt_is_valid_vector()
This function is not performance critical. There is no need to implement it inline.
-rw-r--r--bsps/sparc/leon3/include/bsp/irq.h16
-rw-r--r--bsps/sparc/leon3/start/eirq.c14
2 files changed, 14 insertions, 16 deletions
diff --git a/bsps/sparc/leon3/include/bsp/irq.h b/bsps/sparc/leon3/include/bsp/irq.h
index 45d5a8de34..5a53246a6b 100644
--- a/bsps/sparc/leon3/include/bsp/irq.h
+++ b/bsps/sparc/leon3/include/bsp/irq.h
@@ -29,22 +29,6 @@
/* The check is different depending on IRQ controller, runtime detected */
#define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
-/**
- * @brief Returns true if the interrupt vector with number @a vector is valid.
- */
-static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
-{
- if (vector == 0) {
- return false;
- }
-
- if (LEON3_IrqCtrl_EIrq > 0) {
- return vector <= BSP_INTERRUPT_VECTOR_MAX_EXT;
- }
-
- return vector <= BSP_INTERRUPT_VECTOR_MAX_STD;
-}
-
void bsp_interrupt_set_affinity(
rtems_vector_number vector,
const Processor_mask *affinity
diff --git a/bsps/sparc/leon3/start/eirq.c b/bsps/sparc/leon3/start/eirq.c
index b4cd6d2948..e3ae5b1a4d 100644
--- a/bsps/sparc/leon3/start/eirq.c
+++ b/bsps/sparc/leon3/start/eirq.c
@@ -12,6 +12,7 @@
#include <leon.h>
#include <bsp/irq.h>
+#include <bsp/irq-generic.h>
/* GRLIB extended IRQ controller IRQ number */
int LEON3_IrqCtrl_EIrq = -1;
@@ -25,6 +26,19 @@ void leon3_ext_irq_init(void)
}
}
+bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
+{
+ if (vector == 0) {
+ return false;
+ }
+
+ if (LEON3_IrqCtrl_EIrq > 0) {
+ return vector <= BSP_INTERRUPT_VECTOR_MAX_EXT;
+ }
+
+ return vector <= BSP_INTERRUPT_VECTOR_MAX_STD;
+}
+
void bsp_interrupt_set_affinity(
rtems_vector_number vector,
const Processor_mask *affinity