From c078d3266e58a3edd698b9f143f78fc585679031 Mon Sep 17 00:00:00 2001 From: Zwane Mwaikambo Date: Tue, 6 Sep 2005 15:16:16 -0700 Subject: [PATCH] [PATCH] x86_64: print processor number in show_regs 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 Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 7577f9d..8661f82 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -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(®s->rsp); } -- 2.7.4