summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2025-02-17 11:56:51 +0300
committerThomas Gleixner <tglx@linutronix.de>2025-02-20 17:19:26 +0300
commite54b1b5e89ae765e6d71d41883a8f551fde8d0ab (patch)
tree75ce7b0cf85c88103d6aa61fbfeb55f7b0c732b0 /include/linux
parent751dc837dabd275d0ab165fc737c10f80e2e863a (diff)
downloadlinux-e54b1b5e89ae765e6d71d41883a8f551fde8d0ab.tar.xz
genirq: Introduce irq_can_move_in_process_context()
Interrupt controller drivers which enable CONFIG_GENERIC_PENDING_IRQ require to know whether an interrupt can be moved in process context or not to decide whether they need to invoke the work around for non-atomic MSI updates or not. This information can be retrieved via irq_can_move_pcntxt(). That helper requires access to the top-most interrupt domain data, but the driver which requires this is usually further down in the hierarchy. Introduce irq_can_move_in_process_context() which retrieves that information from the top-most interrupt domain data. [ tglx: Massaged change log ] Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250217085657.789309-6-apatel@ventanamicro.com
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 56f6583093d2..dd5df1e2d032 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -615,6 +615,7 @@ extern int irq_affinity_online_cpu(unsigned int cpu);
#endif
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
+bool irq_can_move_in_process_context(struct irq_data *data);
void __irq_move_irq(struct irq_data *data);
static inline void irq_move_irq(struct irq_data *data)
{
@@ -623,6 +624,7 @@ static inline void irq_move_irq(struct irq_data *data)
}
void irq_move_masked_irq(struct irq_data *data);
#else
+static inline bool irq_can_move_in_process_context(struct irq_data *data) { return true; }
static inline void irq_move_irq(struct irq_data *data) { }
static inline void irq_move_masked_irq(struct irq_data *data) { }
#endif