irqchip: mark the irq status in handle_percpu_devid_irq
PATCH 1/1 irqchip: mark the irq status in handle_percpu_devid_irq
Function handle_percpu_devid_irq lacks of irq's state changing. The handler may fail. So we should mark this irq's status. It is very useful when we deploy kdump and the handler fails with panic. The kdump can deal with this situaton in machine_kexec_mask_interrupts, which will do some works to the interrupt controller (write EOI..).
Without this patch, kdump can not go through if first kernel panics in per-cpu interrupt handler(like hrtimers). I can reduce this bugs on ARM SMP platform with per cpu timers.
I have send a related patchset. But I think that is not the best way to solve this problem.
link lkml.org/lkml/2014/8/4/18
Signed-off-by Liu Hua <[email protected]>
--- kernel/irq/chip.c | 8 ++++++++ 1 file changed, 8 insertions(+)
kernel/irq/chip.c +8 -0
@@ -710,10 +710,18 @@ void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc)if (chip->irq_ack) chip->irq_ack (&desc->irq_data); +raw_spin_lock (&desc->lock); +irqd_set (&desc->irq_data,IRQD_IRQ_INPROGRESS ); +raw_spin_unlock (&desc->lock); +trace_irq_handler_entry (irq, action); res = action->handler (irq, dev_id);trace_irq_handler_exit (irq, action, res); +raw_spin_lock (&desc->lock); +irqd_clear (&desc->irq_data,IRQD_IRQ_INPROGRESS ); +raw_spin_unlock (&desc->lock); +if (chip->irq_eoi) chip->irq_eoi (&desc->irq_data); }
Signature · 1 line
1.9.0