summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-14 15:07:52 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-05-14 15:07:52 +0900
commit9a7b7739f9dba4014fc93531e4c2b6efac41b0a7 (patch)
tree8f9f69de41c2b46f3c1e174e4b0676ca9f53dece /arch/sh/mm
parent5a1dc78a38bfb04159a08cd493e5b3d844939e6c (diff)
downloadblackbird-op-linux-9a7b7739f9dba4014fc93531e4c2b6efac41b0a7.tar.gz
blackbird-op-linux-9a7b7739f9dba4014fc93531e4c2b6efac41b0a7.zip
sh64: Utilize thread fault code encoding.
This plugs in fault code encoding for the sh64 page fault, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/tlbflush_64.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/sh/mm/tlbflush_64.c b/arch/sh/mm/tlbflush_64.c
index be01f92f8c89..99c5833036be 100644
--- a/arch/sh/mm/tlbflush_64.c
+++ b/arch/sh/mm/tlbflush_64.c
@@ -61,15 +61,17 @@ static pte_t *lookup_pte(struct mm_struct *mm, unsigned long address)
* and the problem, and then passes it off to one of the appropriate
* routines.
*/
-asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long textaccess, unsigned long address)
+asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
+ unsigned long address)
{
struct task_struct *tsk;
struct mm_struct *mm;
struct vm_area_struct * vma;
const struct exception_table_entry *fixup;
+ int write = error_code & FAULT_CODE_WRITE;
+ int textaccess = error_code & FAULT_CODE_ITLB;
unsigned int flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
- (writeaccess ? FAULT_FLAG_WRITE : 0));
+ (write ? FAULT_FLAG_WRITE : 0));
pte_t *pte;
int fault;
@@ -122,7 +124,7 @@ good_area:
if (!(vma->vm_flags & VM_EXEC))
goto bad_area;
} else {
- if (writeaccess) {
+ if (write) {
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
} else {
@@ -239,7 +241,7 @@ no_context:
printk(KERN_ALERT "Unable to handle kernel paging request");
printk(" at virtual address %08lx\n", address);
printk(KERN_ALERT "pc = %08Lx%08Lx\n", regs->pc >> 32, regs->pc & 0xffffffff);
- die("Oops", regs, writeaccess);
+ die("Oops", regs, error_code);
do_exit(SIGKILL);
/*
OpenPOWER on IntegriCloud