[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251213094950.1068951-1-chenhuacai@loongson.cn>
Date: Sat, 13 Dec 2025 17:49:50 +0800
From: Huacai Chen <chenhuacai@...ngson.cn>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sasha Levin <sashal@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>
Cc: Xuerui Wang <kernel@...0n.name>,
stable@...r.kernel.org,
linux-kernel@...r.kernel.org,
loongarch@...ts.linux.dev,
Huacai Chen <chenhuacai@...ngson.cn>,
Tianyang Zhang <zhangtianyang@...ngson.cn>
Subject: [PATCH 6.12] LoongArch: Add machine_kexec_mask_interrupts() implementation
Commit 863a320dc6fd7c855f47da4b ("LoongArch: Mask all interrupts during
kexec/kdump") is backported to LTS branches, but they lack a generic
machine_kexec_mask_interrupts() implementation, so add an arch-specific
one.
Signed-off-by: Tianyang Zhang <zhangtianyang@...ngson.cn>
Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
---
6.6LTS also need it if commit 863a320dc6fd7c855f47da4b is backported.
arch/loongarch/kernel/machine_kexec.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/loongarch/kernel/machine_kexec.c b/arch/loongarch/kernel/machine_kexec.c
index 8ef4e4595d61..19bd763263d3 100644
--- a/arch/loongarch/kernel/machine_kexec.c
+++ b/arch/loongarch/kernel/machine_kexec.c
@@ -136,6 +136,28 @@ void kexec_reboot(void)
BUG();
}
+static void machine_kexec_mask_interrupts(void)
+{
+ unsigned int i;
+ struct irq_desc *desc;
+
+ for_each_irq_desc(i, desc) {
+ struct irq_chip *chip;
+
+ chip = irq_desc_get_chip(desc);
+ if (!chip)
+ continue;
+
+ if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data))
+ chip->irq_eoi(&desc->irq_data);
+
+ if (chip->irq_mask)
+ chip->irq_mask(&desc->irq_data);
+
+ if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data))
+ chip->irq_disable(&desc->irq_data);
+ }
+}
#ifdef CONFIG_SMP
static void kexec_shutdown_secondary(void *regs)
--
2.47.3
Powered by blists - more mailing lists