spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / openrisc / kernel / sys_or32.c
blob57060084c0cc332cb279cd425eaff0e415ea8a80
1 /*
2 * OpenRISC sys_or32.c
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
8 * Modifications for the OpenRISC architecture:
9 * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
17 * This file contains various random system calls that
18 * have a non-standard calling sequence on some platforms.
19 * Since we don't have to do any backwards compatibility, our
20 * versions are done in the most "normal" way possible.
23 #include <linux/errno.h>
24 #include <linux/syscalls.h>
25 #include <linux/mm.h>
27 #include <asm/syscalls.h>
29 /* These are secondary entry points as the primary entry points are defined in
30 * entry.S where we add the 'regs' parameter value
33 asmlinkage long _sys_clone(unsigned long clone_flags, unsigned long newsp,
34 int __user *parent_tid, int __user *child_tid,
35 struct pt_regs *regs)
37 long ret;
39 /* FIXME: Is alignment necessary? */
40 /* newsp = ALIGN(newsp, 4); */
42 if (!newsp)
43 newsp = regs->sp;
45 ret = do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
47 return ret;
50 asmlinkage int _sys_fork(struct pt_regs *regs)
52 #ifdef CONFIG_MMU
53 return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL);
54 #else
55 return -EINVAL;
56 #endif