linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dragan Mladjenovic <Dragan.Mladjenovic@syrmia.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>,
	Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chao-ying Fu <cfu@wavecomp.com>
Subject: [PATCH 11/12] MIPS: Report cluster in /proc/cpuinfo
Date: Thu, 19 May 2022 20:51:24 +0200	[thread overview]
Message-ID: <20220519185125.11686-12-Dragan.Mladjenovic@syrmia.com> (raw)
In-Reply-To: <20220519185125.11686-1-Dragan.Mladjenovic@syrmia.com>

From: Paul Burton <paulburton@kernel.org>

When >= CM3.5 output cluster number.

Signed-off-by: Paul Burton <paulburton@kernel.org>
Signed-off-by: Chao-ying Fu <cfu@wavecomp.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


  parent reply	other threads:[~2022-05-19 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 18:51 [PATCH 00/12] MIPS: Support I6500 multi-cluster configuration Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 01/12] MIPS: CPS: Add a couple of multi-cluster utility functions Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 02/12] MIPS: GIC: Generate redirect block accessors Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 03/12] irqchip: mips-gic: Introduce gic_with_each_online_cpu() Dragan Mladjenovic
2022-05-20  8:38   ` Marc Zyngier
2022-05-23 10:30     ` Serge Semin
2022-05-19 18:51 ` [PATCH 04/12] irqchip: mips-gic: Support multi-cluster in gic_with_each_online_cpu() Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 05/12] irqchip: mips-gic: Setup defaults in each cluster Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 06/12] irqchip: mips-gic: Multi-cluster support Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 07/12] clocksource: mips-gic-timer: Always use cluster 0 counter as clocksource Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 08/12] clocksource: mips-gic-timer: Enable counter when CPUs start Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 09/12] MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core Dragan Mladjenovic
2022-05-19 18:51 ` [PATCH 10/12] MIPS: CPS: Introduce struct cluster_boot_config Dragan Mladjenovic
2022-05-19 18:51 ` Dragan Mladjenovic [this message]
2022-05-19 18:51 ` [PATCH 12/12] MIPS: CPS: Boot CPUs in secondary clusters Dragan Mladjenovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220519185125.11686-12-Dragan.Mladjenovic@syrmia.com \
    --to=dragan.mladjenovic@syrmia.com \
    --cc=cfu@wavecomp.com \
    --cc=geert@linux-m68k.org \
    --cc=hauke@hauke-m.de \
    --cc=ilya.lipnitskiy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).