From: Thomas Gleixner <tglx@linutronix.de>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] genirq: Skip chained interrupt trigger configuration if type is IRQ_TYPE_NONE
Date: Mon, 19 Sep 2016 11:30:24 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1609191129510.5618@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1609191127500.5618@nanos>
On Mon, 19 Sep 2016, Thomas Gleixner wrote:
> 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...
Bah. There is one already. Reading patches before being awake seems not to
be a brilliant idea.
next prev parent reply other threads:[~2016-09-19 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 8:49 Marc Zyngier
2016-09-19 9:12 ` Thomas Gleixner
2016-09-19 9:19 ` Marc Zyngier
2016-09-19 9:28 ` Thomas Gleixner
2016-09-19 9:30 ` Thomas Gleixner [this message]
2016-09-19 9:32 ` Geert Uytterhoeven
2016-09-19 9:22 ` Geert Uytterhoeven
2016-09-19 9:40 ` [tip:irq/urgent] genirq: Skip chained interrupt trigger setup " tip-bot for Marc Zyngier
2016-09-19 23:09 ` tip-bot for Marc Zyngier
2016-09-19 23:41 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1609191129510.5618@nanos \
--to=tglx@linutronix.de \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®