diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 07:02:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 07:02:26 -0400 |
commit | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (patch) | |
tree | d827bca3fc825a0ac33efbcd493713be40fcc812 /arch/arm/mm/fault.c | |
parent | cf7a2b4fb6a9b86779930a0a123b0df41aa9208f (diff) | |
parent | f17a1f06d2fa93f4825be572622eb02c4894db4e (diff) |
Merge branch 'devel-stable' into devel
Conflicts:
MAINTAINERS
arch/arm/mm/fault.c
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r-- | arch/arm/mm/fault.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 5fa8dea5a371..cc8829d7e116 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/page-flags.h> | 18 | #include <linux/page-flags.h> |
19 | #include <linux/sched.h> | ||
19 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
20 | 21 | ||
21 | #include <asm/system.h> | 22 | #include <asm/system.h> |
@@ -24,6 +25,7 @@ | |||
24 | 25 | ||
25 | #include "fault.h" | 26 | #include "fault.h" |
26 | 27 | ||
28 | #ifdef CONFIG_MMU | ||
27 | 29 | ||
28 | #ifdef CONFIG_KPROBES | 30 | #ifdef CONFIG_KPROBES |
29 | static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr) | 31 | static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr) |
@@ -98,6 +100,10 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
98 | 100 | ||
99 | printk("\n"); | 101 | printk("\n"); |
100 | } | 102 | } |
103 | #else /* CONFIG_MMU */ | ||
104 | void show_pte(struct mm_struct *mm, unsigned long addr) | ||
105 | { } | ||
106 | #endif /* CONFIG_MMU */ | ||
101 | 107 | ||
102 | /* | 108 | /* |
103 | * Oops. The kernel tried to access some page that wasn't present. | 109 | * Oops. The kernel tried to access some page that wasn't present. |
@@ -172,6 +178,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
172 | __do_kernel_fault(mm, addr, fsr, regs); | 178 | __do_kernel_fault(mm, addr, fsr, regs); |
173 | } | 179 | } |
174 | 180 | ||
181 | #ifdef CONFIG_MMU | ||
175 | #define VM_FAULT_BADMAP 0x010000 | 182 | #define VM_FAULT_BADMAP 0x010000 |
176 | #define VM_FAULT_BADACCESS 0x020000 | 183 | #define VM_FAULT_BADACCESS 0x020000 |
177 | 184 | ||
@@ -323,6 +330,13 @@ no_context: | |||
323 | __do_kernel_fault(mm, addr, fsr, regs); | 330 | __do_kernel_fault(mm, addr, fsr, regs); |
324 | return 0; | 331 | return 0; |
325 | } | 332 | } |
333 | #else /* CONFIG_MMU */ | ||
334 | static int | ||
335 | do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
336 | { | ||
337 | return 0; | ||
338 | } | ||
339 | #endif /* CONFIG_MMU */ | ||
326 | 340 | ||
327 | /* | 341 | /* |
328 | * First Level Translation Fault Handler | 342 | * First Level Translation Fault Handler |
@@ -341,6 +355,7 @@ no_context: | |||
341 | * interrupt or a critical region, and should only copy the information | 355 | * interrupt or a critical region, and should only copy the information |
342 | * from the master page table, nothing more. | 356 | * from the master page table, nothing more. |
343 | */ | 357 | */ |
358 | #ifdef CONFIG_MMU | ||
344 | static int __kprobes | 359 | static int __kprobes |
345 | do_translation_fault(unsigned long addr, unsigned int fsr, | 360 | do_translation_fault(unsigned long addr, unsigned int fsr, |
346 | struct pt_regs *regs) | 361 | struct pt_regs *regs) |
@@ -379,6 +394,14 @@ bad_area: | |||
379 | do_bad_area(addr, fsr, regs); | 394 | do_bad_area(addr, fsr, regs); |
380 | return 0; | 395 | return 0; |
381 | } | 396 | } |
397 | #else /* CONFIG_MMU */ | ||
398 | static int | ||
399 | do_translation_fault(unsigned long addr, unsigned int fsr, | ||
400 | struct pt_regs *regs) | ||
401 | { | ||
402 | return 0; | ||
403 | } | ||
404 | #endif /* CONFIG_MMU */ | ||
382 | 405 | ||
383 | /* | 406 | /* |
384 | * Some section permission faults need to be handled gracefully. | 407 | * Some section permission faults need to be handled gracefully. |