aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/mm/fault-nommu.c47
1 files changed, 15 insertions, 32 deletions
diff --git a/arch/sh/mm/fault-nommu.c b/arch/sh/mm/fault-nommu.c
index 923cb456819b..c6f5b51ec2c7 100644
--- a/arch/sh/mm/fault-nommu.c
+++ b/arch/sh/mm/fault-nommu.c
@@ -1,47 +1,33 @@
1/* 1/*
2 * arch/sh/mm/fault-nommu.c 2 * arch/sh/mm/fault-nommu.c
3 * 3 *
4 * Copyright (C) 2002 Paul Mundt 4 * Copyright (C) 2002 - 2007 Paul Mundt
5 * 5 *
6 * Based on linux/arch/sh/mm/fault.c: 6 * Based on linux/arch/sh/mm/fault.c:
7 * Copyright (C) 1999 Niibe Yutaka 7 * Copyright (C) 1999 Niibe Yutaka
8 * 8 *
9 * Released under the terms of the GNU GPL v2.0. 9 * Released under the terms of the GNU GPL v2.0.
10 */ 10 */
11
12#include <linux/signal.h>
13#include <linux/sched.h>
14#include <linux/kernel.h> 11#include <linux/kernel.h>
15#include <linux/errno.h>
16#include <linux/string.h>
17#include <linux/types.h>
18#include <linux/ptrace.h>
19#include <linux/mman.h>
20#include <linux/mm.h> 12#include <linux/mm.h>
21#include <linux/smp.h> 13#include <linux/hardirq.h>
22#include <linux/interrupt.h> 14#include <linux/kprobes.h>
23
24#include <asm/system.h> 15#include <asm/system.h>
25#include <asm/io.h> 16#include <asm/ptrace.h>
26#include <asm/uaccess.h>
27#include <asm/pgalloc.h>
28#include <asm/mmu_context.h>
29#include <asm/cacheflush.h>
30
31#if defined(CONFIG_SH_KGDB)
32#include <asm/kgdb.h> 17#include <asm/kgdb.h>
33#endif
34
35extern void die(const char *,struct pt_regs *,long);
36 18
37/* 19/*
38 * This routine handles page faults. It determines the address, 20 * This routine handles page faults. It determines the address,
39 * and the problem, and then passes it off to one of the appropriate 21 * and the problem, and then passes it off to one of the appropriate
40 * routines. 22 * routines.
41 */ 23 */
42asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, 24asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
43 unsigned long address) 25 unsigned long writeaccess,
26 unsigned long address)
44{ 27{
28 trace_hardirqs_on();
29 local_irq_enable();
30
45#if defined(CONFIG_SH_KGDB) 31#if defined(CONFIG_SH_KGDB)
46 if (kgdb_nofault && kgdb_bus_err_hook) 32 if (kgdb_nofault && kgdb_bus_err_hook)
47 kgdb_bus_err_hook(); 33 kgdb_bus_err_hook();
@@ -65,17 +51,14 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
65 do_exit(SIGKILL); 51 do_exit(SIGKILL);
66} 52}
67 53
68asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess, 54asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
69 unsigned long address) 55 unsigned long writeaccess,
56 unsigned long address)
70{ 57{
71#if defined(CONFIG_SH_KGDB) 58#if defined(CONFIG_SH_KGDB)
72 if (kgdb_nofault && kgdb_bus_err_hook) 59 if (kgdb_nofault && kgdb_bus_err_hook)
73 kgdb_bus_err_hook(); 60 kgdb_bus_err_hook();
74#endif 61#endif
75 62
76 if (address >= TASK_SIZE) 63 return (address >= TASK_SIZE);
77 return 1;
78
79 return 0;
80} 64}
81