Skip to content

Commit

Permalink
[PATCH] x86_64: print processor number in show_regs
Browse files Browse the repository at this point in the history
Up to date I've been using the GS value to determine the processor number
in dumps from show_regs, however this can be cumbersome to do if you don't
have the vmlinux to verify with the address of cpu_pda, how about the
following?  I considered using hard_smp_processor_id for robustness but we
already dereference current so we're already relying on MSR_GS_BASE being
sane.

Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Zwane Mwaikambo authored and Linus Torvalds committed Sep 7, 2005
1 parent 54d5d42 commit c078d32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86_64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ void __show_regs(struct pt_regs * regs)

void show_regs(struct pt_regs *regs)
{
printk("CPU %d:", smp_processor_id());
__show_regs(regs);
show_trace(&regs->rsp);
}
Expand Down

0 comments on commit c078d32

Please sign in to comment.