2 * arch/sh/mm/fault-nommu.c
4 * Copyright (C) 2002 Paul Mundt
6 * Based on linux/arch/sh/mm/fault.c:
7 * Copyright (C) 1999 Niibe Yutaka
9 * Released under the terms of the GNU GPL v2.0.
12 #include <linux/signal.h>
13 #include <linux/sched.h>
14 #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>
21 #include <linux/smp.h>
22 #include <linux/interrupt.h>
24 #include <asm/system.h>
26 #include <asm/uaccess.h>
27 #include <asm/pgalloc.h>
28 #include <asm/mmu_context.h>
29 #include <asm/cacheflush.h>
31 #if defined(CONFIG_SH_KGDB)
35 extern void die(const char *,struct pt_regs
*,long);
38 * This routine handles page faults. It determines the address,
39 * and the problem, and then passes it off to one of the appropriate
42 asmlinkage
void do_page_fault(struct pt_regs
*regs
, unsigned long writeaccess
,
43 unsigned long address
)
45 #if defined(CONFIG_SH_KGDB)
46 if (kgdb_nofault
&& kgdb_bus_err_hook
)
51 * Oops. The kernel tried to access some bad page. We'll have to
52 * terminate things with extreme prejudice.
55 if (address
< PAGE_SIZE
) {
56 printk(KERN_ALERT
"Unable to handle kernel NULL pointer dereference");
58 printk(KERN_ALERT
"Unable to handle kernel paging request");
61 printk(" at virtual address %08lx\n", address
);
62 printk(KERN_ALERT
"pc = %08lx\n", regs
->pc
);
64 die("Oops", regs
, writeaccess
);
68 asmlinkage
int __do_page_fault(struct pt_regs
*regs
, unsigned long writeaccess
,
69 unsigned long address
)
71 #if defined(CONFIG_SH_KGDB)
72 if (kgdb_nofault
&& kgdb_bus_err_hook
)
76 if (address
>= TASK_SIZE
)
This page took 0.049174 seconds and 5 git commands to generate.