git: da2538a136f4 - releng/13.2 - LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Thu, 23 Feb 2023 19:34:22 UTC
The branch releng/13.2 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=da2538a136f4ca1f103ef7f9f7485a339e0ae833

commit da2538a136f4ca1f103ef7f9f7485a339e0ae833
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-01-28 16:11:59 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-02-23 19:31:29 +0000

    LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags()
    
    Add a dummy irq_set_status_flags() along with #defines passed by the driver.
    Add disable_irq_nosync() as another wrapper to lkpi_disable_irq().
    Those are used by wireless drivers.
    
    Sponsored by:   The FreeBSD Foundation
    Approved by:    re (cperciva)
    Differential Revision: https://reviews.freebsd.org/D38241
    
    (cherry picked from commit bc81a2b788f5644ece58defa30880b69c9894981)
    (cherry picked from commit 75727a02155af29167a6d460de5ce6a9d52e26d8)
---
 .../linuxkpi/common/include/linux/interrupt.h       | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h
index 57d7ac58ec5e..cb2b1bef4667 100644
--- a/sys/compat/linuxkpi/common/include/linux/interrupt.h
+++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h
@@ -43,6 +43,9 @@
 typedef	irqreturn_t	(*irq_handler_t)(int, void *);
 
 #define	IRQF_SHARED	RF_SHAREABLE
+#define	IRQF_NOBALANCING	0
+
+#define	IRQ_DISABLE_UNLAZY	0
 
 struct irq_ent;
 
@@ -105,6 +108,12 @@ disable_irq(unsigned int irq)
 	lkpi_disable_irq(irq);
 }
 
+static inline void
+disable_irq_nosync(unsigned int irq)
+{
+	lkpi_disable_irq(irq);
+}
+
 static inline int
 bind_irq_to_cpu(unsigned int irq, int cpu_id)
 {
@@ -136,6 +145,18 @@ irq_set_affinity_hint(int vector, cpumask_t *mask)
 	return (-error);
 }
 
+static inline struct msi_desc *
+irq_get_msi_desc(unsigned int irq)
+{
+
+	return (lkpi_pci_msi_desc_alloc(irq));
+}
+
+static inline void
+irq_set_status_flags(unsigned int irq __unused, unsigned long flags __unused)
+{
+}
+
 /*
  * LinuxKPI tasklet support
  */