[PATCH 2/2] x86: of: define irq functions to allow drivers/of/* to build on x86
Grant Likely
grant.likely at secretlab.ca
Wed Sep 22 05:27:07 EST 2010
On Tue, Sep 21, 2010 at 1:27 PM, Thomas Gleixner <tglx at linutronix.de> wrote:
> On Tue, 21 Sep 2010, Andres Salomon wrote:
>> On Tue, 21 Sep 2010 11:45:37 +0200 (CEST)
>> Thomas Gleixner <tglx at linutronix.de> wrote:
>>
>> > > Any additional comments (ACKs, NACKs, etc) on the patches? If I
>> > > need to rework it (or them), I can certainly make the patch
>> > > description longer.
>> >
>> > Fine with me, but you could make the "mapping" function an inline as
>> > well. While at it, some sensible changelog would be helpful :)
>> >
>> > Thanks,
>> >
>> > tglx
>>
>> Hm, inlining it would require some additional x86 #ifdefs in
>> include/linux/of_irq.h (where the mapping function is declared). You'd
>> prefer that?
>
> Urgh, no.
In OF code, I *have* been moving to the following pattern when the OF
code has a sane default:
#ifndef <symbol>
static inline <symbol>(...)
{
<default implementation>
}
#define <symbol> <symbol>
#endif
I'd normally be totally okay with this in of_irq.h, except for the
fact that this implementation is a temporary solution. Once I've got
the irq remapping code generalized for all architecture then the map
function could become a static inline in this form.
Fortunately, this code should never be on a hot path.
g.
More information about the devicetree-discuss
mailing list