diff options
Diffstat (limited to 'arch/um/kernel/tt/syscall_user.c')
-rw-r--r-- | arch/um/kernel/tt/syscall_user.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c index b218316cfdb..902987bf379 100644 --- a/arch/um/kernel/tt/syscall_user.c +++ b/arch/um/kernel/tt/syscall_user.c | |||
@@ -13,42 +13,9 @@ | |||
13 | #include "task.h" | 13 | #include "task.h" |
14 | #include "user_util.h" | 14 | #include "user_util.h" |
15 | #include "kern_util.h" | 15 | #include "kern_util.h" |
16 | #include "syscall_user.h" | 16 | #include "syscall.h" |
17 | #include "tt.h" | 17 | #include "tt.h" |
18 | 18 | ||
19 | |||
20 | void syscall_handler_tt(int sig, union uml_pt_regs *regs) | ||
21 | { | ||
22 | void *sc; | ||
23 | long result; | ||
24 | int syscall; | ||
25 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
26 | int index; | ||
27 | #endif | ||
28 | |||
29 | syscall = UPT_SYSCALL_NR(regs); | ||
30 | sc = UPT_SC(regs); | ||
31 | SC_START_SYSCALL(sc); | ||
32 | |||
33 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
34 | index = record_syscall_start(syscall); | ||
35 | #endif | ||
36 | syscall_trace(regs, 0); | ||
37 | result = execute_syscall_tt(regs); | ||
38 | |||
39 | /* regs->sc may have changed while the system call ran (there may | ||
40 | * have been an interrupt or segfault), so it needs to be refreshed. | ||
41 | */ | ||
42 | UPT_SC(regs) = sc; | ||
43 | |||
44 | SC_SET_SYSCALL_RETURN(sc, result); | ||
45 | |||
46 | syscall_trace(regs, 1); | ||
47 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
48 | record_syscall_end(index, result); | ||
49 | #endif | ||
50 | } | ||
51 | |||
52 | void do_sigtrap(void *task) | 19 | void do_sigtrap(void *task) |
53 | { | 20 | { |
54 | UPT_SYSCALL_NR(TASK_REGS(task)) = -1; | 21 | UPT_SYSCALL_NR(TASK_REGS(task)) = -1; |