Re: [PATCH] mfd: db8500-prcmu: fix irqdomain usage

From: Linus Walleij
Date: Thu Dec 20 2012 - 04:17:15 EST


On Thu, Dec 20, 2012 at 8:50 AM, Lee Jones <lee.jones@xxxxxxxxxx> 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.

This is not quite trivial to use ... irqdomain seems like it
will bite us repeatedly for the next few years.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/