ARM: 7679/1: Clear IDIVT hwcap if CONFIG_ARM_THUMB=n
authorStephen Boyd <sboyd@codeaurora.org>
Mon, 18 Mar 2013 18:44:14 +0000 (19:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 22 Mar 2013 17:16:54 +0000 (17:16 +0000)
Don't advertise support for the SDIV/UDIV thumb instructions if
the kernel is not compiled with support for thumb userspace. This
is in line with how we remove the THUMB hwcap in these
configurations.

Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/setup.c

index 3f6cbb2e3edae392f2b73520b89b6ee3b19e8437..e2c8bbffb0b17fcfda0a90b3dacd4ae9e9a110cb 100644 (file)
@@ -484,7 +484,7 @@ static void __init setup_processor(void)
                 list->elf_name, ENDIANNESS);
        elf_hwcap = list->elf_hwcap;
 #ifndef CONFIG_ARM_THUMB
-       elf_hwcap &= ~HWCAP_THUMB;
+       elf_hwcap &= ~(HWCAP_THUMB | HWCAP_IDIVT);
 #endif
 
        feat_v6_fixup();