diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-04-10 23:53:06 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-04-10 23:53:06 -0400 |
commit | ba2a3cdf76c32861c95e9a226b75dbecaec99469 (patch) | |
tree | 76112d823b533b0c573f1e8ab11bb2e06dd902ab /arch | |
parent | a1e2030122d4c2605089e60dce28d2fcf9c3ef98 (diff) |
sh64: Kill off dead page fault debug cruft.
In the future we'll be unifying some of the 32/64 page fault path, so
start to tidy up the _64 one by killing off some of the unused debug
cruft.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/mm/tlbflush_64.c | 74 |
1 files changed, 5 insertions, 69 deletions
diff --git a/arch/sh/mm/tlbflush_64.c b/arch/sh/mm/tlbflush_64.c index 70b3c271aa9f..605dc65dc66d 100644 --- a/arch/sh/mm/tlbflush_64.c +++ b/arch/sh/mm/tlbflush_64.c | |||
@@ -28,33 +28,6 @@ | |||
28 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
29 | #include <asm/mmu_context.h> | 29 | #include <asm/mmu_context.h> |
30 | 30 | ||
31 | extern void die(const char *,struct pt_regs *,long); | ||
32 | |||
33 | #define PFLAG(val,flag) (( (val) & (flag) ) ? #flag : "" ) | ||
34 | #define PPROT(flag) PFLAG(pgprot_val(prot),flag) | ||
35 | |||
36 | static inline void print_prots(pgprot_t prot) | ||
37 | { | ||
38 | printk("prot is 0x%016llx\n",pgprot_val(prot)); | ||
39 | |||
40 | printk("%s %s %s %s %s\n",PPROT(_PAGE_SHARED),PPROT(_PAGE_READ), | ||
41 | PPROT(_PAGE_EXECUTE),PPROT(_PAGE_WRITE),PPROT(_PAGE_USER)); | ||
42 | } | ||
43 | |||
44 | static inline void print_vma(struct vm_area_struct *vma) | ||
45 | { | ||
46 | printk("vma start 0x%08lx\n", vma->vm_start); | ||
47 | printk("vma end 0x%08lx\n", vma->vm_end); | ||
48 | |||
49 | print_prots(vma->vm_page_prot); | ||
50 | printk("vm_flags 0x%08lx\n", vma->vm_flags); | ||
51 | } | ||
52 | |||
53 | static inline void print_task(struct task_struct *tsk) | ||
54 | { | ||
55 | printk("Task pid %d\n", task_pid_nr(tsk)); | ||
56 | } | ||
57 | |||
58 | static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address) | 31 | static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address) |
59 | { | 32 | { |
60 | pgd_t *dir; | 33 | pgd_t *dir; |
@@ -131,43 +104,15 @@ retry: | |||
131 | down_read(&mm->mmap_sem); | 104 | down_read(&mm->mmap_sem); |
132 | 105 | ||
133 | vma = find_vma(mm, address); | 106 | vma = find_vma(mm, address); |
134 | 107 | if (!vma) | |
135 | if (!vma) { | ||
136 | #ifdef DEBUG_FAULT | ||
137 | print_task(tsk); | ||
138 | printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n", | ||
139 | __func__, __LINE__, | ||
140 | address,regs->pc,textaccess,writeaccess); | ||
141 | show_regs(regs); | ||
142 | #endif | ||
143 | goto bad_area; | 108 | goto bad_area; |
144 | } | 109 | if (vma->vm_start <= address) |
145 | if (vma->vm_start <= address) { | ||
146 | goto good_area; | 110 | goto good_area; |
147 | } | 111 | if (!(vma->vm_flags & VM_GROWSDOWN)) |
148 | |||
149 | if (!(vma->vm_flags & VM_GROWSDOWN)) { | ||
150 | #ifdef DEBUG_FAULT | ||
151 | print_task(tsk); | ||
152 | printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n", | ||
153 | __func__, __LINE__, | ||
154 | address,regs->pc,textaccess,writeaccess); | ||
155 | show_regs(regs); | ||
156 | |||
157 | print_vma(vma); | ||
158 | #endif | ||
159 | goto bad_area; | 112 | goto bad_area; |
160 | } | 113 | if (expand_stack(vma, address)) |
161 | if (expand_stack(vma, address)) { | ||
162 | #ifdef DEBUG_FAULT | ||
163 | print_task(tsk); | ||
164 | printk("%s:%d fault, address is 0x%08x PC %016Lx textaccess %d writeaccess %d\n", | ||
165 | __func__, __LINE__, | ||
166 | address,regs->pc,textaccess,writeaccess); | ||
167 | show_regs(regs); | ||
168 | #endif | ||
169 | goto bad_area; | 114 | goto bad_area; |
170 | } | 115 | |
171 | /* | 116 | /* |
172 | * Ok, we have a good vm_area for this memory access, so | 117 | * Ok, we have a good vm_area for this memory access, so |
173 | * we can handle it.. | 118 | * we can handle it.. |
@@ -251,9 +196,6 @@ no_pte: | |||
251 | * Fix it, but check if it's kernel or user first.. | 196 | * Fix it, but check if it's kernel or user first.. |
252 | */ | 197 | */ |
253 | bad_area: | 198 | bad_area: |
254 | #ifdef DEBUG_FAULT | ||
255 | printk("fault:bad area\n"); | ||
256 | #endif | ||
257 | up_read(&mm->mmap_sem); | 199 | up_read(&mm->mmap_sem); |
258 | 200 | ||
259 | if (user_mode(regs)) { | 201 | if (user_mode(regs)) { |
@@ -266,9 +208,6 @@ bad_area: | |||
266 | printk("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx\n", | 208 | printk("user mode bad_area address=%08lx pid=%d (%s) pc=%08lx\n", |
267 | address, task_pid_nr(current), current->comm, | 209 | address, task_pid_nr(current), current->comm, |
268 | (unsigned long) regs->pc); | 210 | (unsigned long) regs->pc); |
269 | #if 0 | ||
270 | show_regs(regs); | ||
271 | #endif | ||
272 | } | 211 | } |
273 | if (is_global_init(tsk)) { | 212 | if (is_global_init(tsk)) { |
274 | panic("INIT had user mode bad_area\n"); | 213 | panic("INIT had user mode bad_area\n"); |
@@ -283,9 +222,6 @@ bad_area: | |||
283 | } | 222 | } |
284 | 223 | ||
285 | no_context: | 224 | no_context: |
286 | #ifdef DEBUG_FAULT | ||
287 | printk("fault:No context\n"); | ||
288 | #endif | ||
289 | /* Are we prepared to handle this kernel fault? */ | 225 | /* Are we prepared to handle this kernel fault? */ |
290 | fixup = search_exception_tables(regs->pc); | 226 | fixup = search_exception_tables(regs->pc); |
291 | if (fixup) { | 227 | if (fixup) { |