diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-07-11 14:26:35 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-09-26 09:47:07 -0400 |
commit | 6ba3c97a38803883c2eee489505796cb0a727122 (patch) | |
tree | b6400bf2e10bf8d55b63eae35ddb93f3a9e9b270 /arch/x86/mm/fault.c | |
parent | ef3f628872c838933a279d0d7e63e707783c9710 (diff) |
x86: Exception hooks for userspace RCU extended QS
Add necessary hooks to x86 exception for userspace
RCU extended quiescent state support.
This includes traps, page fault, debug exceptions, etc...
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Alessio Igor Bogani <abogani@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Gilad Ben Yossef <gilad@benyossef.com>
Cc: Hakan Akkan <hakanakkan@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Sven-Thorsten Dietrich <thebigcorporation@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 76dcd9d8e0bc..7dde46d68a25 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/pgalloc.h> /* pgd_*(), ... */ | 18 | #include <asm/pgalloc.h> /* pgd_*(), ... */ |
19 | #include <asm/kmemcheck.h> /* kmemcheck_*(), ... */ | 19 | #include <asm/kmemcheck.h> /* kmemcheck_*(), ... */ |
20 | #include <asm/fixmap.h> /* VSYSCALL_START */ | 20 | #include <asm/fixmap.h> /* VSYSCALL_START */ |
21 | #include <asm/rcu.h> /* exception_enter(), ... */ | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Page fault error code bits: | 24 | * Page fault error code bits: |
@@ -1000,8 +1001,8 @@ static int fault_in_kernel_space(unsigned long address) | |||
1000 | * and the problem, and then passes it off to one of the appropriate | 1001 | * and the problem, and then passes it off to one of the appropriate |
1001 | * routines. | 1002 | * routines. |
1002 | */ | 1003 | */ |
1003 | dotraplinkage void __kprobes | 1004 | static void __kprobes |
1004 | do_page_fault(struct pt_regs *regs, unsigned long error_code) | 1005 | __do_page_fault(struct pt_regs *regs, unsigned long error_code) |
1005 | { | 1006 | { |
1006 | struct vm_area_struct *vma; | 1007 | struct vm_area_struct *vma; |
1007 | struct task_struct *tsk; | 1008 | struct task_struct *tsk; |
@@ -1209,3 +1210,11 @@ good_area: | |||
1209 | 1210 | ||
1210 | up_read(&mm->mmap_sem); | 1211 | up_read(&mm->mmap_sem); |
1211 | } | 1212 | } |
1213 | |||
1214 | dotraplinkage void __kprobes | ||
1215 | do_page_fault(struct pt_regs *regs, unsigned long error_code) | ||
1216 | { | ||
1217 | exception_enter(regs); | ||
1218 | __do_page_fault(regs, error_code); | ||
1219 | exception_exit(regs); | ||
1220 | } | ||