Skip to content

Commit

Permalink
x86: Make sure we also print a Code: line for show_regs()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Nov 3, 2009
1 parent 1836d95 commit a489ca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void __show_regs(struct pt_regs *regs, int all)

void show_regs(struct pt_regs *regs)
{
__show_regs(regs, 1);
show_registers(regs);
show_trace(NULL, regs, &regs->sp, regs->bp);
}

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ void __show_regs(struct pt_regs *regs, int all)

void show_regs(struct pt_regs *regs)
{
printk(KERN_INFO "CPU %d:", smp_processor_id());
__show_regs(regs, 1);
show_registers(regs);
show_trace(NULL, regs, (void *)(regs + 1), regs->bp);
}

Expand Down

0 comments on commit a489ca3

Please sign in to comment.