diff options
author | Andy Isaacson <adi@hexapodia.org> | 2009-12-08 03:29:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-09 04:17:58 -0500 |
commit | 814e2c84a722c45650a9b8f52285d7ba6874f63b (patch) | |
tree | ed7ef55b98c0b87e5fa714ca2d138f4469cc9ea3 /arch/x86/kernel/process.c | |
parent | f58e1f53de52a70391b6478617311207c7203363 (diff) |
x86: Factor duplicated code out of __show_regs() into show_regs_common()
Unify x86_32 and x86_64 implementations of __show_regs() header,
standardizing on the x86_64 format string in the process. Also,
32-bit will now call print_modules.
Signed-off-by: Andy Isaacson <adi@hexapodia.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Robert Hancock <hancockrwd@gmail.com>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20091208082942.GA27174@hexapodia.org>
[ v2: resolved conflict ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 5e2ba634ea15..90cf1250a005 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
12 | #include <linux/user-return-notifier.h> | 12 | #include <linux/user-return-notifier.h> |
13 | #include <linux/dmi.h> | ||
14 | #include <linux/utsname.h> | ||
13 | #include <trace/events/power.h> | 15 | #include <trace/events/power.h> |
14 | #include <linux/hw_breakpoint.h> | 16 | #include <linux/hw_breakpoint.h> |
15 | #include <asm/system.h> | 17 | #include <asm/system.h> |
@@ -90,6 +92,22 @@ void exit_thread(void) | |||
90 | } | 92 | } |
91 | } | 93 | } |
92 | 94 | ||
95 | void show_regs_common(void) | ||
96 | { | ||
97 | const char *board; | ||
98 | |||
99 | board = dmi_get_system_info(DMI_PRODUCT_NAME); | ||
100 | if (!board) | ||
101 | board = ""; | ||
102 | |||
103 | printk("\n"); | ||
104 | printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n", | ||
105 | current->pid, current->comm, print_tainted(), | ||
106 | init_utsname()->release, | ||
107 | (int)strcspn(init_utsname()->version, " "), | ||
108 | init_utsname()->version, board); | ||
109 | } | ||
110 | |||
93 | void flush_thread(void) | 111 | void flush_thread(void) |
94 | { | 112 | { |
95 | struct task_struct *tsk = current; | 113 | struct task_struct *tsk = current; |