git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull cpuidle into release branch
[pandora-kernel.git]
/
arch
/
alpha
/
mm
/
fault.c
diff --git
a/arch/alpha/mm/fault.c
b/arch/alpha/mm/fault.c
index
8aa9db8
..
4829f96
100644
(file)
--- a/
arch/alpha/mm/fault.c
+++ b/
arch/alpha/mm/fault.c
@@
-21,7
+21,6
@@
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/smp.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/smp.h>
-#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/module.h>
@@
-149,21
+148,17
@@
do_page_fault(unsigned long address, unsigned long mmcsr,
the fault. */
fault = handle_mm_fault(mm, vma, address, cause > 0);
up_read(&mm->mmap_sem);
the fault. */
fault = handle_mm_fault(mm, vma, address, cause > 0);
up_read(&mm->mmap_sem);
-
- switch (fault) {
- case VM_FAULT_MINOR:
- current->min_flt++;
- break;
- case VM_FAULT_MAJOR:
- current->maj_flt++;
- break;
- case VM_FAULT_SIGBUS:
- goto do_sigbus;
- case VM_FAULT_OOM:
- goto out_of_memory;
- default:
+ if (unlikely(fault & VM_FAULT_ERROR)) {
+ if (fault & VM_FAULT_OOM)
+ goto out_of_memory;
+ else if (fault & VM_FAULT_SIGBUS)
+ goto do_sigbus;
BUG();
}
BUG();
}
+ if (fault & VM_FAULT_MAJOR)
+ current->maj_flt++;
+ else
+ current->min_flt++;
return;
/* Something tried to access memory that isn't in our memory map.
return;
/* Something tried to access memory that isn't in our memory map.
@@
-193,16
+188,16
@@
do_page_fault(unsigned long address, unsigned long mmcsr,
/* We ran out of memory, or some other thing happened to us that
made us unable to handle the page fault gracefully. */
out_of_memory:
/* We ran out of memory, or some other thing happened to us that
made us unable to handle the page fault gracefully. */
out_of_memory:
- if (is_init(current)) {
+ if (is_
global_
init(current)) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk(KERN_ALERT "VM: killing process %s(%d)\n",
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk(KERN_ALERT "VM: killing process %s(%d)\n",
- current->comm,
current->pid
);
+ current->comm,
task_pid_nr(current)
);
if (!user_mode(regs))
goto no_context;
if (!user_mode(regs))
goto no_context;
- do_exit(SIGKILL);
+ do_
group_
exit(SIGKILL);
do_sigbus:
/* Send a sigbus, regardless of whether we were in kernel
do_sigbus:
/* Send a sigbus, regardless of whether we were in kernel