[PATCH 4/4] ARM: hwcap: disable HWCAP_SWP if the CPU advertises it has exclusives

Arnd Bergmann arnd at arndb.de
Fri Jul 4 13:11:06 PDT 2014


On Friday 04 July 2014 20:52:17 Russell King wrote:
>         /*
>          * HWCAP_TLS is available only on 1136 r1p0 and later,
>          * see also kuser_get_tls_init.
>          */
> -       if ((((id >> 4) & 0xfff) == 0xb36) && (((id >> 20) & 3) == 0))
> +       if (read_cpuid_part() == ARM_CPU_PART_ARM1136 &&
> +           ((id >> 20) & 3) == 0) {
>                 elf_hwcap &= ~HWCAP_TLS;
> +               return;
> +       }
> 

Would it make sense to tie this check to the ARMv6K architecture level?

I see that cpu_architecture currently reports the same value for plain
ARMv6 (1136r0) and for ARMv6K (1136r1+ or any other ARM11), but we already
distinguish them at compile time in a number of places and it seems you
make the exact same distinction here at runtime.

	Arnd



More information about the linux-arm-kernel mailing list