[PATCH 10/14] ARM: v6k: select TLS register code according to V6 variants

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Jan 17 17:36:35 EST 2011


On Mon, Jan 17, 2011 at 05:23:43PM -0500, Nicolas Pitre wrote:
> On Mon, 17 Jan 2011, Russell King - ARM Linux wrote:
> 
> > If CONFIG_CPU_V6 is enabled, we may or may not have the TLS register.
> > Use the conditional code which copes with this variability.  Otherwise,
> > if CONFIG_CPU_32v6K is set, we know we have the TLS register on all
> > supported CPUs, so use it unconditionally.
> > 
> > Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> 
> Acked-by: Nicolas Pitre <nicolas.pitre at linaro.org>
> 
> Note: this is becoming a bit confusing and prone to mistake when we have:

Agreed.

> 	CONFIG_CPU_V6
> 	CONFIG_CPU_V6K
> 	CONFIG_CPU_32v6
> 	CONFIG_CPU_32v6K
> 
> I don't know what to suggest for a less similar naming scheme between 
> the CPU design and the allowed instruction set though.

It's best to consider CONFIG_CPU_V6/CONFIG_CPU_V6K/CONFIG_CPU_V7 in the
same light as CONFIG_CPU_ARM926T etc.  It selects a specific CPU core
(or family of CPU cores) rather than an architecture - the fact that it
_may_ tie up with an architecture is incidental.

The CPU_32vX selects the major architecture version.  32vX<letter> selects
sub-options of the architecture.

It may be better at some point to get rid of the CPU_32v* and replace
them with CPU_ARCH_V* instead, which makes it clear that these ones
definitely refer to the architecture versions.

The last point while we're here is I don't think it helps to have the
conditionals spread between the Kconfig files and this file - I'd much
rather see them all in Kconfig so we can see exactly how we end up with
each option (TLS_EMUL, TLS_V6, TLS_V6K) in one place.



More information about the linux-arm-kernel mailing list