arm64: restrict effects of ARMV7_COMPAT_CPUINFO to ARMv7 tasks
authorGreg Hackmann <ghackmann@google.com>
Tue, 5 Aug 2014 23:14:27 +0000 (16:14 -0700)
committerGreg Hackmann <ghackmann@google.com>
Sat, 13 Sep 2014 00:30:11 +0000 (17:30 -0700)
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 <ghackmann@google.com>
arch/arm64/kernel/setup.c

index 18fcb7ca9b958d97ebd0188959c7300928e2ab00..06aeec407b20e5c5d29ad91706981d3f271cc969 100644 (file)
@@ -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);