Skip to content

Commit 429bf3f

Browse files
chenhuacaigregkh
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>
1 parent a4b7a95 commit 429bf3f

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
@@ -136,6 +136,28 @@ void kexec_reboot(void)
136136
BUG();
137137
}
138138

139+
static void machine_kexec_mask_interrupts(void)
140+
{
141+
unsigned int i;
142+
struct irq_desc *desc;
143+
144+
for_each_irq_desc(i, desc) {
145+
struct irq_chip *chip;
146+
147+
chip = irq_desc_get_chip(desc);
148+
if (!chip)
149+
continue;
150+
151+
if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data))
152+
chip->irq_eoi(&desc->irq_data);
153+
154+
if (chip->irq_mask)
155+
chip->irq_mask(&desc->irq_data);
156+
157+
if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data))
158+
chip->irq_disable(&desc->irq_data);
159+
}
160+
}
139161

140162
#ifdef CONFIG_SMP
141163
static void kexec_shutdown_secondary(void *regs)

0 commit comments

Comments
 (0)