[PATCH] arm64/cpuinfo: Show right CPU architecture information
Liguang Zhang
zhangliguang at linux.alibaba.com
Tue Jan 19 05:55:10 EST 2021
CPU architecture is assigned to be a fixed value, it should be obtained
from midr register.
Signed-off-by: Liguang Zhang <zhangliguang at linux.alibaba.com>
---
arch/arm64/kernel/cpuinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 77605aec25fe..0bd11e0fe9f2 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -191,7 +191,7 @@ static int c_show(struct seq_file *m, void *v)
seq_printf(m, "CPU implementer\t: 0x%02x\n",
MIDR_IMPLEMENTOR(midr));
- seq_printf(m, "CPU architecture: 8\n");
+ seq_printf(m, "CPU architecture: %d\n", MIDR_ARCHITECTURE(midr));
seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr));
seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr));
seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
--
2.19.1.6.gb485710b
More information about the linux-arm-kernel
mailing list