From: Greg Hackmann Date: Tue, 5 Aug 2014 23:14:27 +0000 (-0700) Subject: arm64: restrict effects of ARMV7_COMPAT_CPUINFO to ARMv7 tasks X-Git-Tag: firefly_0821_release~4090^2~205 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3868e7f8d47992922756d1aa6590f0d556c669b8;p=firefly-linux-kernel-4.4.55.git arm64: restrict effects of ARMV7_COMPAT_CPUINFO to ARMv7 tasks Since ARMV7_COMPAT_CPUINFO only exists to support existing ARMv7 binaries, restrict its effects to compat tasks Bug: 16819658 Change-Id: I1092de596c7822d23f5f3f8a05b417a3cb49f593 Signed-off-by: Greg Hackmann --- diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 18fcb7ca9b95..06aeec407b20 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -421,13 +421,19 @@ static int c_show(struct seq_file *m, void *v) if (elf_hwcap & (1 << i)) seq_printf(m, "%s ", hwcap_str[i]); #ifdef CONFIG_ARMV7_COMPAT_CPUINFO - /* Print out the non-optional ARMv8 HW capabilities */ - seq_printf(m, "wp half thumb fastmult vfp edsp neon vfpv3 tlsi "); - seq_printf(m, "vfpv4 idiva idivt "); + if (is_compat_task()) { + /* Print out the non-optional ARMv8 HW capabilities */ + seq_printf(m, "wp half thumb fastmult vfp edsp neon vfpv3 tlsi "); + seq_printf(m, "vfpv4 idiva idivt "); + } #endif seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24); - seq_printf(m, "CPU architecture: 8\n"); + seq_printf(m, "CPU architecture: %s\n", +#if IS_ENABLED(CONFIG_ARMV7_COMPAT_CPUINFO) + is_compat_task() ? "8" : +#endif + "AArch64"); seq_printf(m, "CPU variant\t: 0x%x\n", (read_cpuid_id() >> 20) & 15); seq_printf(m, "CPU part\t: 0x%03x\n", (read_cpuid_id() >> 4) & 0xfff); seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15);