From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86_64: print processor number in show_regs
Date: Fri, 15 Jul 2005 04:56:54 -0600 (MDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0507150440280.16055@montezuma.fsmlabs.com> (raw)
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);
next reply other threads:[~2005-07-15 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 10:56 Zwane Mwaikambo [this message]
2005-07-15 11:04 ` Zwane Mwaikambo
2005-07-15 11:49 ` Andi Kleen
2005-07-15 11:58 ` Zwane Mwaikambo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0507150440280.16055@montezuma.fsmlabs.com \
--to=zwane@arm.linux.org.uk \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®