Subject: Re: [PATCH v2 2/2] [POWERPC] Use new machine_xxx_initcall hooks in platform code

From: Geoff Levand <[email-masked]>
Date: Tue, 04 Dec 2007 12:59:55 -0800

Geert Uytterhoeven wrote:
> On Tue, 4 Dec 2007, Grant Likely wrote:
>> On 12/4/07, Geert Uytterhoeven <[email-masked]> wrote:
>> > On Sat, 1 Dec 2007, Grant Likely wrote:
>> > > From: Grant Likely <[email-masked]>
>> > >
>> > > This patch makes the platform code use the new machine-specific initcall
>> > > hooks.  This has the advantage of not needing to explicitly test
>> > > machine_is() at the top of every initcall function.
>> >
>> > You seem to have missed the PS3 *_initcall()s.
>> > Probably because they test for firmware_has_feature(FW_FEATURE_PS3_LV1) instead
>> > of machine_is(ps3).
>> 
>> That's exactly why; I didn't know if 'machine_is(ps3)' was a suitable
>> substitute so I left it alone.
> 
> I think it's OK. But...
> 
> Geoff: is there any specific reason why you used
> firmware_has_feature(FW_FEATURE_PS3_LV1)?

As Arnd pointed out, the code in the firmware_has_feature() conditional
will be removed by the optimizer when the kernel is built without support
for that feature.  This then gives a multi-platform binary that has only
the code for the sub-set of features the user selected. 

-Geoff