diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-11-02 19:59:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-03 10:50:22 -0500 |
commit | a489ca355efaf9efa4990b0f8f30ab650a206273 (patch) | |
tree | 15318e174eadd72811d2053f5548f83e55f362d9 | |
parent | 1836d95928a0f41ada0cbb2a6c4e46b027db9491 (diff) |
x86: Make sure we also print a Code: line for show_regs()
show_regs() is called as a mini BUG() equivalent in some places,
specifically for the "scheduling while atomic" case.
Unfortunately right now it does not print a Code: line unlike
a real bug/oops.
This patch changes the x86 implementation of show_regs() so that
it calls the same function as oopses do to print the registers
as well as the Code: line.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20091102165915.4a980fc0@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/process_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 4cf79567cdab..e658331edb6d 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -187,7 +187,7 @@ void __show_regs(struct pt_regs *regs, int all) | |||
187 | 187 | ||
188 | void show_regs(struct pt_regs *regs) | 188 | void show_regs(struct pt_regs *regs) |
189 | { | 189 | { |
190 | __show_regs(regs, 1); | 190 | show_registers(regs); |
191 | show_trace(NULL, regs, ®s->sp, regs->bp); | 191 | show_trace(NULL, regs, ®s->sp, regs->bp); |
192 | } | 192 | } |
193 | 193 | ||
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index ad535b683170..2386999bfcd2 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -226,8 +226,7 @@ void __show_regs(struct pt_regs *regs, int all) | |||
226 | 226 | ||
227 | void show_regs(struct pt_regs *regs) | 227 | void show_regs(struct pt_regs *regs) |
228 | { | 228 | { |
229 | printk(KERN_INFO "CPU %d:", smp_processor_id()); | 229 | show_registers(regs); |
230 | __show_regs(regs, 1); | ||
231 | show_trace(NULL, regs, (void *)(regs + 1), regs->bp); | 230 | show_trace(NULL, regs, (void *)(regs + 1), regs->bp); |
232 | } | 231 | } |
233 | 232 | ||