Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1486272
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE |
| Date | 2016-09-19 11:00 +0200 |
| Message-ID | <sj2AF-3cw-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 1e12c4a9393b ("genirq: Correctly configure the trigger on chained interrupts")
Link: https://lkml.kernel.org/r/CAMuHMdVW1eTn20=EtYcJ8hkVwohaSuH_yQXrY2MGBEvZ8fpFOg@mail.gmail.com
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
kernel/irq/chip.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 6373890..26ba565 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -820,6 +820,8 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
desc->name = name;
if (handle != handle_bad_irq && is_chained) {
+ unsigned int type = irqd_get_trigger_type(&desc->irq_data);
+
/*
* We're about to start this interrupt immediately,
* 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,
* chained interrupt. Reset it immediately because we
* do know better.
*/
- __irq_set_trigger(desc, irqd_get_trigger_type(&desc->irq_data));
- desc->handle_irq = handle;
+ if (type != IRQ_TYPE_NONE) {
+ __irq_set_trigger(desc, type);
+ desc->handle_irq = handle;
+ }
irq_settings_set_noprobe(desc);
irq_settings_set_norequest(desc);
--
2.1.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Marc Zyngier <marc.zyngier@arm.com> - 2016-09-19 11:00 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Thomas Gleixner <tglx@linutronix.de> - 2016-09-19 11:20 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Marc Zyngier <marc.zyngier@arm.com> - 2016-09-19 11:30 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Thomas Gleixner <tglx@linutronix.de> - 2016-09-19 11:40 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Thomas Gleixner <tglx@linutronix.de> - 2016-09-19 11:40 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Geert Uytterhoeven <geert@linux-m68k.org> - 2016-09-19 11:40 +0200
Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE Geert Uytterhoeven <geert@linux-m68k.org> - 2016-09-19 11:30 +0200
[tip:irq/urgent] genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE tip-bot for Marc Zyngier <tipbot@zytor.com> - 2016-09-19 11:50 +0200
[tip:irq/urgent] genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE tip-bot for Marc Zyngier <tipbot@zytor.com> - 2016-09-20 01:20 +0200
Re: [tip:irq/urgent] genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE Thomas Gleixner <tglx@linutronix.de> - 2016-09-20 01:50 +0200
csiph-web