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
nexedi
linux
Commits
dd6714bd
Commit
dd6714bd
authored
Nov 23, 2002
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: update for recent changes to clone system call.
parent
14751427
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
arch/ppc/kernel/entry.S
arch/ppc/kernel/entry.S
+0
-2
arch/ppc/kernel/misc.S
arch/ppc/kernel/misc.S
+1
-0
arch/ppc/kernel/process.c
arch/ppc/kernel/process.c
+10
-7
No files found.
arch/ppc/kernel/entry.S
View file @
dd6714bd
...
...
@@ -182,9 +182,7 @@ syscall_exit_cont:
.
globl
ret_from_fork
ret_from_fork
:
REST_NVGPRS
(
r1
)
#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
bl
schedule_tail
#endif
li
r3
,
0
b
ret_from_syscall
...
...
arch/ppc/kernel/misc.S
View file @
dd6714bd
...
...
@@ -1006,6 +1006,7 @@ _GLOBAL(kernel_thread)
mr
r31
,
r4
/*
argument
*/
ori
r3
,
r5
,
CLONE_VM
/*
flags
*/
oris
r3
,
r3
,
CLONE_UNTRACED
>>
16
li
r4
,
0
/*
new
sp
(
unused
)
*/
li
r0
,
__NR_clone
sc
cmpi
0
,
r3
,
0
/*
parent
or
child
?
*/
...
...
arch/ppc/kernel/process.c
View file @
dd6714bd
...
...
@@ -332,7 +332,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned
long
sp
=
(
unsigned
long
)
p
->
thread_info
+
THREAD_SIZE
;
unsigned
long
childframe
;
p
->
user
_tid
=
NULL
;
p
->
set_child_tid
=
p
->
clear_child
_tid
=
NULL
;
CHECK_FULL_REGS
(
regs
);
/* Copy registers */
...
...
@@ -344,8 +344,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childregs
->
gpr
[
1
]
=
sp
+
sizeof
(
struct
pt_regs
);
childregs
->
gpr
[
2
]
=
(
unsigned
long
)
p
;
p
->
thread
.
regs
=
NULL
;
/* no user register state */
}
else
}
else
{
childregs
->
gpr
[
1
]
=
usp
;
p
->
thread
.
regs
=
childregs
;
}
childregs
->
gpr
[
3
]
=
0
;
/* Result from fork() */
sp
-=
STACK_FRAME_OVERHEAD
;
childframe
=
sp
;
...
...
@@ -449,9 +451,9 @@ int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6,
struct
task_struct
*
p
;
CHECK_FULL_REGS
(
regs
);
if
(
(
p1
&
(
CLONE_SETTID
|
CLONE_CLEARTID
))
==
0
)
p
3
=
0
;
p
=
do_fork
(
p1
&
~
CLONE_IDLETASK
,
p2
,
regs
,
0
,
(
int
*
)
p3
);
if
(
p2
==
0
)
p
2
=
regs
->
gpr
[
1
];
/* stack pointer for child */
p
=
do_fork
(
p1
&
~
CLONE_IDLETASK
,
p2
,
regs
,
0
,
(
int
*
)
p3
,
(
int
*
)
p4
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
...
...
@@ -460,7 +462,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
{
struct
task_struct
*
p
;
CHECK_FULL_REGS
(
regs
);
p
=
do_fork
(
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
);
p
=
do_fork
(
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
...
...
@@ -469,7 +471,8 @@ int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
{
struct
task_struct
*
p
;
CHECK_FULL_REGS
(
regs
);
p
=
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
);
p
=
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
...
...
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