[PATCH 1/2] pci: Do not use BSP-specific interrupt API

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jun 15 12:46:50 UTC 2023


Update #3269.
---
 cpukit/include/pci/irq.h | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/cpukit/include/pci/irq.h b/cpukit/include/pci/irq.h
index 4069f1ffa8..8617dd1680 100644
--- a/cpukit/include/pci/irq.h
+++ b/cpukit/include/pci/irq.h
@@ -38,18 +38,9 @@
 #ifndef __PCI_IRQ_H__
 #define __PCI_IRQ_H__
 
-#include <rtems/irq-extension.h>
+#include <rtems/rtems/intr.h>
 #include <rtems/score/basedefs.h>
 
-/*
- * FIXME: This should be available via the IRQ extensions API.
- *
- * https://devel.rtems.org/ticket/3269
- */
-void BSP_shared_interrupt_clear(int irq);
-void BSP_shared_interrupt_unmask(int irq);
-void BSP_shared_interrupt_mask(int irq);
-
 /* PCI Handler (ISR) called when IRQ is generated by any of the PCI devices
  * connected to the same PCI IRQ Pin. This has been defined the same way as
  * rtems_interrupt_handler in order for BSPs to "direct-map" the register
@@ -106,7 +97,7 @@ static inline int pci_interrupt_unregister(int irq, pci_isr isr,
  */
 static inline void pci_interrupt_unmask(int irq)
 {
-	BSP_shared_interrupt_unmask(irq);
+	(void)rtems_interrupt_vector_enable((rtems_vector_number)irq);
 }
 
 /* Disable shared PCI IRQ handler. This function will mask the interrupt
@@ -122,7 +113,7 @@ static inline void pci_interrupt_unmask(int irq)
  */
 static inline void pci_interrupt_mask(int irq)
 {
-	BSP_shared_interrupt_mask(irq);
+	(void)rtems_interrupt_vector_disable((rtems_vector_number)irq);
 }
 
 /* Acknowledge the interrupt controller by writing to the interrupt controller.
@@ -136,7 +127,7 @@ static inline void pci_interrupt_mask(int irq)
  */
 static inline void pci_interrupt_clear(int irq)
 {
-	BSP_shared_interrupt_clear(irq);
+	(void)rtems_interrupt_clear((rtems_vector_number)irq);
 }
 
 #endif /* !__PCI_IRQ_H__ */
-- 
2.35.3



More information about the devel mailing list