Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
39d91a9e
Commit
39d91a9e
authored
Oct 26, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openrisc: switch to use of generic fork and clone
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
cb562173
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
66 deletions
+19
-66
arch/openrisc/include/asm/syscalls.h
arch/openrisc/include/asm/syscalls.h
+7
-0
arch/openrisc/include/uapi/asm/unistd.h
arch/openrisc/include/uapi/asm/unistd.h
+2
-0
arch/openrisc/kernel/Makefile
arch/openrisc/kernel/Makefile
+1
-1
arch/openrisc/kernel/entry.S
arch/openrisc/kernel/entry.S
+6
-6
arch/openrisc/kernel/process.c
arch/openrisc/kernel/process.c
+3
-2
arch/openrisc/kernel/sys_or32.c
arch/openrisc/kernel/sys_or32.c
+0
-57
No files found.
arch/openrisc/include/asm/syscalls.h
View file @
39d91a9e
...
...
@@ -24,4 +24,11 @@ asmlinkage long sys_or1k_atomic(unsigned long type, unsigned long *v1,
#include <asm-generic/syscalls.h>
asmlinkage
long
__sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
newsp
,
void
__user
*
parent_tid
,
void
__user
*
child_tid
,
int
tls
);
asmlinkage
long
__sys_fork
(
void
);
#define sys_clone __sys_clone
#define sys_fork __sys_fork
#endif
/* __ASM_OPENRISC_SYSCALLS_H */
arch/openrisc/include/uapi/asm/unistd.h
View file @
39d91a9e
...
...
@@ -21,6 +21,8 @@
#define sys_mmap2 sys_mmap_pgoff
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_SYS_CLONE
#include <asm-generic/unistd.h>
...
...
arch/openrisc/kernel/Makefile
View file @
39d91a9e
...
...
@@ -5,7 +5,7 @@
extra-y
:=
head.o vmlinux.lds
obj-y
:=
setup.o idle.o or32_ksyms.o process.o dma.o
\
traps.o time.o irq.o entry.o ptrace.o signal.o
sys_or32.o
\
traps.o time.o irq.o entry.o ptrace.o signal.o
\
sys_call_table.o
obj-$(CONFIG_MODULES)
+=
module.o
...
...
arch/openrisc/kernel/entry.S
View file @
39d91a9e
...
...
@@ -1071,15 +1071,15 @@ _fork_save_extra_regs_and_call:
l.jr
r29
l.sw
PT_GPR28
(
r1
),
r28
ENTRY
(
sys_clone
)
l.movhi
r29
,
hi
(
_
sys_clone
)
l.ori
r29
,
r29
,
lo
(
_
sys_clone
)
ENTRY
(
__
sys_clone
)
l.movhi
r29
,
hi
(
sys_clone
)
l.ori
r29
,
r29
,
lo
(
sys_clone
)
l.j
_fork_save_extra_regs_and_call
l.addi
r7
,
r1
,
0
ENTRY
(
sys_fork
)
l.movhi
r29
,
hi
(
_
sys_fork
)
l.ori
r29
,
r29
,
lo
(
_
sys_fork
)
ENTRY
(
__
sys_fork
)
l.movhi
r29
,
hi
(
sys_fork
)
l.ori
r29
,
r29
,
lo
(
sys_fork
)
l.j
_fork_save_extra_regs_and_call
l.addi
r3
,
r1
,
0
...
...
arch/openrisc/kernel/process.c
View file @
39d91a9e
...
...
@@ -168,8 +168,9 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
kregs
->
gpr
[
20
]
=
usp
;
/* fn, kernel thread */
kregs
->
gpr
[
22
]
=
arg
;
}
else
{
*
userregs
=
*
regs
;
*
userregs
=
*
current_pt_regs
()
;
if
(
usp
)
userregs
->
sp
=
usp
;
userregs
->
gpr
[
11
]
=
0
;
/* Result from fork() */
...
...
arch/openrisc/kernel/sys_or32.c
deleted
100644 → 0
View file @
cb562173
/*
* 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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment