kernel: arm64: Added "model name" in /proc/cpuinfo
Ninad Malwade [Mon, 3 Oct 2016 08:46:01 +0000 (16:46 +0800)]
- Show "model name" in /proc/cpuinfo
- This will enable displaying processor info in
"System setting -> Details" in Ubuntu

model name display is generic.
model name      : ARMv8 Processor rev X (v8l)

bug 200225877

Change-Id: I6bd4334693b1e87c8f678f164be814d3047969ee
Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-on: http://git-master/r/1230761
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

arch/arm64/kernel/setup.c

index 829094b..cc58e59 100644 (file)
@@ -580,6 +580,10 @@ static int c_show(struct seq_file *m, void *v)
 #ifdef CONFIG_SMP
                seq_printf(m, "processor\t: %d\n", i);
 #endif
+
+               seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
+                       MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
+
                seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
                           loops_per_jiffy / (500000UL/HZ),
                           loops_per_jiffy / (5000UL/HZ) % 100);