Skip to content

Commit e7af19b

Browse files
chenhuacaiopsiff
authored andcommitted
LoongArch: Add machine_kexec_mask_interrupts() implementation
Commit 863a320 ("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@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 95eb965ce0a6ff8345653963cfde311a38b43691) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent afd5ec6 commit e7af19b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

arch/loongarch/kernel/machine_kexec.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,28 @@ void kexec_reboot(void)
177177
BUG();
178178
}
179179

180+
static void machine_kexec_mask_interrupts(void)
181+
{
182+
unsigned int i;
183+
struct irq_desc *desc;
184+
185+
for_each_irq_desc(i, desc) {
186+
struct irq_chip *chip;
187+
188+
chip = irq_desc_get_chip(desc);
189+
if (!chip)
190+
continue;
191+
192+
if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data))
193+
chip->irq_eoi(&desc->irq_data);
194+
195+
if (chip->irq_mask)
196+
chip->irq_mask(&desc->irq_data);
197+
198+
if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data))
199+
chip->irq_disable(&desc->irq_data);
200+
}
201+
}
180202

181203
#ifdef CONFIG_SMP
182204
static void kexec_shutdown_secondary(void *regs)

0 commit comments

Comments
 (0)