aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64/fault.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:24 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:02 -0400
commit5d86456d3852cb95a38d2b23fe01cede54984ba5 (patch)
treea0e973d629717d93c7b4dc32ad7afd9e64f5f974 /arch/um/sys-x86_64/fault.c
parentccdddb57874522e6b267204f9c5e94ba7d9d66b0 (diff)
uml: tidy fault code
Tidying in preparation for the segfault register dumping patch which follows. void * pointers are changed to union uml_pt_regs *. This makes the types match reality, except in arch_fixup, which is changed to operate on a union uml_pt_regs. This fixes a bug in the call from segv_handler, which passes a union uml_pt_regs, to segv, which expects to pass a struct sigcontext to arch_fixup. Whitespace and other style fixes. There's also a errno printk fix. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64/fault.c')
-rw-r--r--arch/um/sys-x86_64/fault.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c
index cee1513c5c31..4636b1465b6c 100644
--- a/arch/um/sys-x86_64/fault.c
+++ b/arch/um/sys-x86_64/fault.c
@@ -4,20 +4,24 @@
4 * Licensed under the GPL 4 * Licensed under the GPL
5 */ 5 */
6 6
7#include "user.h" 7#include "sysdep/ptrace.h"
8 8
9int arch_fixup(unsigned long address, void *sc_ptr) 9/* These two are from asm-um/uaccess.h and linux/module.h, check them. */
10struct exception_table_entry
10{ 11{
11 /* XXX search_exception_tables() */ 12 unsigned long insn;
13 unsigned long fixup;
14};
15
16const struct exception_table_entry *search_exception_tables(unsigned long add);
17int arch_fixup(unsigned long address, union uml_pt_regs *regs)
18{
19 const struct exception_table_entry *fixup;
20
21 fixup = search_exception_tables(address);
22 if(fixup != 0){
23 UPT_IP(regs) = fixup->fixup;
24 return(1);
25 }
12 return(0); 26 return(0);
13} 27}
14
15/* Overrides for Emacs so that we follow Linus's tabbing style.
16 * Emacs will notice this stuff at the end of the file and automatically
17 * adjust the settings for this buffer only. This must remain at the end
18 * of the file.
19 * ---------------------------------------------------------------------------
20 * Local variables:
21 * c-file-style: "linux"
22 * End:
23 */