From: Grant Likely <grant.likely@secretlab.ca>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linus Walleij <linus.walleij@stericsson.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqdomain: print a warning if domains contain IRQ 0
Date: Fri, 27 Apr 2012 12:56:48 -0600 [thread overview]
Message-ID: <20120427185648.47F393E0B4D@localhost> (raw)
In-Reply-To: <CACRpkdYpPLNnuivcN9CsG6ZHsZ7=AOkYv9OSGjfiLFi1ouh03g@mail.gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
On Fri, 20 Apr 2012 08:38:05 +0200, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Apr 19, 2012 at 8:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>
> > This is indeed specific to the legacy domain. I think the patch is
> > good and it will help weed out unintended irq0 users. However, it
> > requires the following additional fix I think. It will need to be
> > tested to make sure it doesn't break PowerPC ISA users.
> >
> > g.
> >
> > diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
> > index d0995bd..31f1f88 100644
> > --- a/include/linux/irqdomain.h
> > +++ b/include/linux/irqdomain.h
> > @@ -138,7 +138,7 @@ static inline struct irq_domain *irq_domain_add_legacy_isa(
> > const struct irq_domain_ops *ops,
> > void *host_data)
> > {
> > - return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops,
> > + return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS-1, 1, 1, ops,
> > host_data);
>
> Hm, so what does this do? If I fold it into my patch I need some
> kind of blurb...
>
> I'm guessing it bumps the ISA IRQs with one to avoid using IRQ0 which
> seems like a valid patch on its own, and that the old code was
> used for actively ignoring IRQ 0 on ISA (not used or whatever)?
Yes, that is exactly what it does. The fact that 0 is allowed but
never used is an artifact of how this code used to be only for ISA and
both irq and hwirq base numbers were hard coded to 0 for that.
The reworked legacy domain allowed both irq base and hwirq base to be
non-zero, but the check for 0 code remained.
g.
prev parent reply other threads:[~2012-04-27 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 13:40 [PATCH] irqdomain: print a warning if domains contain IRQ 0 Linus Walleij
2012-04-18 22:23 ` Benjamin Herrenschmidt
2012-04-18 22:32 ` Linus Walleij
2012-04-19 18:29 ` Grant Likely
2012-04-20 6:38 ` Linus Walleij
2012-04-27 18:56 ` Grant Likely [this message]
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=20120427185648.47F393E0B4D@localhost \
--to=grant.likely@secretlab.ca \
--cc=benh@kernel.crashing.org \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).