lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: db8500-prcmu: fix irqdomain usage
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-20 11:41    [W:0.047 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site