[RESENT PATCH] arm64: cpuinfo: Add "model name" in /proc/cpuinfo for 64bit tasks also

Tianling Shen cnsztl at gmail.com
Mon Feb 1 18:58:09 EST 2021

From: Sumit Gupta <sumitg at nvidia.com>

Removed restriction of displaying model name for 32 bit tasks only.
This can be used for 64 bit tasks as well, and it's useful for some
tools that already parse this, such as coreutils `uname -p`, Ubuntu
model name display etc.

It should be like this:
$ cat '/proc/cpuinfo' | grep 'model name' | head -n 1
model name : ARMv8 Processor rev X (v8l)

Link: https://lore.kernel.org/lkml/1472461345-28219-1-git-send-email-sumitg@nvidia.com/

Signed-off-by: Sumit Gupta <sumitg at nvidia.com>
Signed-off-by: Tianling Shen <cnsztl at gmail.com>
 arch/arm64/kernel/cpuinfo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 77605aec25fe..d69b4e486098 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -148,8 +148,7 @@ static int c_show(struct seq_file *m, void *v)
 		 * "processor".  Give glibc what it expects.
 		seq_printf(m, "processor\t: %d\n", i);
-		if (compat)
-			seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
+		seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
 		seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",

More information about the linux-arm-kernel mailing list