aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/migration.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-02-17 14:26:50 +0530
committerThomas Gleixner <tglx@linutronix.de>2025-02-20 15:19:26 +0100
commit751dc837dabd275d0ab165fc737c10f80e2e863a (patch)
treec1e3d63f37e1b7c43612bf025fd17079fc1f6758 /kernel/irq/migration.c
parentirqchip/riscv-imsic: Move to common MSI library (diff)
downloadlinux-751dc837dabd275d0ab165fc737c10f80e2e863a.tar.gz
linux-751dc837dabd275d0ab165fc737c10f80e2e863a.zip
genirq: Introduce common irq_force_complete_move() implementation
CONFIG_GENERIC_PENDING_IRQ requires an architecture specific implementation of irq_force_complete_move() for CPU hotplug. At the moment, only x86 implements this unconditionally, but for RISC-V irq_force_complete_move() is only needed when the RISC-V IMSIC driver is in use and not needed otherwise. To allow runtime configuration of this mechanism, introduce a common irq_force_complete_move() implementation in the interrupt core code, which only invokes the completion function, when a interrupt chip in the hierarchy implements it. Switch X86 over to the new mechanism. No functional change intended. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250217085657.789309-5-apatel@ventanamicro.com
Diffstat (limited to 'kernel/irq/migration.c')
-rw-r--r--kernel/irq/migration.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index eb150afd671f..e110300ad650 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -35,6 +35,16 @@ bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear)
return true;
}
+void irq_force_complete_move(struct irq_desc *desc)
+{
+ for (struct irq_data *d = irq_desc_get_irq_data(desc); d; d = d->parent_data) {
+ if (d->chip && d->chip->irq_force_complete_move) {
+ d->chip->irq_force_complete_move(d);
+ return;
+ }
+ }
+}
+
void irq_move_masked_irq(struct irq_data *idata)
{
struct irq_desc *desc = irq_data_to_desc(idata);