[patch 2/9] autoselect optimal -mcpu= flag by platform

Kumar Gala galak at kernel.crashing.org
Mon Jun 18 00:29:14 EST 2007


On Jun 15, 2007, at 7:05 PM, arnd at arndb.de wrote:

> We can choose the -mcpu= gcc flags for compiling the kernel
> based on the platform that we build for. In case of multiplatform
> kernels, this chooses a setting for a common subset.
>
> When using a platform type that can use different CPUs, a
> new option CONFIG_PPC_CPU_SELECTION can be enabled to select
> more specifically which CPUs the kernel will be able to
> run on.
>
> This replaces the CONFIG_POWER4_ONLY option with an much more
> generic approach.
>
> Also, when CONFIG_PPC_CPU_SELECTION is set, it is now possible
> to select a CPU to tune for by means of the -mtune= option.
>
> I tried to be very careful when coding the specific rules into
> the Kconfig language, but it would be good to have a few
> people sanity-checking them.
>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>

Is there a reason we don't distinguish between 7400/7410 and 74{4,5} 
x?  Is it because we dont have any discrete systems with just a 7400  
on it?

Also I'd suggest we have the config options be a 1:1 matching for the  
-mcpu/-mtune options in gcc for the following cases:

> +	default "-mcpu=750" if CPU_7xx
> +	default "-mcpu=7450" if CPU_74xx
> +	default "-mcpu=860" if PPC_8xx
> +	default "-mcpu=8540" if PPC_85xx

So if in the future we have code scheduling for 8599 or some other  
variant we don't have to go change the Kconfig just add to it.

- k






More information about the Linuxppc-dev mailing list