aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/trap.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-05 01:30:40 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:25 -0500
commit9226b8384776798986640ce07764d17ba66aa54f (patch)
treecffd1f6e14124729da114192aee83fe88e9f21e5 /arch/um/kernel/trap.c
parent06d9bd3ad6da2422f838fd11d5d5348fa579bdb2 (diff)
uml: further bugs.c tidying
bugs.c, for both i386 and x86_64, can undergo further cleaning - The i386 arch_check_bugs only does one thing, so we might as well inline the cmov checking. The i386 includes can be trimmed down a bit. arch_init_thread wasn't used, so it is deleted. The panics in arch_handle_signal are turned into printks because the process is about to get segfaulted anyway, so something is dying no matter what happens here. Also, the return value was always the same, so it contained no information, so it can be void instead. The name is changed to arch_examine_signal because it doesn't handle anything. The caller of arch_handle_signal, relay_signal, does things in a different order. The kernel-mode signal check is now first, which puts everything else together, making things a bit clearer conceptually. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/trap.c')
-rw-r--r--arch/um/kernel/trap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index cb3321f8e0a9..e3a3ab8f8635 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -216,9 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
216 216
217void relay_signal(int sig, struct uml_pt_regs *regs) 217void relay_signal(int sig, struct uml_pt_regs *regs)
218{ 218{
219 if (arch_handle_signal(sig, regs))
220 return;
221
222 if (!UPT_IS_USER(regs)) { 219 if (!UPT_IS_USER(regs)) {
223 if (sig == SIGBUS) 220 if (sig == SIGBUS)
224 printk(KERN_ERR "Bus error - the host /dev/shm or /tmp " 221 printk(KERN_ERR "Bus error - the host /dev/shm or /tmp "
@@ -226,6 +223,8 @@ void relay_signal(int sig, struct uml_pt_regs *regs)
226 panic("Kernel mode signal %d", sig); 223 panic("Kernel mode signal %d", sig);
227 } 224 }
228 225
226 arch_examine_signal(sig, regs);
227
229 current->thread.arch.faultinfo = *UPT_FAULTINFO(regs); 228 current->thread.arch.faultinfo = *UPT_FAULTINFO(regs);
230 force_sig(sig, current); 229 force_sig(sig, current);
231} 230}