mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
![Jonas Bonn](/assets/img/avatar_default.png)
The OpenRISC Linux kernel conforms to the "generic" syscall interface which contains only the reduced set of syscalls deemed necessary for new architectures. Unfortunately, the uClibc port for OpenRISC does not fully support this reduced set; as such, an additional patch available out-of-tree needs to be applied to the kernel in order to use the current uClibc. This is just a temporary measure until the libc port can be straightened out; it is likely that OpenRISC will make the transition to glibc shortly where the generic syscall interface is better supported. Signed-off-by: Jonas Bonn <jonas@southpole.se> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
57 lines
1.6 KiB
C
57 lines
1.6 KiB
C
/*
|
|
* OpenRISC sys_or32.c
|
|
*
|
|
* Linux architectural port borrowing liberally from similar works of
|
|
* others. All original copyrights apply as per the original source
|
|
* declaration.
|
|
*
|
|
* Modifications for the OpenRISC architecture:
|
|
* Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
|
|
* Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This file contains various random system calls that
|
|
* have a non-standard calling sequence on some platforms.
|
|
* Since we don't have to do any backwards compatibility, our
|
|
* versions are done in the most "normal" way possible.
|
|
*/
|
|
|
|
#include <linux/errno.h>
|
|
#include <linux/syscalls.h>
|
|
#include <linux/mm.h>
|
|
|
|
#include <asm/syscalls.h>
|
|
|
|
/* These are secondary entry points as the primary entry points are defined in
|
|
* entry.S where we add the 'regs' parameter value
|
|
*/
|
|
|
|
asmlinkage long _sys_clone(unsigned long clone_flags, unsigned long newsp,
|
|
int __user *parent_tid, int __user *child_tid,
|
|
struct pt_regs *regs)
|
|
{
|
|
long ret;
|
|
|
|
/* FIXME: Is alignment necessary? */
|
|
/* newsp = ALIGN(newsp, 4); */
|
|
|
|
if (!newsp)
|
|
newsp = regs->sp;
|
|
|
|
ret = do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
|
|
|
|
return ret;
|
|
}
|
|
|
|
asmlinkage int _sys_fork(struct pt_regs *regs)
|
|
{
|
|
#ifdef CONFIG_MMU
|
|
return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL);
|
|
#else
|
|
return -EINVAL;
|
|
#endif
|
|
}
|