Skip to content

Commit 1984e07

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE
There is no point in trying to configure the trigger of a chained interrupt if no trigger information has been configured. At best this is ignored, and at the worse this confuses the underlying irqchip (which is likely not to handle such a thing), and unnecessarily alarms the user. Only apply the configuration if type is not IRQ_TYPE_NONE. Fixes: 1e12c4a ("genirq: Correctly configure the trigger on chained interrupts") Reported-and-tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Link: https://lkml.kernel.org/r/CAMuHMdVW1eTn20=EtYcJ8hkVwohaSuH_yQXrY2MGBEvZ8fpFOg@mail.gmail.com Link: http://lkml.kernel.org/r/1474274967-15984-1-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 3be7988 commit 1984e07

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

kernel/irq/chip.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,8 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
820820
desc->name = name;
821821

822822
if (handle != handle_bad_irq && is_chained) {
823+
unsigned int type = irqd_get_trigger_type(&desc->irq_data);
824+
823825
/*
824826
* We're about to start this interrupt immediately,
825827
* hence the need to set the trigger configuration.
@@ -828,8 +830,10 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
828830
* chained interrupt. Reset it immediately because we
829831
* do know better.
830832
*/
831-
__irq_set_trigger(desc, irqd_get_trigger_type(&desc->irq_data));
832-
desc->handle_irq = handle;
833+
if (type != IRQ_TYPE_NONE) {
834+
__irq_set_trigger(desc, type);
835+
desc->handle_irq = handle;
836+
}
833837

834838
irq_settings_set_noprobe(desc);
835839
irq_settings_set_norequest(desc);

0 commit comments

Comments
 (0)