Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 160814
b: refs/heads/master
c: 09529f7
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas committed Jul 24, 2009
1 parent e72e76c commit 884c0ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16c79651a5ee1ad7e4fca65a7c5309dfca89ed28
refs/heads/master: 09529f7a1a010cc364267fc5895a71c3853eb82c
22 changes: 22 additions & 0 deletions trunk/arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "fault.h"

#ifdef CONFIG_MMU

#ifdef CONFIG_KPROBES
static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
Expand Down Expand Up @@ -97,6 +98,10 @@ void show_pte(struct mm_struct *mm, unsigned long addr)

printk("\n");
}
#else /* CONFIG_MMU */
void show_pte(struct mm_struct *mm, unsigned long addr)
{ }
#endif /* CONFIG_MMU */

/*
* Oops. The kernel tried to access some page that wasn't present.
Expand Down Expand Up @@ -171,6 +176,7 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
__do_kernel_fault(mm, addr, fsr, regs);
}

#ifdef CONFIG_MMU
#define VM_FAULT_BADMAP 0x010000
#define VM_FAULT_BADACCESS 0x020000

Expand Down Expand Up @@ -322,6 +328,13 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
__do_kernel_fault(mm, addr, fsr, regs);
return 0;
}
#else /* CONFIG_MMU */
static int
do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
{
return 0;
}
#endif /* CONFIG_MMU */

/*
* First Level Translation Fault Handler
Expand All @@ -340,6 +353,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
* interrupt or a critical region, and should only copy the information
* from the master page table, nothing more.
*/
#ifdef CONFIG_MMU
static int __kprobes
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
Expand Down Expand Up @@ -378,6 +392,14 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
do_bad_area(addr, fsr, regs);
return 0;
}
#else /* CONFIG_MMU */
static int
do_translation_fault(unsigned long addr, unsigned int fsr,
struct pt_regs *regs)
{
return 0;
}
#endif /* CONFIG_MMU */

/*
* Some section permission faults need to be handled gracefully.
Expand Down

0 comments on commit 884c0ef

Please sign in to comment.