x86_64: show apicid for cpu in proc
PATCH 1/1 x86_64: show apicid for cpu in proc
[PATCH] x86_64: show apicid for cpu in proc
arch/x86/kernel/cpu/proc.c +1 -0
@@ -59,6 +59,7 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c, cpus_weight(per_cpu(cpu_core_map, 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: %02x\n", c->apicid); }#endif }
Ingo Molnar
Appliedarch/x86/kernel/cpu/proc.c static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c, · line 62
Quoted 1 line · Yinghai Lu
arch/x86/kernel/cpu/proc.c +1
-0+seq_printf (m,"apicid\t: %02x\n" , c->apicid);
thanks, applied.
Note that the number of tabs were off and we generally print these IDs in %d, so i committed:
seq_printf(m, "apicid\t\t: %d\n", c->apicid);
Ingo
arch/x86/kernel/cpu/proc.c static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c, · line 62
Quoted 4 lines · Yinghai Lu
arch/x86/kernel/cpu/proc.c +1
-0cpus_weight(per_cpu(cpu_core_map, 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: %02x\n" , c->apicid);
Seems a little redundant with the boot log, but ok.
But it's unclear to the user which apic ID is meant by that. There are two different ones. The one in the LAPIC mapping and the one reported by CPUID. They are not necessarily the same. I think you should clarify that by renaming the field or perhaps report both.
-Andi
Quoted 6 lines · Andi Kleen
Quoted 3 lines · Yinghai Lu
cpus_weight(per_cpu(cpu_core_map, 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);
Quoted 8 lines
Quoted 1 line
+
seq_printf(m, "apicid\t: %02x\n", c->apicid);Seems a little redundant with the boot log, but ok.
But it's unclear to the user which apic ID is meant by that. There are two different ones. The one in the LAPIC mapping and the one reported by CPUID. They are not necessarily the same. I think you should clarify that by renaming the field or perhaps report both.
report the apicid and initial apicid at the same time?
but in current code, we didn't use the initial apicid...., actually initial apic id is more better to get the responding to node/core.
will look at it.
YH