x86, procfs: remove condition for show_cpuinfo_core()
PATCH 1/1 x86, procfs: remove condition for show_cpuinfo_core()
show_cpuinfo_core() has displayed cpu core information only if the number of threads per a whole cores is strictly larger than 1. But this condition doesn't care about the number of sockets. This doesn't cover, for example, the system with two logical cpus consisting of two sockets and a single core on each socket.
However, this information is useful even if there's only 1 thread. So, how to fix it here is to simply remove the condition, instead of fixing the condition.
Signed-off-by HATAYAMA Daisuke <[email protected]>
--- arch/x86/kernel/cpu/proc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
arch/x86/kernel/cpu/proc.c +6 -9
@@ -11,15 +11,12 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c, unsigned int cpu) {#ifdef CONFIG_SMP -if (c->x86_max_cores * smp_num_siblings >1 ) { -seq_printf (m,"physical id\t: %d\n" , c->phys_proc_id); -seq_printf (m,"siblings\t: %d\n" , -cpumask_weight (cpu_core_mask (cpu))); -seq_printf (m,"core id\t\t: %d\n" , c->cpu_core_id); -seq_printf (m,"cpu cores\t: %d\n" , c->booted_cores); -seq_printf (m,"apicid\t\t: %d\n" , c->apicid); -seq_printf (m,"initial apicid\t: %d\n" , c->initial_apicid); - } +seq_printf (m,"physical id\t: %d\n" , c->phys_proc_id); +seq_printf (m,"siblings\t: %d\n" ,cpumask_weight (cpu_core_mask (cpu))); +seq_printf (m,"core id\t\t: %d\n" , c->cpu_core_id); +seq_printf (m,"cpu cores\t: %d\n" , c->booted_cores); +seq_printf (m,"apicid\t\t: %d\n" , c->apicid); +seq_printf (m,"initial apicid\t: %d\n" , c->initial_apicid);#endif }
Signature · 1 line
1.8.3.1