提交 d72cad45 编写于 作者: Y Yufen Wang 提交者: Zheng Zengkai

ARM: kdump: fix timer interrupts panic, could not boot capture_kernel

hulk inclusion
category: bugfix
bugzilla: 47258
CVE: N/A

-------------------------------------------------

The kexec will boot a captured kernel while the kernel panic. But it boots
failed if the kernel panic in handler function of PPI. The reason is that
the PPI has not been 'eoi', other interrupts can not be handled when
booting the captured kernel. This patch fix this bug.
Signed-off-by: NYufen Wang <wangyufen@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com>

Conflicts:
	arch/arm/kernel/machine_kexec.c
Signed-off-by: NLi Huafei <lihuafei1@huawei.com>
Reviewed-by: NWang Yufen <wangyufen@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e5d497b7
......@@ -10,6 +10,7 @@
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/memblock.h>
#include <linux/interrupt.h>
#include <linux/of_fdt.h>
#include <asm/mmu_context.h>
#include <asm/cacheflush.h>
......@@ -124,11 +125,28 @@ static void machine_kexec_mask_interrupts(void)
for_each_irq_desc(i, desc) {
struct irq_chip *chip;
int ret;
chip = irq_desc_get_chip(desc);
if (!chip)
continue;
/*
* First try to remove the active state. If this
* fails, try to EOI the interrupt.
*/
if (desc->irq_data.hwirq > 15 && desc->irq_data.hwirq < 32) {
bool active = false;
ret = irq_get_irqchip_state(i, IRQCHIP_STATE_ACTIVE, &active);
if (ret) {
pr_debug("Get irq active state failed.\n");
} else {
if (active)
chip->irq_eoi(&desc->irq_data);
}
}
if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data))
chip->irq_eoi(&desc->irq_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部