s390/cpuinfo: show number of online CPUs within a package
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 13 Mar 2020 15:55:10 +0000 (16:55 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Mar 2020 12:41:54 +0000 (13:41 +0100)
Show number of online CPUs within a package (which is
the socket in case of s390). For what it worth, present
that value as "siblings" field - just like x86 does.

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/processor.c

index 4117209..39bf777 100644 (file)
@@ -160,6 +160,7 @@ static void show_cpu_topology(struct seq_file *m, unsigned long n)
        seq_printf(m, "drawer id       : %d\n", topology_drawer_id(n));
        seq_printf(m, "dedicated       : %d\n", topology_cpu_dedicated(n));
        seq_printf(m, "address         : %d\n", smp_cpu_get_cpu_address(n));
+       seq_printf(m, "siblings        : %d\n", cpumask_weight(topology_core_cpumask(n)));
        seq_printf(m, "cpu cores       : %d\n", topology_booted_cores(n));
 #endif /* CONFIG_SCHED_TOPOLOGY */
 }