Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1486296
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE |
| Date | 2016-09-19 11:40 +0200 |
| Message-ID | <sj3dn-3Em-17@gated-at.bofh.it> (permalink) |
| References | <sj2AF-3cw-11@gated-at.bofh.it> <sj2U2-3y7-13@gated-at.bofh.it> <sj33I-3Bf-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 19 Sep 2016, Marc Zyngier wrote:
> On 19/09/16 10:12, Thomas Gleixner wrote:
> > On Mon, 19 Sep 2016, Marc Zyngier wrote:
> >> 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;
> >
> > Are you really sure that the handler should only be set when the trigger
> > type is != NONE? I seriously doubt that this is correct.
>
> The handler has already been set outside of if() statement (at line
> 819). Here, we only set it again if we've actually called
> __irq_set_trigger() which could have changed it to something that takes
> the type into account (handle_level_irq or handle_edge_irq, for example).
Ah. I'll add a comment...
Back to linux.kernel | Previous | Next — Previous in thread | 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