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
a94a71d6
Commit
a94a71d6
authored
Nov 28, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: fix sys_clone bug (paulus) and fix fork arguments (Milton Miller)
parent
646adb15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
16 deletions
+43
-16
arch/ppc64/Kconfig
arch/ppc64/Kconfig
+25
-8
arch/ppc64/defconfig
arch/ppc64/defconfig
+1
-1
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+3
-1
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+14
-6
No files found.
arch/ppc64/Kconfig
View file @
a94a71d6
...
...
@@ -63,10 +63,7 @@ config SMP
---help---
This enables support for systems with more than one CPU. If you have
a system with only one CPU, say N. If you have a system with more
than one CPU, say Y. Note that the kernel does not currently
support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
since they have inadequate hardware support for multiprocessor
operation.
than one CPU, say Y.
If you say N here, the kernel will run on single and multiprocessor
machines, but will use only one CPU of a multiprocessor machine. If
...
...
@@ -74,16 +71,15 @@ config SMP
On a single-processor machine, the kernel will run faster if you say
N here.
If you don't know what to do here, say
N
.
If you don't know what to do here, say
Y
.
config IRQ_ALL_CPUS
bool "Distribute interrupts on all CPUs by default"
depends on SMP
depends on SMP
&& PPC_PSERIES
help
This option gives the kernel permission to distribute IRQs across
multiple CPUs. Saying N here will route all IRQs to the first
CPU. Generally saying Y is safe, although some problems have been
reported with SMP Power Macintoshes with this option enabled.
CPU.
config NR_CPUS
int "Maximum number of CPUs (2-64)"
...
...
@@ -468,13 +464,24 @@ config VIOCONS
config VIODASD
tristate "iSeries Virtual I/O disk support"
help
If you are running on an iSeries system and you want to use
virtual disks created and managed by OS/400, say Y.
config VIODASD_IDE
bool "iSeries Virtual disk IDE emulation"
depends on VIODASD
help
This causes the iSeries virtual disks to look like IDE disks.
If you have programs or utilities that only support certain
kinds of disks, this option will cause iSeries virtual disks
to pretend to be IDE disks, which may satisfy the program.
config VIOCD
tristate "iSeries Virtual I/O CD support"
help
If you are running Linux on an IBM iSeries system and you want to
read a CD drive owned by OS/400, say Y here.
config VIOCD_AZTECH
bool "iSeries Virtual CD Aztech emulation"
...
...
@@ -482,6 +489,9 @@ config VIOCD_AZTECH
config VIOTAPE
tristate "iSeries Virtual Tape Support"
help
If you are running Linux on an iSeries system and you want Linux
to read and/or write a tape drive owned by OS/400, say Y here.
config VETH
tristate "iSeries Virtual Ethernet driver support"
...
...
@@ -498,10 +508,17 @@ menu "Kernel hacking"
config DEBUG_KERNEL
bool "Kernel debugging"
help
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
config DEBUG_SLAB
bool "Debug memory allocations"
depends on DEBUG_KERNEL
help
Say Y here to have the kernel do limited verification on memory
allocation as well as poisoning memory on free to catch use of freed
memory.
config MAGIC_SYSRQ
bool "Magic SysRq key"
...
...
arch/ppc64/defconfig
View file @
a94a71d6
...
...
@@ -636,7 +636,7 @@ CONFIG_XMON_DEFAULT=y
#
# Security options
#
CONFIG_SECURITY_CAPABILITIES=y
# CONFIG_SECURITY is not set
#
# Cryptographic options
...
...
arch/ppc64/kernel/misc.S
View file @
a94a71d6
...
...
@@ -485,8 +485,10 @@ _GLOBAL(cvt_df)
_GLOBAL
(
kernel_thread
)
/
*
XXX
fix
this
when
we
optimise
syscall
entry
to
not
save
volatiles
*/
mr
r6
,
r3
/*
function
*/
mr
r7
,
r4
/*
arg
*/
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
?
*/
...
...
@@ -496,7 +498,7 @@ _GLOBAL(kernel_thread)
ld
r2
,
8
(
r6
)
ld
r6
,
0
(
r6
)
mtlr
r6
/*
fn
addr
in
lr
*/
mr
r3
,
r
4
/*
load
arg
and
call
fn
*/
mr
r3
,
r
7
/*
load
arg
and
call
fn
*/
blrl
li
r0
,
__NR_exit
/*
exit
after
child
exits
*/
li
r3
,
0
...
...
arch/ppc64/kernel/process.c
View file @
a94a71d6
...
...
@@ -191,8 +191,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
#ifdef CONFIG_PPC_ISERIES
set_ti_thread_flag
(
p
->
thread_info
,
TIF_RUN_LIGHT
);
#endif
}
else
}
else
{
childregs
->
gpr
[
1
]
=
usp
;
p
->
thread
.
regs
=
childregs
;
}
childregs
->
gpr
[
3
]
=
0
;
/* Result from fork() */
sp
-=
STACK_FRAME_OVERHEAD
;
...
...
@@ -266,13 +268,17 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
return
put_user
(
val
,
(
unsigned
int
*
)
adr
);
}
int
sys_clone
(
unsigned
long
clone_flags
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
int
sys_clone
(
unsigned
long
clone_flags
,
unsigned
long
p2
,
unsigned
long
p3
,
unsigned
long
p4
,
unsigned
long
p5
,
unsigned
long
p6
,
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
;
unsigned
long
parent_tidptr
=
0
;
unsigned
long
child_tidptr
=
0
;
if
(
p2
==
0
)
p2
=
regs
->
gpr
[
1
];
/* stack pointer for child */
if
(
clone_flags
&
(
CLONE_PARENT_SETTID
|
CLONE_CHILD_SETTID
|
CLONE_CHILD_CLEARTID
))
{
parent_tidptr
=
p3
;
...
...
@@ -286,12 +292,13 @@ int sys_clone(unsigned long clone_flags, u32 p2, u32 p3, u32 p4, u32 p5,
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
]
,
regs
,
0
,
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
p2
,
regs
,
0
,
(
int
*
)
parent_tidptr
,
(
int
*
)
child_tidptr
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
int
sys_fork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
int
sys_fork
(
unsigned
long
p1
,
unsigned
long
p2
,
unsigned
long
p3
,
unsigned
long
p4
,
unsigned
long
p5
,
unsigned
long
p6
,
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
;
...
...
@@ -303,7 +310,8 @@ int sys_fork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
int
sys_vfork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
int
sys_vfork
(
unsigned
long
p1
,
unsigned
long
p2
,
unsigned
long
p3
,
unsigned
long
p4
,
unsigned
long
p5
,
unsigned
long
p6
,
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
;
...
...
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