irqchip: Fix dependencies for archs w/o HAS_IOMEM
[linux/fpc-iii.git] / arch / um / kernel / skas / syscall.c
blob1683b8efdfdafe916c2768457e68f2dd5fd5b2d0
1 /*
2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #include <linux/kernel.h>
7 #include <linux/ptrace.h>
8 #include <kern_util.h>
9 #include <sysdep/ptrace.h>
10 #include <sysdep/syscalls.h>
11 #include <os.h>
13 void handle_syscall(struct uml_pt_regs *r)
15 struct pt_regs *regs = container_of(r, struct pt_regs, regs);
16 long result;
17 int syscall;
19 if (syscall_trace_enter(regs)) {
20 result = -ENOSYS;
21 goto out;
24 syscall = get_syscall(r);
26 if ((syscall > __NR_syscall_max) || syscall < 0)
27 result = -ENOSYS;
28 else
29 result = EXECUTE_SYSCALL(syscall, regs);
31 out:
32 PT_REGS_SET_SYSCALL_RETURN(regs, result);
34 syscall_trace_leave(regs);