From: Markos Chandras Date: Tue, 15 Oct 2013 14:13:02 +0000 (+0100) Subject: MIPS: MT: proc: Add support for printing VPE and TC ids X-Git-Tag: next-20140116~105^2^2~100 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8596c1f63f88aa6fe867036a2847f6d988ec9daf;p=karo-tx-linux.git MIPS: MT: proc: Add support for printing VPE and TC ids Add support for including VPE and TC ids in /proc/cpuinfo output as appropriate when MT/SMTC is enabled. Reviewed-by: James Hogan Signed-off-by: Markos Chandras Acked-by: John Crispin Patchwork: http://patchwork.linux-mips.org/patch/6065/ --- diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 8c58d8a84bf3..db49bfafa329 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);