public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: print DMI information in the oops trace
@ 2008-09-16 18:27 Arjan van de Ven
  2008-09-17  9:53 ` Ingo Molnar
  2008-09-17 18:13 ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 3+ messages in thread
From: Arjan van de Ven @ 2008-09-16 18:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx



From: Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] x86: print DMI information in the oops trace

in order to diagnose hard system specific issues, it's useful to
have the system name in the oops (as provided by DMI)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 arch/x86/kernel/process_32.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 4eb2159..d9f34cf 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -37,6 +37,7 @@
 #include <linux/tick.h>
 #include <linux/percpu.h>
 #include <linux/prctl.h>
+#include <linux/dmi.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -127,6 +128,7 @@ void __show_regs(struct pt_regs *regs, int all)
 	unsigned long d0, d1, d2, d3, d6, d7;
 	unsigned long sp;
 	unsigned short ss, gs;
+	const char *board;
 
 	if (user_mode_vm(regs)) {
 		sp = regs->sp;
@@ -139,11 +141,15 @@ void __show_regs(struct pt_regs *regs, int all)
 	}
 
 	printk("\n");
-	printk("Pid: %d, comm: %s %s (%s %.*s)\n",
+
+	board = dmi_get_system_info(DMI_PRODUCT_NAME);
+	if (!board)
+		board = "";
+	printk("Pid: %d, comm: %s %s (%s %.*s) %s\n",
 			task_pid_nr(current), current->comm,
 			print_tainted(), init_utsname()->release,
 			(int)strcspn(init_utsname()->version, " "),
-			init_utsname()->version);
+			init_utsname()->version, board);
 
 	printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n",
 			(u16)regs->cs, regs->ip, regs->flags,
-- 
1.5.5.1


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: print DMI information in the oops trace
  2008-09-16 18:27 [PATCH] x86: print DMI information in the oops trace Arjan van de Ven
@ 2008-09-17  9:53 ` Ingo Molnar
  2008-09-17 18:13 ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-09-17  9:53 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel, tglx


* Arjan van de Ven <arjan@infradead.org> wrote:

> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: [PATCH] x86: print DMI information in the oops trace
> 
> in order to diagnose hard system specific issues, it's useful to
> have the system name in the oops (as provided by DMI)
> 
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

good idea - applied to tip/x86/debug, thanks Arjan.

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: print DMI information in the oops trace
  2008-09-16 18:27 [PATCH] x86: print DMI information in the oops trace Arjan van de Ven
  2008-09-17  9:53 ` Ingo Molnar
@ 2008-09-17 18:13 ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2008-09-17 18:13 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel, tglx

Arjan van de Ven wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: [PATCH] x86: print DMI information in the oops trace
>
> in order to diagnose hard system specific issues, it's useful to
> have the system name in the oops (as provided by DMI)
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> ---
>  arch/x86/kernel/process_32.c |   10 ++++++++--
>   

Not on 64-bit too?

    J

>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
> index 4eb2159..d9f34cf 100644
> --- a/arch/x86/kernel/process_32.c
> +++ b/arch/x86/kernel/process_32.c
> @@ -37,6 +37,7 @@
>  #include <linux/tick.h>
>  #include <linux/percpu.h>
>  #include <linux/prctl.h>
> +#include <linux/dmi.h>
>  
>  #include <asm/uaccess.h>
>  #include <asm/pgtable.h>
> @@ -127,6 +128,7 @@ void __show_regs(struct pt_regs *regs, int all)
>  	unsigned long d0, d1, d2, d3, d6, d7;
>  	unsigned long sp;
>  	unsigned short ss, gs;
> +	const char *board;
>  
>  	if (user_mode_vm(regs)) {
>  		sp = regs->sp;
> @@ -139,11 +141,15 @@ void __show_regs(struct pt_regs *regs, int all)
>  	}
>  
>  	printk("\n");
> -	printk("Pid: %d, comm: %s %s (%s %.*s)\n",
> +
> +	board = dmi_get_system_info(DMI_PRODUCT_NAME);
> +	if (!board)
> +		board = "";
> +	printk("Pid: %d, comm: %s %s (%s %.*s) %s\n",
>  			task_pid_nr(current), current->comm,
>  			print_tainted(), init_utsname()->release,
>  			(int)strcspn(init_utsname()->version, " "),
> -			init_utsname()->version);
> +			init_utsname()->version, board);
>  
>  	printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n",
>  			(u16)regs->cs, regs->ip, regs->flags,
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-17 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 18:27 [PATCH] x86: print DMI information in the oops trace Arjan van de Ven
2008-09-17  9:53 ` Ingo Molnar
2008-09-17 18:13 ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox