Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7981/1: add support for AT_HWCAP2 ELF auxv entry

This enables AT_HWCAP2 for ARM. The generic support for this
new ELF auxv entry was added in commit 2171364d1a9 (powerpc:
Add HWCAP2 aux entry)

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Ard Biesheuvel and committed by
Russell King
b342ea4e 27e8efdb

+17 -1
+2 -1
arch/arm/include/asm/hwcap.h
··· 9 9 * instruction set this cpu supports. 10 10 */ 11 11 #define ELF_HWCAP (elf_hwcap) 12 - extern unsigned int elf_hwcap; 12 + #define ELF_HWCAP2 (elf_hwcap2) 13 + extern unsigned int elf_hwcap, elf_hwcap2; 13 14 #endif 14 15 #endif
+4
arch/arm/include/uapi/asm/hwcap.h
··· 28 28 #define HWCAP_LPAE (1 << 20) 29 29 #define HWCAP_EVTSTRM (1 << 21) 30 30 31 + /* 32 + * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2 33 + */ 34 + 31 35 #endif /* _UAPI__ASMARM_HWCAP_H */
+11
arch/arm/kernel/setup.c
··· 100 100 unsigned int elf_hwcap __read_mostly; 101 101 EXPORT_SYMBOL(elf_hwcap); 102 102 103 + unsigned int elf_hwcap2 __read_mostly; 104 + EXPORT_SYMBOL(elf_hwcap2); 105 + 103 106 104 107 #ifdef MULTI_CPU 105 108 struct processor processor __read_mostly; ··· 1008 1005 NULL 1009 1006 }; 1010 1007 1008 + static const char *hwcap2_str[] = { 1009 + NULL 1010 + }; 1011 + 1011 1012 static int c_show(struct seq_file *m, void *v) 1012 1013 { 1013 1014 int i, j; ··· 1034 1027 for (j = 0; hwcap_str[j]; j++) 1035 1028 if (elf_hwcap & (1 << j)) 1036 1029 seq_printf(m, "%s ", hwcap_str[j]); 1030 + 1031 + for (j = 0; hwcap2_str[j]; j++) 1032 + if (elf_hwcap2 & (1 << j)) 1033 + seq_printf(m, "%s ", hwcap2_str[j]); 1037 1034 1038 1035 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", cpuid >> 24); 1039 1036 seq_printf(m, "CPU architecture: %s\n",