Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305403
b: refs/heads/master
c: 393a86a
h: refs/heads/master
i:
  305401: f586887
  305399: 74ff1bb
v: v3
  • Loading branch information
Kautuk Consul authored and Richard Kuo committed May 22, 2012
1 parent b44d29b commit 833d206
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 222c547ee7155045dc20c26d39191b0e9b49f6a8
refs/heads/master: 393a86af71b5bc6b11eac8e1594fb8be4c2ce84c
22 changes: 17 additions & 5 deletions trunk/arch/hexagon/mm/vm_fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
int si_code = SEGV_MAPERR;
int fault;
const struct exception_table_entry *fixup;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
(cause > 0 ? FAULT_FLAG_WRITE : 0);

/*
* If we're in an interrupt or have no user context,
Expand All @@ -63,6 +65,7 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)

local_irq_enable();

retry:
down_read(&mm->mmap_sem);
vma = find_vma(mm, address);
if (!vma)
Expand Down Expand Up @@ -96,14 +99,23 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
break;
}

fault = handle_mm_fault(mm, vma, address, (cause > 0));
fault = handle_mm_fault(mm, vma, address, flags);

if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
return;

/* The most common case -- we are done. */
if (likely(!(fault & VM_FAULT_ERROR))) {
if (fault & VM_FAULT_MAJOR)
current->maj_flt++;
else
current->min_flt++;
if (flags & FAULT_FLAG_ALLOW_RETRY) {
if (fault & VM_FAULT_MAJOR)
current->maj_flt++;
else
current->min_flt++;
if (fault & VM_FAULT_RETRY) {
flags &= ~FAULT_FLAG_ALLOW_RETRY;
goto retry;
}
}

up_read(&mm->mmap_sem);
return;
Expand Down

0 comments on commit 833d206

Please sign in to comment.