1
2
3
4
5
6
7
8
9
10#include <linux/signal.h>
11#include <linux/sched.h>
12#include <linux/kernel.h>
13#include <linux/errno.h>
14#include <linux/string.h>
15#include <linux/types.h>
16#include <linux/ptrace.h>
17#include <linux/mman.h>
18#include <linux/mm.h>
19#include <linux/smp.h>
20#include <linux/interrupt.h>
21#include <linux/init.h>
22#include <linux/vt_kern.h>
23
24#include <asm/m32r.h>
25#include <asm/uaccess.h>
26#include <asm/pgalloc.h>
27#include <asm/pgtable.h>
28#include <asm/hardirq.h>
29#include <asm/mmu_context.h>
30
31extern void die(const char *, struct pt_regs *, long);
32
33#ifndef CONFIG_SMP
34asmlinkage unsigned int tlb_entry_i_dat;
35asmlinkage unsigned int tlb_entry_d_dat;
36#define tlb_entry_i tlb_entry_i_dat
37#define tlb_entry_d tlb_entry_d_dat
38#else
39unsigned int tlb_entry_i_dat[NR_CPUS];
40unsigned int tlb_entry_d_dat[NR_CPUS];
41#define tlb_entry_i tlb_entry_i_dat[smp_processor_id()]
42#define tlb_entry_d tlb_entry_d_dat[smp_processor_id()]
43#endif
44
45void do_BUG(const char *file, int line)
46{
47 bust_spinlocks(1);
48 printk("kernel BUG at %s:%d!\n", file, line);
49}
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
70 unsigned long address)
71{
72
73
74
75
76
77
78 bust_spinlocks(1);
79
80 if (address < PAGE_SIZE)
81 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
82 else
83 printk(KERN_ALERT "Unable to handle kernel paging request");
84 printk(" at virtual address %08lx\n",address);
85 printk(" printing bpc:\n");
86 printk(KERN_ALERT "bpc = %08lx\n", regs->bpc);
87
88 die("Oops", regs, error_code);
89 bust_spinlocks(0);
90 do_exit(SIGKILL);
91}
92
93
94
95
96void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr,
97 pte_t *ptep)
98{
99 BUG();
100}
101
102
103
104
105void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
106{
107 BUG();
108}
109
110
111
112
113void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
114 unsigned long end)
115{
116 BUG();
117}
118
119
120
121
122void local_flush_tlb_mm(struct mm_struct *mm)
123{
124 BUG();
125}
126
127
128
129
130void local_flush_tlb_all(void)
131{
132 BUG();
133}
134