All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: MT: proc: Add support for printing VPE and TC ids
@ 2013-10-15 14:13 ` Markos Chandras
  0 siblings, 0 replies; 9+ messages in thread
From: Markos Chandras @ 2013-10-15 14:13 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras

Add support for including VPE and TC ids in /proc/cpuinfo output as
appropriate when MT/SMTC is enabled.

Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
This patch is for the upstream-sfr/mips-for-linux-next tree
---
 arch/mips/kernel/proc.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 8c58d8a..db49bfa 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -107,7 +107,14 @@ 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, "core\t\t\t: %d\n", cpu_data[n].core);
-
+#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
+	if (cpu_has_mipsmt) {
+		seq_printf(m, "VPE\t\t\t: %d\n", cpu_data[n].vpe_id);
+#if defined(CONFIG_MIPS_MT_SMTC)
+		seq_printf(m, "TC\t\t\t: %d\n", cpu_data[n].tc_id);
+#endif
+	}
+#endif
 	sprintf(fmt, "VCE%%c exceptions\t\t: %s\n",
 		      cpu_has_vce ? "%u" : "not available");
 	seq_printf(m, fmt, 'D', vced_count);
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-04-03 11:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 14:13 [PATCH] MIPS: MT: proc: Add support for printing VPE and TC ids Markos Chandras
2013-10-15 14:13 ` Markos Chandras
2013-10-16 15:10 ` Ralf Baechle
2014-04-02 10:25   ` James Hogan
2014-04-02 10:25     ` James Hogan
2014-04-02 10:32     ` Ralf Baechle
2014-04-03 11:20     ` Ralf Baechle
2014-04-03 11:24       ` James Hogan
2014-04-03 11:24         ` James Hogan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.