]> err.no Git - linux-2.6/commitdiff
[PATCH] x86_64: print processor number in show_regs
authorZwane Mwaikambo <zwane@arm.linux.org.uk>
Tue, 6 Sep 2005 22:16:16 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:15 +0000 (16:57 -0700)
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>
arch/x86_64/kernel/process.c

index 7577f9d7a75d8373f1a79be83c4e30c63b867f19..8661f82ac70b409d96a70b31b84ad87c485fbd30 100644 (file)
@@ -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);
 }