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
6c5ace44
Commit
6c5ace44
authored
Aug 18, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5_work
into samba.org:/scratch/anton/linux-2.5_syscall_cleanup_clean
parents
273cbb5a
7c992e1c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
215 deletions
+94
-215
arch/ppc64/kernel/entry.S
arch/ppc64/kernel/entry.S
+0
-8
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+21
-19
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+6
-6
arch/ppc64/kernel/sys32.S
arch/ppc64/kernel/sys32.S
+3
-7
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+63
-175
include/asm-ppc64/unistd.h
include/asm-ppc64/unistd.h
+1
-0
No files found.
arch/ppc64/kernel/entry.S
View file @
6c5ace44
...
@@ -113,10 +113,6 @@ _GLOBAL(DoSyscall)
...
@@ -113,10 +113,6 @@ _GLOBAL(DoSyscall)
clrldi
r4
,
r4
,
32
clrldi
r4
,
r4
,
32
clrldi
r5
,
r5
,
32
clrldi
r5
,
r5
,
32
clrldi
r6
,
r6
,
32
clrldi
r6
,
r6
,
32
#if 0 /* XXX Why not ??? - Anton */
clrldi
r7
,
r7
,
32
clrldi
r8
,
r8
,
32
#endif
b
17
f
b
17
f
15
:
15
:
#endif
#endif
...
@@ -187,10 +183,6 @@ _GLOBAL(ret_from_syscall_1)
...
@@ -187,10 +183,6 @@ _GLOBAL(ret_from_syscall_1)
clrldi
r4
,
r4
,
32
clrldi
r4
,
r4
,
32
clrldi
r5
,
r5
,
32
clrldi
r5
,
r5
,
32
clrldi
r6
,
r6
,
32
clrldi
r6
,
r6
,
32
#if 0 /* XXX Why not ??? - Anton */
clrldi
r7
,
r7
,
32
clrldi
r8
,
r8
,
32
#endif
b
57
f
b
57
f
55
:
55
:
#endif
#endif
...
...
arch/ppc64/kernel/misc.S
View file @
6c5ace44
...
@@ -505,8 +505,8 @@ _GLOBAL(kernel_thread)
...
@@ -505,8 +505,8 @@ _GLOBAL(kernel_thread)
.
balign
8
.
balign
8
_GLOBAL
(
sys_call_table32
)
_GLOBAL
(
sys_call_table32
)
.
llong
.
sys_ni_syscall
/*
0
-
old
"setup()"
system
call
*/
.
llong
.
sys_ni_syscall
/*
0
-
old
"setup()"
system
call
*/
.
llong
.
sys
32
_exit
.
llong
.
sys_exit
.
llong
.
sys
32
_fork
.
llong
.
sys_fork
.
llong
.
sys_read
.
llong
.
sys_read
.
llong
.
sys_write
.
llong
.
sys_write
.
llong
.
sys32_open
/*
5
*/
.
llong
.
sys32_open
/*
5
*/
...
@@ -522,7 +522,7 @@ _GLOBAL(sys_call_table32)
...
@@ -522,7 +522,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_chmod
/*
15
*/
.
llong
.
sys_chmod
/*
15
*/
.
llong
.
sys_lchown
.
llong
.
sys_lchown
.
llong
.
sys_ni_syscall
/*
old
break
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
break
syscall
holder
*/
.
llong
.
sys
32_stat
.
llong
.
sys
_ni_syscall
/*
old
stat
syscall
holder
*/
.
llong
.
sys32_lseek
.
llong
.
sys32_lseek
.
llong
.
sys_getpid
/*
20
*/
.
llong
.
sys_getpid
/*
20
*/
.
llong
.
sys32_mount
.
llong
.
sys32_mount
...
@@ -532,7 +532,7 @@ _GLOBAL(sys_call_table32)
...
@@ -532,7 +532,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
ppc64_sys32_stime
/*
25
*/
.
llong
.
ppc64_sys32_stime
/*
25
*/
.
llong
.
sys32_ptrace
.
llong
.
sys32_ptrace
.
llong
.
sys_alarm
.
llong
.
sys_alarm
.
llong
.
sys
32_fstat
.
llong
.
sys
_ni_syscall
/*
old
fstat
syscall
holder
*/
.
llong
.
sys32_pause
.
llong
.
sys32_pause
.
llong
.
sys32_utime
/*
30
*/
.
llong
.
sys32_utime
/*
30
*/
.
llong
.
sys_ni_syscall
/*
old
stty
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
stty
syscall
holder
*/
...
@@ -588,11 +588,11 @@ _GLOBAL(sys_call_table32)
...
@@ -588,11 +588,11 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_setgroups
.
llong
.
sys32_setgroups
.
llong
.
ppc32_select
.
llong
.
ppc32_select
.
llong
.
sys_symlink
.
llong
.
sys_symlink
.
llong
.
sys
32_lstat
.
llong
.
sys
_ni_syscall
/*
old
sys_lstat
syscall
holder
*/
.
llong
.
sys32_readlink
/*
85
*/
.
llong
.
sys32_readlink
/*
85
*/
.
llong
.
sys_uselib
.
llong
.
sys_uselib
.
llong
.
sys
32
_swapon
.
llong
.
sys_swapon
.
llong
.
sys
32
_reboot
.
llong
.
sys_reboot
.
llong
.
old32_readdir
.
llong
.
old32_readdir
.
llong
.
sys32_mmap
/*
90
*/
.
llong
.
sys32_mmap
/*
90
*/
.
llong
.
sys_munmap
.
llong
.
sys_munmap
...
@@ -605,7 +605,7 @@ _GLOBAL(sys_call_table32)
...
@@ -605,7 +605,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
holder
*/
.
llong
.
sys32_statfs
.
llong
.
sys32_statfs
.
llong
.
sys32_fstatfs
/*
100
*/
.
llong
.
sys32_fstatfs
/*
100
*/
.
llong
.
sys_
ni_syscall
/*
old
ioperm
syscall
holder
*/
.
llong
.
sys_
ioperm
.
llong
.
sys32_socketcall
.
llong
.
sys32_socketcall
.
llong
.
sys32_syslog
.
llong
.
sys32_syslog
.
llong
.
sys32_setitimer
.
llong
.
sys32_setitimer
...
@@ -624,7 +624,7 @@ _GLOBAL(sys_call_table32)
...
@@ -624,7 +624,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_ipc
.
llong
.
sys32_ipc
.
llong
.
sys_fsync
.
llong
.
sys_fsync
.
llong
.
ppc32_sigreturn
.
llong
.
ppc32_sigreturn
.
llong
.
sys
32
_clone
/*
120
*/
.
llong
.
sys_clone
/*
120
*/
.
llong
.
sys32_setdomainname
.
llong
.
sys32_setdomainname
.
llong
.
ppc64_newuname
.
llong
.
ppc64_newuname
.
llong
.
sys_ni_syscall
/*
old
modify_ldt
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
modify_ldt
syscall
holder
*/
...
@@ -638,7 +638,7 @@ _GLOBAL(sys_call_table32)
...
@@ -638,7 +638,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_quotactl
.
llong
.
sys_quotactl
.
llong
.
sys32_getpgid
.
llong
.
sys32_getpgid
.
llong
.
sys_fchdir
.
llong
.
sys_fchdir
.
llong
.
sys
32
_bdflush
.
llong
.
sys_bdflush
.
llong
.
sys32_sysfs
/*
135
*/
.
llong
.
sys32_sysfs
/*
135
*/
.
llong
.
sys32_personality
.
llong
.
sys32_personality
.
llong
.
sys_ni_syscall
/*
for
afs_syscall
*/
.
llong
.
sys_ni_syscall
/*
for
afs_syscall
*/
...
@@ -693,10 +693,10 @@ _GLOBAL(sys_call_table32)
...
@@ -693,10 +693,10 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_sendfile
.
llong
.
sys32_sendfile
.
llong
.
sys_ni_syscall
/*
streams1
*/
.
llong
.
sys_ni_syscall
/*
streams1
*/
.
llong
.
sys_ni_syscall
/*
streams2
*/
.
llong
.
sys_ni_syscall
/*
streams2
*/
.
llong
.
sys
32
_vfork
.
llong
.
sys_vfork
.
llong
.
sys32_getrlimit
/*
190
*/
.
llong
.
sys32_getrlimit
/*
190
*/
.
llong
.
sys32_readahead
.
llong
.
sys32_readahead
.
llong
.
sys_ni_syscall
/*
192
-
reserved
-
mmap2
*/
.
llong
.
ppc32_mmap2
.
llong
.
sys32_truncate64
/*
193
-
truncate64
*/
.
llong
.
sys32_truncate64
/*
193
-
truncate64
*/
.
llong
.
sys32_ftruncate64
/*
194
-
ftruncate64
*/
.
llong
.
sys32_ftruncate64
/*
194
-
ftruncate64
*/
.
llong
.
sys_stat64
/*
195
-
stat64
*/
.
llong
.
sys_stat64
/*
195
-
stat64
*/
...
@@ -730,8 +730,9 @@ _GLOBAL(sys_call_table32)
...
@@ -730,8 +730,9 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_sched_getaffinity
.
llong
.
sys32_sched_getaffinity
.
llong
.
sys_ni_syscall
/*
reserved
for
security
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
security
*/
.
llong
.
sys_ni_syscall
/*
225
-
reserved
for
tux
*/
.
llong
.
sys_ni_syscall
/*
225
-
reserved
for
tux
*/
.
llong
.
sys32_sendfile64
.
rept
NR_syscalls
-
22
5
.
rept
NR_syscalls
-
22
6
.
llong
.
sys_ni_syscall
.
llong
.
sys_ni_syscall
.
endr
.
endr
#endif
#endif
...
@@ -756,7 +757,7 @@ _GLOBAL(sys_call_table)
...
@@ -756,7 +757,7 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_chmod
/*
15
*/
.
llong
.
sys_chmod
/*
15
*/
.
llong
.
sys_lchown
.
llong
.
sys_lchown
.
llong
.
sys_ni_syscall
/*
old
break
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
break
syscall
holder
*/
.
llong
.
sys_
stat
.
llong
.
sys_
ni_syscall
/*
old
stat
syscall
holder
*/
.
llong
.
sys_lseek
.
llong
.
sys_lseek
.
llong
.
sys_getpid
/*
20
*/
.
llong
.
sys_getpid
/*
20
*/
.
llong
.
sys_mount
.
llong
.
sys_mount
...
@@ -766,7 +767,7 @@ _GLOBAL(sys_call_table)
...
@@ -766,7 +767,7 @@ _GLOBAL(sys_call_table)
.
llong
.
ppc64_sys_stime
/*
25
*/
.
llong
.
ppc64_sys_stime
/*
25
*/
.
llong
.
sys_ptrace
.
llong
.
sys_ptrace
.
llong
.
sys_alarm
.
llong
.
sys_alarm
.
llong
.
sys_
fstat
.
llong
.
sys_
ni_syscall
/*
old
sys_fstat
syscall
holder
*/
.
llong
.
sys_pause
.
llong
.
sys_pause
.
llong
.
sys_utime
/*
30
*/
.
llong
.
sys_utime
/*
30
*/
.
llong
.
sys_ni_syscall
/*
old
stty
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
stty
syscall
holder
*/
...
@@ -822,7 +823,7 @@ _GLOBAL(sys_call_table)
...
@@ -822,7 +823,7 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_setgroups
.
llong
.
sys_setgroups
.
llong
.
sys_select
.
llong
.
sys_select
.
llong
.
sys_symlink
.
llong
.
sys_symlink
.
llong
.
sys_
lstat
.
llong
.
sys_
ni_syscall
/*
old
sys_lstat
syscall
holder
*/
.
llong
.
sys_readlink
/*
85
*/
.
llong
.
sys_readlink
/*
85
*/
.
llong
.
sys_uselib
.
llong
.
sys_uselib
.
llong
.
sys_swapon
.
llong
.
sys_swapon
...
@@ -839,7 +840,7 @@ _GLOBAL(sys_call_table)
...
@@ -839,7 +840,7 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
holder
*/
.
llong
.
sys_statfs
.
llong
.
sys_statfs
.
llong
.
sys_fstatfs
/*
100
*/
.
llong
.
sys_fstatfs
/*
100
*/
.
llong
.
sys_
ni_syscall
/*
old
ioperm
syscall
holder
*/
.
llong
.
sys_
ioperm
.
llong
.
sys_socketcall
.
llong
.
sys_socketcall
.
llong
.
sys_syslog
.
llong
.
sys_syslog
.
llong
.
sys_setitimer
.
llong
.
sys_setitimer
...
@@ -964,7 +965,8 @@ _GLOBAL(sys_call_table)
...
@@ -964,7 +965,8 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_sched_getaffinity
.
llong
.
sys_sched_getaffinity
.
llong
.
sys_ni_syscall
/*
reserved
for
security
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
security
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
tux
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
tux
*/
.
llong
.
sys_ni_syscall
/*
reserved
for
sendfile64
*/
.
rept
NR_syscalls
-
22
5
.
rept
NR_syscalls
-
22
6
.
llong
.
sys_ni_syscall
.
llong
.
sys_ni_syscall
.
endr
.
endr
arch/ppc64/kernel/process.c
View file @
6c5ace44
...
@@ -259,19 +259,19 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
...
@@ -259,19 +259,19 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
return
put_user
(
val
,
(
unsigned
int
*
)
adr
);
return
put_user
(
val
,
(
unsigned
int
*
)
adr
);
}
}
int
sys_clone
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_clone
(
unsigned
long
clone_flags
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
struct
pt_regs
*
regs
)
u32
p6
,
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
if
(
regs
->
msr
&
MSR_FP
)
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
giveup_fpu
(
current
);
p
=
do_fork
(
p1
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
);
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
int
sys_fork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_fork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
...
@@ -283,7 +283,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
...
@@ -283,7 +283,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
int
sys_vfork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_vfork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
...
...
arch/ppc64/kernel/sys32.S
View file @
6c5ace44
...
@@ -44,14 +44,10 @@ _GLOBAL(sys32_getsockopt)
...
@@ -44,14 +44,10 @@ _GLOBAL(sys32_getsockopt)
clrldi
r7
,
r7
,
32
/*
int
*
optlen
parm
*/
clrldi
r7
,
r7
,
32
/*
int
*
optlen
parm
*/
b
.
sys_getsockopt
b
.
sys_getsockopt
_GLOBAL
(
sys32_bdflush
)
_GLOBAL
(
ppc32_mmap2
)
extsw
r4
,
r4
/*
sign
extend
long
data
parm
*/
b
.
sys_bdflush
_GLOBAL
(
sys32_mmap2
)
clrldi
r7
,
r7
,
32
/*
unsigned
long
fd
parm
*/
clrldi
r7
,
r7
,
32
/*
unsigned
long
fd
parm
*/
extsw
r8
,
r8
/*
off_t
offset
*/
clrldi
r8
,
r8
,
32
/*
unsigned
long
pgoff
*/
b
.
sys
_mmap
b
.
sys
32_mmap2
_GLOBAL
(
sys32_socketcall
)
/
*
r3
=
call
,
r4
=
args
*/
_GLOBAL
(
sys32_socketcall
)
/
*
r3
=
call
,
r4
=
args
*/
cmpwi
r3
,
1
cmpwi
r3
,
1
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
6c5ace44
...
@@ -67,21 +67,6 @@
...
@@ -67,21 +67,6 @@
#include <asm/ppc32.h>
#include <asm/ppc32.h>
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
extern
unsigned
long
wall_jiffies
;
#define USEC_PER_SEC (1000000)
/*
* These are the flags in the MSR that the user is allowed to change
* by modifying the saved value of the MSR on the stack. SE and BE
* should not be in this list since gdb may want to change these. I.e,
* you should be able to step out of a signal handler to see what
* instruction executes next after the signal handler completes.
* Alternately, if you stepped into a signal handler, you should be
* able to continue 'til the next breakpoint from within the signal
* handler, even if the handler returns.
*/
#define MSR_USERCHANGE (MSR_FE0 | MSR_FE1)
extern
asmlinkage
long
sys_utime
(
char
*
filename
,
struct
utimbuf
*
times
);
extern
asmlinkage
long
sys_utime
(
char
*
filename
,
struct
utimbuf
*
times
);
struct
utimbuf32
{
struct
utimbuf32
{
...
@@ -1432,15 +1417,10 @@ asmlinkage long sys32_delete_module(const char *name_user)
...
@@ -1432,15 +1417,10 @@ asmlinkage long sys32_delete_module(const char *name_user)
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
/* Note: it is necessary to treat which as an unsigned int,
asmlinkage
long
sys32_query_module
(
const
char
*
name_user
,
int
which
,
char
*
buf
,
size_t
bufsize
,
size_t
*
ret
)
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_query_module
(
const
char
*
name_user
,
u32
which
,
char
*
buf
,
size_t
bufsize
,
size_t
*
ret
)
{
{
/* Let the program know about the new interface. Not that it'll do them much good. */
/* Let the program know about the new interface. Not that it'll do them much good. */
if
(
(
int
)
which
==
0
)
if
(
which
==
0
)
return
0
;
return
0
;
return
-
ENOSYS
;
return
-
ENOSYS
;
...
@@ -2779,69 +2759,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p
...
@@ -2779,69 +2759,6 @@ asmlinkage long sys32_ipc(u32 call, u32 first_parm, u32 second_parm, u32 third_p
return
err
;
return
err
;
}
}
/* stat syscall methods. */
extern
asmlinkage
int
sys_stat
(
char
*
filename
,
struct
__old_kernel_stat
*
statbuf
);
static
int
cp_old_stat32
(
struct
kstat
*
stat
,
struct
__old_kernel_stat32
*
statbuf
)
{
static
int
warncount
=
5
;
struct
__old_kernel_stat32
tmp
;
if
(
warncount
)
{
warncount
--
;
printk
(
"VFS: Warning: %s using old stat() call. Recompile your binary.
\n
"
,
current
->
comm
);
}
tmp
.
st_dev
=
stat
->
dev
;
tmp
.
st_ino
=
stat
->
ino
;
tmp
.
st_mode
=
stat
->
mode
;
tmp
.
st_nlink
=
stat
->
nlink
;
SET_OLDSTAT_UID
(
tmp
,
stat
->
uid
);
SET_OLDSTAT_GID
(
tmp
,
stat
->
gid
);
tmp
.
st_rdev
=
stat
->
rdev
;
if
(
stat
->
size
>
MAX_NON_LFS
)
return
-
EOVERFLOW
;
tmp
.
st_size
=
stat
->
size
;
tmp
.
st_atime
=
stat
->
atime
;
tmp
.
st_mtime
=
stat
->
mtime
;
tmp
.
st_ctime
=
stat
->
ctime
;
return
copy_to_user
(
statbuf
,
&
tmp
,
sizeof
(
tmp
))
?
-
EFAULT
:
0
;
}
asmlinkage
long
sys32_stat
(
char
*
filename
,
struct
__old_kernel_stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_stat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_old_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_fstat
(
unsigned
int
fd
,
struct
__old_kernel_stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_fstat
(
fd
,
&
stat
);
if
(
!
error
)
error
=
cp_old_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_lstat
(
char
*
filename
,
struct
__old_kernel_stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_lstat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_old_stat32
(
&
stat
,
statbuf
);
return
error
;
}
extern
asmlinkage
ssize_t
sys_sendfile
(
int
out_fd
,
int
in_fd
,
off_t
*
offset
,
size_t
count
);
extern
asmlinkage
ssize_t
sys_sendfile
(
int
out_fd
,
int
in_fd
,
off_t
*
offset
,
size_t
count
);
/* Note: it is necessary to treat out_fd and in_fd as unsigned ints,
/* Note: it is necessary to treat out_fd and in_fd as unsigned ints,
...
@@ -2868,6 +2785,27 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, __kernel_off_t32* offset,
...
@@ -2868,6 +2785,27 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, __kernel_off_t32* offset,
return
ret
;
return
ret
;
}
}
extern
asmlinkage
ssize_t
sys_sendfile64
(
int
out_fd
,
int
in_fd
,
loff_t
*
offset
,
size_t
count
);
asmlinkage
int
sys32_sendfile64
(
int
out_fd
,
int
in_fd
,
__kernel_loff_t32
*
offset
,
s32
count
)
{
mm_segment_t
old_fs
=
get_fs
();
int
ret
;
loff_t
lof
;
if
(
offset
&&
get_user
(
lof
,
offset
))
return
-
EFAULT
;
set_fs
(
KERNEL_DS
);
ret
=
sys_sendfile64
(
out_fd
,
in_fd
,
offset
?
&
lof
:
NULL
,
count
);
set_fs
(
old_fs
);
if
(
offset
&&
put_user
(
lof
,
offset
))
return
-
EFAULT
;
return
ret
;
}
extern
asmlinkage
int
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
);
extern
asmlinkage
int
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
);
asmlinkage
long
sys32_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
)
asmlinkage
long
sys32_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
)
...
@@ -3766,19 +3704,6 @@ asmlinkage long sys32_access(const char * filename, u32 mode)
...
@@ -3766,19 +3704,6 @@ asmlinkage long sys32_access(const char * filename, u32 mode)
}
}
extern
asmlinkage
int
sys_clone
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, p7, and regs as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_clone
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_clone
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
asmlinkage
long
sys_creat
(
const
char
*
pathname
,
int
mode
);
extern
asmlinkage
long
sys_creat
(
const
char
*
pathname
,
int
mode
);
/* Note: it is necessary to treat mode as an unsigned int,
/* Note: it is necessary to treat mode as an unsigned int,
...
@@ -3792,19 +3717,6 @@ asmlinkage long sys32_creat(const char * pathname, u32 mode)
...
@@ -3792,19 +3717,6 @@ asmlinkage long sys32_creat(const char * pathname, u32 mode)
}
}
extern
asmlinkage
long
sys_exit
(
int
error_code
);
/* Note: it is necessary to treat error_code as an unsigned int,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_exit
(
u32
error_code
)
{
return
sys_exit
((
int
)
error_code
);
}
extern
asmlinkage
long
sys_wait4
(
pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
,
struct
rusage
*
ru
);
extern
asmlinkage
long
sys_wait4
(
pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
,
struct
rusage
*
ru
);
/* Note: it is necessary to treat pid and options as unsigned ints,
/* Note: it is necessary to treat pid and options as unsigned ints,
...
@@ -3847,19 +3759,6 @@ asmlinkage long sys32_waitpid(u32 pid, unsigned int * stat_addr, u32 options)
...
@@ -3847,19 +3759,6 @@ asmlinkage long sys32_waitpid(u32 pid, unsigned int * stat_addr, u32 options)
}
}
extern
asmlinkage
int
sys_fork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, and p6 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_fork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_fork
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
asmlinkage
long
sys_getgroups
(
int
gidsetsize
,
gid_t
*
grouplist
);
extern
asmlinkage
long
sys_getgroups
(
int
gidsetsize
,
gid_t
*
grouplist
);
/* Note: it is necessary to treat gidsetsize as an unsigned int,
/* Note: it is necessary to treat gidsetsize as an unsigned int,
...
@@ -3978,19 +3877,36 @@ asmlinkage long sys32_nice(u32 increment)
...
@@ -3978,19 +3877,36 @@ asmlinkage long sys32_nice(u32 increment)
return
sys_nice
((
int
)
increment
);
return
sys_nice
((
int
)
increment
);
}
}
/*
extern
asmlinkage
long
sys_open
(
const
char
*
filename
,
int
flags
,
int
mode
);
* This is just a version for 32-bit applications which does
* not force O_LARGEFILE on.
/* Note: it is necessary to treat flags and mode as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
*/
asmlinkage
long
sys32_open
(
const
char
*
filename
,
int
flags
,
int
mode
)
long
sys32_open
(
const
char
*
filename
,
int
flags
,
int
mode
)
{
{
return
sys_open
(
filename
,
(
int
)
flags
,
(
int
)
mode
);
char
*
tmp
;
}
int
fd
,
error
;
tmp
=
getname
(
filename
);
fd
=
PTR_ERR
(
tmp
);
if
(
!
IS_ERR
(
tmp
))
{
fd
=
get_unused_fd
();
if
(
fd
>=
0
)
{
struct
file
*
f
=
filp_open
(
tmp
,
flags
,
mode
);
error
=
PTR_ERR
(
f
);
if
(
IS_ERR
(
f
))
goto
out_error
;
fd_install
(
fd
,
f
);
}
out:
putname
(
tmp
);
}
return
fd
;
out_error:
put_unused_fd
(
fd
);
fd
=
error
;
goto
out
;
}
extern
asmlinkage
long
sys_readlink
(
const
char
*
path
,
char
*
buf
,
int
bufsiz
);
extern
asmlinkage
long
sys_readlink
(
const
char
*
path
,
char
*
buf
,
int
bufsiz
);
...
@@ -4004,20 +3920,6 @@ asmlinkage long sys32_readlink(const char * path, char * buf, u32 bufsiz)
...
@@ -4004,20 +3920,6 @@ asmlinkage long sys32_readlink(const char * path, char * buf, u32 bufsiz)
return
sys_readlink
(
path
,
buf
,
(
int
)
bufsiz
);
return
sys_readlink
(
path
,
buf
,
(
int
)
bufsiz
);
}
}
extern
asmlinkage
long
sys_reboot
(
int
magic1
,
int
magic2
,
unsigned
int
cmd
,
void
*
arg
);
/* Note: it is necessary to treat magic1 and magic2 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_reboot
(
u32
magic1
,
u32
magic2
,
unsigned
int
cmd
,
void
*
arg
)
{
return
sys_reboot
((
int
)
magic1
,
(
int
)
magic2
,
cmd
,
arg
);
}
extern
asmlinkage
long
sys_sched_get_priority_max
(
int
policy
);
extern
asmlinkage
long
sys_sched_get_priority_max
(
int
policy
);
/* Note: it is necessary to treat option as an unsigned int,
/* Note: it is necessary to treat option as an unsigned int,
...
@@ -4174,19 +4076,6 @@ asmlinkage long sys32_ssetmask(u32 newmask)
...
@@ -4174,19 +4076,6 @@ asmlinkage long sys32_ssetmask(u32 newmask)
}
}
extern
asmlinkage
long
sys_swapon
(
const
char
*
specialfile
,
int
swap_flags
);
/* Note: it is necessary to treat swap_flags as an unsigned int,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_swapon
(
const
char
*
specialfile
,
u32
swap_flags
)
{
return
sys_swapon
(
specialfile
,
(
int
)
swap_flags
);
}
extern
asmlinkage
long
sys_syslog
(
int
type
,
char
*
buf
,
int
len
);
extern
asmlinkage
long
sys_syslog
(
int
type
,
char
*
buf
,
int
len
);
/* Note: it is necessary to treat type and len as an unsigned int,
/* Note: it is necessary to treat type and len as an unsigned int,
...
@@ -4226,19 +4115,6 @@ asmlinkage long sys32_umount(char * name, u32 flags)
...
@@ -4226,19 +4115,6 @@ asmlinkage long sys32_umount(char * name, u32 flags)
}
}
extern
asmlinkage
int
sys_vfork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, and p6 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_vfork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_vfork
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
ssize_t
sys_pread64
(
unsigned
int
fd
,
char
*
buf
,
size_t
count
,
extern
ssize_t
sys_pread64
(
unsigned
int
fd
,
char
*
buf
,
size_t
count
,
loff_t
pos
);
loff_t
pos
);
...
@@ -4411,3 +4287,15 @@ asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
...
@@ -4411,3 +4287,15 @@ asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
return
ret
;
return
ret
;
}
}
extern
unsigned
long
sys_mmap
(
unsigned
long
addr
,
size_t
len
,
unsigned
long
prot
,
unsigned
long
flags
,
unsigned
long
fd
,
off_t
offset
);
unsigned
long
sys32_mmap2
(
unsigned
long
addr
,
size_t
len
,
unsigned
long
prot
,
unsigned
long
flags
,
unsigned
long
fd
,
unsigned
long
pgoff
)
{
/* This should remain 12 even if PAGE_SIZE changes */
return
sys_mmap
(
addr
,
len
,
prot
,
flags
,
fd
,
pgoff
<<
12
);
}
include/asm-ppc64/unistd.h
View file @
6c5ace44
...
@@ -235,6 +235,7 @@
...
@@ -235,6 +235,7 @@
#define __NR_sched_getaffinity 223
#define __NR_sched_getaffinity 223
#define __NR_security 224
#define __NR_security 224
#define __NR_tuxcall 225
#define __NR_tuxcall 225
#define __NR_sendfile64 226
#define __NR(n) #n
#define __NR(n) #n
...
...
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