diff options
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index b783ac87d98a..44bb10785075 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c | |||
@@ -10,12 +10,23 @@ | |||
10 | #include <sysdep/ptrace.h> | 10 | #include <sysdep/ptrace.h> |
11 | #include <sysdep/ptrace_user.h> | 11 | #include <sysdep/ptrace_user.h> |
12 | #include <sysdep/syscalls.h> | 12 | #include <sysdep/syscalls.h> |
13 | #include <shared/timer-internal.h> | ||
13 | 14 | ||
14 | void handle_syscall(struct uml_pt_regs *r) | 15 | void handle_syscall(struct uml_pt_regs *r) |
15 | { | 16 | { |
16 | struct pt_regs *regs = container_of(r, struct pt_regs, regs); | 17 | struct pt_regs *regs = container_of(r, struct pt_regs, regs); |
17 | int syscall; | 18 | int syscall; |
18 | 19 | ||
20 | /* | ||
21 | * If we have infinite CPU resources, then make every syscall also a | ||
22 | * preemption point, since we don't have any other preemption in this | ||
23 | * case, and kernel threads would basically never run until userspace | ||
24 | * went to sleep, even if said userspace interacts with the kernel in | ||
25 | * various ways. | ||
26 | */ | ||
27 | if (time_travel_mode == TT_MODE_INFCPU) | ||
28 | schedule(); | ||
29 | |||
19 | /* Initialize the syscall number and default return value. */ | 30 | /* Initialize the syscall number and default return value. */ |
20 | UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp); | 31 | UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp); |
21 | PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS); | 32 | PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS); |