Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[PATCH] x86: Make sure we also print a Code: line for show..

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  Accepted qrq 0.1.4-3 (source i386)  
Author Message
Arjan van de Ven

External


Since: May 26, 2007
Posts: 535



(Msg. 1) Posted: Mon Nov 02, 2009 7:20 pm
Post subject: [PATCH] x86: Make sure we also print a Code: line for show_regs()
Archived from groups: linux>kernel (more info?)

From c560acdd03d28d3dc55ed9c19d42d4567caab1d8 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan.DeleteThis@linux.intel.com>
Date: Mon, 2 Nov 2009 16:50:04 -0800
Subject: [PATCH] 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: like 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.DeleteThis@linux.intel.com>
---
arch/x86/kernel/process_32.c | 2 +-
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 f2cb086..b124f2f 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -189,7 +189,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);
}

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 959b062..e53e66f 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -228,8 +228,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);
}

--
1.6.0.6



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Américo

External


Since: Nov 18, 2008
Posts: 29



(Msg. 2) Posted: Mon Nov 02, 2009 9:20 pm
Post subject: Re: [PATCH] x86: Make sure we also print a Code: line for show_regs() [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, Nov 02, 2009 at 04:59:15PM -0800, Arjan van de Ven wrote:
>From c560acdd03d28d3dc55ed9c19d42d4567caab1d8 Mon Sep 17 00:00:00 2001
>From: Arjan van de Ven <arjan.TakeThisOut@linux.intel.com>
>Date: Mon, 2 Nov 2009 16:50:04 -0800
>Subject: [PATCH] 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: like 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.TakeThisOut@linux.intel.com>

Reviewed-by: WANG Cong <xiyou.wangcong.TakeThisOut@gmail.com>

>---
> arch/x86/kernel/process_32.c | 2 +-
> 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 f2cb086..b124f2f 100644
>--- a/arch/x86/kernel/process_32.c
>+++ b/arch/x86/kernel/process_32.c
>@@ -189,7 +189,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);
> }
>
>diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
>index 959b062..e53e66f 100644
>--- a/arch/x86/kernel/process_64.c
>+++ b/arch/x86/kernel/process_64.c
>@@ -228,8 +228,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);
> }
>
>--
>1.6.0.6
>
>
>
>--
>Arjan van de Ven Intel Open Source Technology Centre
>For development, discussion and tips for power savings,
>visit http://www.lesswatts.org
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo.TakeThisOut@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/

--
Live like a child, think like the god.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
tip-bot for Arjan van de

External


Since: Nov 03, 2009
Posts: 1



(Msg. 3) Posted: Tue Nov 03, 2009 11:20 am
Post subject: [tip:x86/debug] x86: Make sure we also print a Code: line for show_regs() [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Commit-ID: a489ca355efaf9efa4990b0f8f30ab650a206273
Gitweb: http://git.kernel.org/tip/a489ca355efaf9efa4990b0f8f30ab650a206273
Author: Arjan van de Ven <arjan.RemoveThis@linux.intel.com>
AuthorDate: Mon, 2 Nov 2009 16:59:15 -0800
Committer: Ingo Molnar <mingo.RemoveThis@elte.hu>
CommitDate: Tue, 3 Nov 2009 16:50:22 +0100

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.RemoveThis@linux.intel.com>
LKML-Reference: <20091102165915.4a980fc0.RemoveThis@infradead.org>
Signed-off-by: Ingo Molnar <mingo.RemoveThis@elte.hu>
---
arch/x86/kernel/process_32.c | 2 +-
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 4cf7956..e658331 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)

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

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index ad535b6..2386999 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)

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);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[PATCH] Always print out the header line in /proc/swaps - It would be possible for /proc/swaps to not always print out the header: swapon /dev/hdc2 swapon /dev/hde2 swapoff..

[PATCH] `make help' in build tree doesn't show headers_* t.. - `make help' in the build tree doesn't show the help texts about the `headers_install' and `headers_check' targets..

[PATCH] Make i386 kernel show the unhandled signals - Hello, This patch makes the i386 behave the same way that x86_64 does when a segfault happens. A line gets printed to..

[PATCH 0/6] driver edac code tidying fixes-2nd submission .. - From: Douglas Thompson <dougthompson@xmission.com> This set of 6 patches for EDAC fix some code style issues, ty...

[PATCH] Make i386 kernel show the segfaults in kernel dmes.. - Hello, This patch makes the i386 behave the same way that x86_64 does when a segfault happens. A line gets printed to..

[2.6 patch] mm/slub.c: make code static - This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk <bunk@stusta.de> --- mm/slub....
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]