[PATCH 05/13] bsps: Add gicv3_ppi_clear_pending()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Mar 18 07:19:07 UTC 2022
---
bsps/include/dev/irq/arm-gicv3.h | 10 ++++++++++
bsps/shared/dev/irq/arm-gicv3.c | 5 +----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 59052bebd2..9cfbd8f207 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -176,6 +176,16 @@ static inline void gicv3_ppi_set_pending(
sgi_ppi->icspispendr[0] = 1U << vector;
}
+static inline void gicv3_ppi_clear_pending(
+ rtems_vector_number vector,
+ uint32_t cpu_index
+)
+{
+ volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+ sgi_ppi->icspicpendr[0] = 1U << vector;
+}
+
static inline void gicv3_trigger_sgi(
rtems_vector_number vector,
uint32_t targets
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 54e0c2af68..2978a0d5ad 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -138,10 +138,7 @@ rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
}
if ( vector <= ARM_GIC_IRQ_PPI_LAST ) {
- volatile gic_sgi_ppi *sgi_ppi =
- gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
- sgi_ppi->icspicpendr[0] = 1U << vector;
+ gicv3_ppi_clear_pending(vector, _SMP_Get_current_processor());
} else {
volatile gic_dist *dist = ARM_GIC_DIST;
--
2.34.1
More information about the devel
mailing list