[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220519185125.11686-12-Dragan.Mladjenovic@syrmia.com>
Date: Thu, 19 May 2022 20:51:24 +0200
From: Dragan Mladjenovic <Dragan.Mladjenovic@...mia.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Paul Burton <paulburton@...nel.org>,
Ilya Lipnitskiy <ilya.lipnitskiy@...il.com>,
Hauke Mehrtens <hauke@...ke-m.de>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Chao-ying Fu <cfu@...ecomp.com>
Subject: [PATCH 11/12] MIPS: Report cluster in /proc/cpuinfo
From: Paul Burton <paulburton@...nel.org>
When >= CM3.5 output cluster number.
Signed-off-by: Paul Burton <paulburton@...nel.org>
Signed-off-by: Chao-ying Fu <cfu@...ecomp.com>
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index bb43bf850314..a66e7705315d 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -12,6 +12,7 @@
#include <asm/cpu.h>
#include <asm/cpu-features.h>
#include <asm/idle.h>
+#include <asm/mips-cps.h>
#include <asm/mipsregs.h>
#include <asm/processor.h>
#include <asm/prom.h>
@@ -282,6 +283,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "kscratch registers\t: %d\n",
hweight8(cpu_data[n].kscratch_mask));
seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
+ if (mips_cm_revision() >= CM_REV_CM3_5)
+ seq_printf(m, "cluster\t\t\t: %d\n", cpu_cluster(&cpu_data[n]));
seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n]));
#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_CPU_MIPSR6)
--
2.17.1
Powered by blists - more mailing lists