tree 01efc52786cb88db71cf0600ef5349740ffbdfc2
parent 54d5d42404e7705cf3804593189e963350d470e5
author Zwane Mwaikambo <[EMAIL PROTECTED]> Wed, 07 Sep 2005 05:16:16 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 08 Sep 2005 06:57:15 -0700

[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

Signed-off-by: Zwane Mwaikambo <[EMAIL PROTECTED]>
Acked-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/x86_64/kernel/process.c |    1 +
 1 files changed, 1 insertion(+)

diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
--- 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());
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to