lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 21 Sep 2010 16:27:07 -0300
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Andres Salomon <dilinger@...ued.net>, Ingo Molnar <mingo@...e.hu>,
	devicetree-discuss@...ts.ozlabs.org, x86@...nel.org,
	mingo@...hat.com, hpa@...or.com, Mitch Bradley <wmb@...top.org>,
	linux-kernel@...r.kernel.org,
	Stephen Neuendorffer <stephen.neuendorffer@...inx.com>
Subject: Re: [PATCH 2/2] x86: of: define irq functions to allow drivers/of/*
 to build on x86

On Tue, Sep 21, 2010 at 1:27 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Tue, 21 Sep 2010, Andres Salomon wrote:
>> On Tue, 21 Sep 2010 11:45:37 +0200 (CEST)
>> Thomas Gleixner <tglx@...utronix.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists