aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/fault_64.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-01-30 13:34:10 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:34:10 +0100
commitb3279c7fd7acf807ab8395d16658514e8c222a37 (patch)
tree2ce674dc4a99ca594c7e1a40da3db1545bc8731c /arch/x86/mm/fault_64.c
parent35f3266ffbee7ff8ca0474dc8dfa3b73d5a1d1ef (diff)
x86: introduce show_fault_oops helper to fault_32|64.c
This will help when unifying the oops dumping code on 32/64 bit. No functional changes. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/fault_64.c')
-rw-r--r--arch/x86/mm/fault_64.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c
index ccbb8e30d9f..1897704dad4 100644
--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -293,6 +293,18 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
return 0;
}
+static void show_fault_oops(struct pt_regs *regs, unsigned long error_code,
+ unsigned long address)
+{
+ if (address < PAGE_SIZE)
+ printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
+ else
+ printk(KERN_ALERT "Unable to handle kernel paging request");
+ printk(" at %016lx RIP: \n" KERN_ALERT, address);
+ printk_address(regs->ip, 1);
+ dump_pagetable(address);
+}
+
static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
unsigned long error_code)
{
@@ -636,13 +648,8 @@ no_context:
flags = oops_begin();
- if (address < PAGE_SIZE)
- printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
- else
- printk(KERN_ALERT "Unable to handle kernel paging request");
- printk(" at %016lx RIP: \n" KERN_ALERT, address);
- printk_address(regs->ip, 1);
- dump_pagetable(address);
+ show_fault_oops(regs, error_code, address);
+
tsk->thread.cr2 = address;
tsk->thread.trap_no = 14;
tsk->thread.error_code = error_code;