Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
39d91a9e
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39d91a9e
编写于
10月 26, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
openrisc: switch to use of generic fork and clone
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
cb562173
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
19 addition
and
66 deletion
+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
未找到文件。
arch/openrisc/include/asm/syscalls.h
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
39d91a9e
...
...
@@ -168,9 +168,10 @@ 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
()
;
userregs
->
sp
=
usp
;
if
(
usp
)
userregs
->
sp
=
usp
;
userregs
->
gpr
[
11
]
=
0
;
/* Result from fork() */
kregs
->
gpr
[
20
]
=
0
;
/* Userspace thread */
...
...
arch/openrisc/kernel/sys_or32.c
已删除
100644 → 0
浏览文件 @
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
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录