Skip to content

Commit

Permalink
x86/cpu: Prefix hexadecimal values with 0x in cpu_debug_show()
Browse files Browse the repository at this point in the history
The hex values in CPU debug interface are not prefixed with 0x. This may
cause misinterpretation of values. Fix it.

[ mingo: Restore previous vertical alignment of the output. ]

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20241211-add-cpu-type-v5-1-2ae010f50370@linux.intel.com
  • Loading branch information
Pawan Gupta authored and Ingo Molnar committed Feb 27, 2025
1 parent 976ba8d commit 4a412c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/cpu/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ static int cpu_debug_show(struct seq_file *m, void *p)
if (!c->initialized)
return 0;

seq_printf(m, "initial_apicid: %x\n", c->topo.initial_apicid);
seq_printf(m, "apicid: %x\n", c->topo.apicid);
seq_printf(m, "initial_apicid: 0x%x\n", c->topo.initial_apicid);
seq_printf(m, "apicid: 0x%x\n", c->topo.apicid);
seq_printf(m, "pkg_id: %u\n", c->topo.pkg_id);
seq_printf(m, "die_id: %u\n", c->topo.die_id);
seq_printf(m, "cu_id: %u\n", c->topo.cu_id);
Expand Down

0 comments on commit 4a412c7

Please sign in to comment.