From: Lee Jones <lee.jones@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@stericsson.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-kernel@vger.kernel.org,
Anmar Oueja <anmar.oueja@linaro.org>,
stable@kernel.org
Subject: Re: [PATCH] mfd: db8500-prcmu: fix irqdomain usage
Date: Thu, 20 Dec 2012 10:04:52 +0000 [thread overview]
Message-ID: <20121220100452.GG2691@gmail.com> (raw)
In-Reply-To: <CACRpkdZwaTRDD9ZsOcPx+=TfNT0m=5-t6w32195k3Kp=PqvnFA@mail.gmail.com>
On Thu, 20 Dec 2012, Linus Walleij wrote:
> On Thu, Dec 20, 2012 at 8:50 AM, Lee Jones <lee.jones@linaro.org> wrote:
> > On Thu, 20 Dec 2012, Grant Likely wrote:
> >>
> >> This looks wrong. It probably works at the moment, but calling
> >> irq_create_mapping when trying to process an IRQ is backwards. There
> >> certainly shouldn't be any processing of an irq that isn't already
> >> mapped. irq_find_mapping() should be used instead.
> >
> > But irq_create_mapping() calls irq_find_mapping() if the irq is
> > already mapped? Or are you saying that if it isn't already mapped
> > then there is an issue somewhere else earlier in the code?
>
> I've submitted a v2 patch making the changes I think Grant is
> fishing for..
>
> Basically irq_create_mapping() should be in slowpath and
> irq_find_mapping() in fastpath with the semantics that
> the former has to be called at least once before the other
> is ever called.
Still seems strange to me. Calling irq_create_mapping() on pre-
mapped IRQs is only a few cycles more and it saves the extra
bumph now inserted into patch v2.
> This is not quite trivial to use ... irqdomain seems like it
> will bite us repeatedly for the next few years.
I agree. Personally I like to call irq_create_mapping(), then
I know that if the IRQ isn't already mapped, it soon will be.
This is almost certainly not the way the Grant intended the
API would be used, but seems simpler and diverts the
complexity you speak of above.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2012-12-20 10:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 14:42 [PATCH] mfd: db8500-prcmu: fix irqdomain usage Linus Walleij
2012-12-19 15:16 ` Lee Jones
2012-12-20 1:32 ` Grant Likely
2012-12-20 7:50 ` Lee Jones
2012-12-20 9:17 ` Linus Walleij
2012-12-20 10:04 ` Lee Jones [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=20121220100452.GG2691@gmail.com \
--to=lee.jones@linaro.org \
--cc=anmar.oueja@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=stable@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).