[PATCH v2 2/2] [POWERPC] Use new machine_xxx_initcall hooks in platform code
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Dec 5 07:31:13 EST 2007
On Tue, 2007-12-04 at 20:35 +0100, Arnd Bergmann wrote:
>
> 1. If another platform gets added that uses the same firmware feature,
> it
> will automatically do the right thing.
Yes but is it something that we want to happen ? That is, do we want
code somewhere in a platform/foo dir to run when using platform/bar
because they happen to share a feature ?
I don't think so ... such code should be located elsewhere, maybe in
sysdev, where it's clear that it's shared.
Thus, thing that is -really- platform specific and wants to stay in the
platform code should move to the new mechanism I believe.
As for PS3, will there ever be another platform using LV1 ? If that is
the case, we may want to create a shared directory with all the LV1
bits...
> 2. The call to firmware_has_feature() turns into a compile-time check
> in
> many cases, so if the kernel does not contain support for any firmware
> with the given feature, all the code referenced it can get optimized
> away by the compiler.
The machine init stuff will soon get rid of whatever test is in it too,
as soon as I get to do the ELF magic.
Ben.
More information about the Linuxppc-dev
mailing list