lkml.org 
[lkml]   [2005]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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 <zwane@arm.linux.org.uk>

Index: linux-2.6.13-rc2-mm1/arch/x86_64/kernel/process.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.13-rc2-mm1/arch/x86_64/kernel/process.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 process.c
--- linux-2.6.13-rc2-mm1/arch/x86_64/kernel/process.c 10 Jul 2005 04:38:46 -0000 1.1.1.1
+++ linux-2.6.13-rc2-mm1/arch/x86_64/kernel/process.c 15 Jul 2005 10:54:42 -0000
@@ -272,7 +272,7 @@ void __show_regs(struct pt_regs * regs)

printk("\n");
print_modules();
- printk("Pid: %d, comm: %.20s %s %s\n",
+ printk("CPU: %d Pid: %d, comm: %.20s %s %s\n", smp_processor_id(),
current->pid, current->comm, print_tainted(), system_utsname.release);
printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip);
printk_address(regs->rip);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-07-15 13:07    [W:0.024 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site