diff options
author | Gennady Sharapov <Gennady.V.Sharapov@intel.com> | 2006-01-08 04:01:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:39 -0500 |
commit | c66fdd5e324392584c6f11de65cfe24b0e2d9303 (patch) | |
tree | f05cb784406c0a0cb24d291e515dfcaa3e4b6464 /arch/um/kernel/trap_kern.c | |
parent | ea2ba7dc3dd3f85034e6da6abacc813d723a2ad5 (diff) |
[PATCH] uml: merge trap_user.c and trap_kern.c
The serial UML OS-abstraction layer patch (um/kernel dir).
This joins trap_user.c and trap_kernel.c files.
Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/trap_kern.c')
-rw-r--r-- | arch/um/kernel/trap_kern.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index b79f805bdc00..d56046c2aba2 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c | |||
@@ -26,6 +26,9 @@ | |||
26 | #include "mconsole_kern.h" | 26 | #include "mconsole_kern.h" |
27 | #include "mem.h" | 27 | #include "mem.h" |
28 | #include "mem_kern.h" | 28 | #include "mem_kern.h" |
29 | #include "sysdep/sigcontext.h" | ||
30 | #include "sysdep/ptrace.h" | ||
31 | #include "os.h" | ||
29 | #ifdef CONFIG_MODE_SKAS | 32 | #ifdef CONFIG_MODE_SKAS |
30 | #include "skas.h" | 33 | #include "skas.h" |
31 | #endif | 34 | #endif |
@@ -126,6 +129,17 @@ out_of_memory: | |||
126 | goto out; | 129 | goto out; |
127 | } | 130 | } |
128 | 131 | ||
132 | void segv_handler(int sig, union uml_pt_regs *regs) | ||
133 | { | ||
134 | struct faultinfo * fi = UPT_FAULTINFO(regs); | ||
135 | |||
136 | if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ | ||
137 | bad_segv(*fi, UPT_IP(regs)); | ||
138 | return; | ||
139 | } | ||
140 | segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); | ||
141 | } | ||
142 | |||
129 | struct kern_handlers handlinfo_kern = { | 143 | struct kern_handlers handlinfo_kern = { |
130 | .relay_signal = relay_signal, | 144 | .relay_signal = relay_signal, |
131 | .winch = winch, | 145 | .winch = winch, |