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
7b732481
Commit
7b732481
authored
Dec 17, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: move sys32_times + sys32_newstat from Stephen Rothwell
parent
9d20493c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
146 deletions
+88
-146
arch/ppc64/kernel/ioctl32.c
arch/ppc64/kernel/ioctl32.c
+8
-4
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+4
-4
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/prom.c
+2
-2
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+32
-95
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+31
-0
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+11
-41
No files found.
arch/ppc64/kernel/ioctl32.c
View file @
7b732481
...
@@ -1722,9 +1722,9 @@ out: if (data)
...
@@ -1722,9 +1722,9 @@ out: if (data)
struct
loop_info32
{
struct
loop_info32
{
int
lo_number
;
/* ioctl r/o */
int
lo_number
;
/* ioctl r/o */
__kernel_dev_t32
lo_device
;
/* ioctl r/o */
compat_dev_t
lo_device
;
/* ioctl r/o */
unsigned
int
lo_inode
;
/* ioctl r/o */
unsigned
int
lo_inode
;
/* ioctl r/o */
__kernel_dev_t32
lo_rdevice
;
/* ioctl r/o */
compat_dev_t
lo_rdevice
;
/* ioctl r/o */
int
lo_offset
;
int
lo_offset
;
int
lo_encrypt_type
;
int
lo_encrypt_type
;
int
lo_encrypt_key_size
;
/* ioctl w/o */
int
lo_encrypt_key_size
;
/* ioctl w/o */
...
@@ -2054,7 +2054,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
...
@@ -2054,7 +2054,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
set_fs
(
old_fs
);
set_fs
(
old_fs
);
if
(
err
>=
0
)
if
(
err
>=
0
)
err
=
put_user
(
kuid
,
(
__kernel_uid_t32
*
)
arg
);
err
=
put_user
(
kuid
,
(
compat_uid_t
*
)
arg
);
return
err
;
return
err
;
}
}
...
@@ -3656,7 +3656,7 @@ struct ioctl_trans {
...
@@ -3656,7 +3656,7 @@ struct ioctl_trans {
#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1,
__kernel_uid_t32
)
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1,
compat_uid_t
)
static
struct
ioctl_trans
ioctl_translations
[]
=
{
static
struct
ioctl_trans
ioctl_translations
[]
=
{
/* List here explicitly which ioctl's need translation,
/* List here explicitly which ioctl's need translation,
...
@@ -3705,6 +3705,7 @@ COMPATIBLE_IOCTL(TIOCSSERIAL),
...
@@ -3705,6 +3705,7 @@ COMPATIBLE_IOCTL(TIOCSSERIAL),
COMPATIBLE_IOCTL
(
TIOCSERGETLSR
),
COMPATIBLE_IOCTL
(
TIOCSERGETLSR
),
COMPATIBLE_IOCTL
(
TIOCSLTC
),
COMPATIBLE_IOCTL
(
TIOCSLTC
),
/* Big F */
/* Big F */
#if 0
COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO),
COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO),
COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO),
COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO),
COMPATIBLE_IOCTL(FBIOPAN_DISPLAY),
COMPATIBLE_IOCTL(FBIOPAN_DISPLAY),
...
@@ -3715,6 +3716,7 @@ COMPATIBLE_IOCTL(FBIOGET_CURSORSTATE),
...
@@ -3715,6 +3716,7 @@ COMPATIBLE_IOCTL(FBIOGET_CURSORSTATE),
COMPATIBLE_IOCTL(FBIOPUT_CURSORSTATE),
COMPATIBLE_IOCTL(FBIOPUT_CURSORSTATE),
COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP),
COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP),
COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP),
COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP),
#endif
#if 0
#if 0
COMPATIBLE_IOCTL(FBIOBLANK),
COMPATIBLE_IOCTL(FBIOBLANK),
#endif
#endif
...
@@ -4391,10 +4393,12 @@ HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl),
...
@@ -4391,10 +4393,12 @@ HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl),
HANDLE_IOCTL
(
PIO_UNIMAP
,
do_unimap_ioctl
),
HANDLE_IOCTL
(
PIO_UNIMAP
,
do_unimap_ioctl
),
HANDLE_IOCTL
(
GIO_UNIMAP
,
do_unimap_ioctl
),
HANDLE_IOCTL
(
GIO_UNIMAP
,
do_unimap_ioctl
),
HANDLE_IOCTL
(
KDFONTOP
,
do_kdfontop_ioctl
),
HANDLE_IOCTL
(
KDFONTOP
,
do_kdfontop_ioctl
),
#if 0
HANDLE_IOCTL(FBIOGET_FSCREENINFO, do_fbioget_fscreeninfo_ioctl),
HANDLE_IOCTL(FBIOGET_FSCREENINFO, do_fbioget_fscreeninfo_ioctl),
HANDLE_IOCTL(FBIOGETCMAP, do_fbiogetcmap_ioctl),
HANDLE_IOCTL(FBIOGETCMAP, do_fbiogetcmap_ioctl),
HANDLE_IOCTL(FBIOPUTCMAP, do_fbioputcmap_ioctl),
HANDLE_IOCTL(FBIOPUTCMAP, do_fbioputcmap_ioctl),
#endif
#endif
#endif
HANDLE_IOCTL
(
EXT2_IOC32_GETFLAGS
,
do_ext2_ioctl
),
HANDLE_IOCTL
(
EXT2_IOC32_GETFLAGS
,
do_ext2_ioctl
),
HANDLE_IOCTL
(
EXT2_IOC32_SETFLAGS
,
do_ext2_ioctl
),
HANDLE_IOCTL
(
EXT2_IOC32_SETFLAGS
,
do_ext2_ioctl
),
HANDLE_IOCTL
(
EXT2_IOC32_GETVERSION
,
do_ext2_ioctl
),
HANDLE_IOCTL
(
EXT2_IOC32_GETVERSION
,
do_ext2_ioctl
),
...
...
arch/ppc64/kernel/misc.S
View file @
7b732481
...
@@ -551,7 +551,7 @@ _GLOBAL(sys_call_table32)
...
@@ -551,7 +551,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_rmdir
/*
40
*/
.
llong
.
sys_rmdir
/*
40
*/
.
llong
.
sys_dup
.
llong
.
sys_dup
.
llong
.
sys_pipe
.
llong
.
sys_pipe
.
llong
.
sys32
_times
.
llong
.
compat_sys
_times
.
llong
.
sys_ni_syscall
/*
old
prof
syscall
*/
.
llong
.
sys_ni_syscall
/*
old
prof
syscall
*/
.
llong
.
sys_brk
/*
45
*/
.
llong
.
sys_brk
/*
45
*/
.
llong
.
sys_setgid
.
llong
.
sys_setgid
...
@@ -614,9 +614,9 @@ _GLOBAL(sys_call_table32)
...
@@ -614,9 +614,9 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_syslog
.
llong
.
sys32_syslog
.
llong
.
compat_sys_setitimer
.
llong
.
compat_sys_setitimer
.
llong
.
compat_sys_getitimer
/*
105
*/
.
llong
.
compat_sys_getitimer
/*
105
*/
.
llong
.
sys32
_newstat
.
llong
.
compat_sys
_newstat
.
llong
.
sys32
_newlstat
.
llong
.
compat_sys
_newlstat
.
llong
.
sys32
_newfstat
.
llong
.
compat_sys
_newfstat
.
llong
.
sys_uname
.
llong
.
sys_uname
.
llong
.
sys_ni_syscall
/*
110
old
iopl
syscall
*/
.
llong
.
sys_ni_syscall
/*
110
old
iopl
syscall
*/
.
llong
.
sys_vhangup
.
llong
.
sys_vhangup
...
...
arch/ppc64/kernel/prom.c
View file @
7b732481
...
@@ -1265,14 +1265,14 @@ check_display(unsigned long mem)
...
@@ -1265,14 +1265,14 @@ check_display(unsigned long mem)
RELOC
(
default_colors
)[
i
*
3
+
2
])
!=
0
)
RELOC
(
default_colors
)[
i
*
3
+
2
])
!=
0
)
break
;
break
;
#ifdef CONFIG_F
B
#ifdef CONFIG_F
RAMEBUFFER_CONSOLE
for
(
i
=
0
;
i
<
LINUX_LOGO_COLORS
;
i
++
)
for
(
i
=
0
;
i
<
LINUX_LOGO_COLORS
;
i
++
)
if
(
prom_set_color
(
ih
,
i
+
32
,
if
(
prom_set_color
(
ih
,
i
+
32
,
RELOC
(
linux_logo_red
)[
i
],
RELOC
(
linux_logo_red
)[
i
],
RELOC
(
linux_logo_green
)[
i
],
RELOC
(
linux_logo_green
)[
i
],
RELOC
(
linux_logo_blue
)[
i
])
!=
0
)
RELOC
(
linux_logo_blue
)[
i
])
!=
0
)
break
;
break
;
#endif
/* CONFIG_F
B
*/
#endif
/* CONFIG_F
RAMEBUFFER_CONSOLE
*/
/*
/*
* If this display is the device that OF is using for stdout,
* If this display is the device that OF is using for stdout,
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
7b732481
...
@@ -300,16 +300,16 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
...
@@ -300,16 +300,16 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
struct
ncp_mount_data32_v3
{
struct
ncp_mount_data32_v3
{
int
version
;
int
version
;
unsigned
int
ncp_fd
;
unsigned
int
ncp_fd
;
__kernel_uid_t32
mounted_uid
;
compat_uid_t
mounted_uid
;
__kernel_pid_t32
wdog_pid
;
compat_pid_t
wdog_pid
;
unsigned
char
mounted_vol
[
NCP_VOLNAME_LEN
+
1
];
unsigned
char
mounted_vol
[
NCP_VOLNAME_LEN
+
1
];
unsigned
int
time_out
;
unsigned
int
time_out
;
unsigned
int
retry_count
;
unsigned
int
retry_count
;
unsigned
int
flags
;
unsigned
int
flags
;
__kernel_uid_t32
uid
;
compat_uid_t
uid
;
__kernel_gid_t32
gid
;
compat_gid_t
gid
;
__kernel_mode_t32
file_mode
;
compat_mode_t
file_mode
;
__kernel_mode_t32
dir_mode
;
compat_mode_t
dir_mode
;
};
};
struct
ncp_mount_data32_v4
{
struct
ncp_mount_data32_v4
{
...
@@ -380,11 +380,11 @@ static void *do_ncp_super_data_conv(void *raw_data)
...
@@ -380,11 +380,11 @@ static void *do_ncp_super_data_conv(void *raw_data)
struct
smb_mount_data32
{
struct
smb_mount_data32
{
int
version
;
int
version
;
__kernel_uid_t32
mounted_uid
;
compat_uid_t
mounted_uid
;
__kernel_uid_t32
uid
;
compat_uid_t
uid
;
__kernel_gid_t32
gid
;
compat_gid_t
gid
;
__kernel_mode_t32
file_mode
;
compat_mode_t
file_mode
;
__kernel_mode_t32
dir_mode
;
compat_mode_t
dir_mode
;
};
};
static
void
*
do_smb_super_data_conv
(
void
*
raw_data
)
static
void
*
do_smb_super_data_conv
(
void
*
raw_data
)
...
@@ -802,10 +802,13 @@ asmlinkage int ppc32_select(u32 n, u32* inp, u32* outp, u32* exp, u32 tvp_x)
...
@@ -802,10 +802,13 @@ asmlinkage int ppc32_select(u32 n, u32* inp, u32* outp, u32* exp, u32 tvp_x)
return
sys32_select
((
int
)
n
,
inp
,
outp
,
exp
,
tvp_x
);
return
sys32_select
((
int
)
n
,
inp
,
outp
,
exp
,
tvp_x
);
}
}
static
int
cp_new_stat32
(
struct
kstat
*
stat
,
struct
stat32
*
statbuf
)
int
cp_compat_stat
(
struct
kstat
*
stat
,
struct
compat_stat
*
statbuf
)
{
{
int
err
;
int
err
;
if
(
stat
->
size
>
MAX_NON_LFS
)
return
-
EOVERFLOW
;
err
=
put_user
(
stat
->
dev
,
&
statbuf
->
st_dev
);
err
=
put_user
(
stat
->
dev
,
&
statbuf
->
st_dev
);
err
|=
put_user
(
stat
->
ino
,
&
statbuf
->
st_ino
);
err
|=
put_user
(
stat
->
ino
,
&
statbuf
->
st_ino
);
err
|=
put_user
(
stat
->
mode
,
&
statbuf
->
st_mode
);
err
|=
put_user
(
stat
->
mode
,
&
statbuf
->
st_mode
);
...
@@ -813,8 +816,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
...
@@ -813,8 +816,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
err
|=
put_user
(
stat
->
uid
,
&
statbuf
->
st_uid
);
err
|=
put_user
(
stat
->
uid
,
&
statbuf
->
st_uid
);
err
|=
put_user
(
stat
->
gid
,
&
statbuf
->
st_gid
);
err
|=
put_user
(
stat
->
gid
,
&
statbuf
->
st_gid
);
err
|=
put_user
(
stat
->
rdev
,
&
statbuf
->
st_rdev
);
err
|=
put_user
(
stat
->
rdev
,
&
statbuf
->
st_rdev
);
if
(
stat
->
size
>
MAX_NON_LFS
)
return
-
EOVERFLOW
;
err
|=
put_user
(
stat
->
size
,
&
statbuf
->
st_size
);
err
|=
put_user
(
stat
->
size
,
&
statbuf
->
st_size
);
err
|=
put_user
(
stat
->
atime
.
tv_sec
,
&
statbuf
->
st_atime
);
err
|=
put_user
(
stat
->
atime
.
tv_sec
,
&
statbuf
->
st_atime
);
err
|=
put_user
(
0
,
&
statbuf
->
__unused1
);
err
|=
put_user
(
0
,
&
statbuf
->
__unused1
);
...
@@ -830,39 +831,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
...
@@ -830,39 +831,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
return
err
;
return
err
;
}
}
asmlinkage
long
sys32_newstat
(
char
*
filename
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_stat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_newlstat
(
char
*
filename
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_lstat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_newfstat
(
unsigned
int
fd
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_fstat
(
fd
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
static
inline
int
put_statfs
(
struct
statfs32
*
ubuf
,
struct
statfs
*
kbuf
)
static
inline
int
put_statfs
(
struct
statfs32
*
ubuf
,
struct
statfs
*
kbuf
)
{
{
int
err
;
int
err
;
...
@@ -1492,27 +1460,27 @@ struct nfsctl_client32 {
...
@@ -1492,27 +1460,27 @@ struct nfsctl_client32 {
struct
nfsctl_export32
{
struct
nfsctl_export32
{
s8
ex32_client
[
NFSCLNT_IDMAX
+
1
];
s8
ex32_client
[
NFSCLNT_IDMAX
+
1
];
s8
ex32_path
[
NFS_MAXPATHLEN
+
1
];
s8
ex32_path
[
NFS_MAXPATHLEN
+
1
];
__kernel_dev_t32
ex32_dev
;
compat_dev_t
ex32_dev
;
__kernel_ino_t32
ex32_ino
;
compat_ino_t
ex32_ino
;
s32
ex32_flags
;
s32
ex32_flags
;
__kernel_uid_t32
ex32_anon_uid
;
compat_uid_t
ex32_anon_uid
;
__kernel_gid_t32
ex32_anon_gid
;
compat_gid_t
ex32_anon_gid
;
};
};
struct
nfsctl_uidmap32
{
struct
nfsctl_uidmap32
{
u32
ug32_ident
;
/* char * */
u32
ug32_ident
;
/* char * */
__kernel_uid_t32
ug32_uidbase
;
compat_uid_t
ug32_uidbase
;
s32
ug32_uidlen
;
s32
ug32_uidlen
;
u32
ug32_udimap
;
/* uid_t * */
u32
ug32_udimap
;
/* uid_t * */
__kernel_uid_t32
ug32_gidbase
;
compat_uid_t
ug32_gidbase
;
s32
ug32_gidlen
;
s32
ug32_gidlen
;
u32
ug32_gdimap
;
/* gid_t * */
u32
ug32_gdimap
;
/* gid_t * */
};
};
struct
nfsctl_fhparm32
{
struct
nfsctl_fhparm32
{
struct
sockaddr
gf32_addr
;
struct
sockaddr
gf32_addr
;
__kernel_dev_t32
gf32_dev
;
compat_dev_t
gf32_dev
;
__kernel_ino_t32
gf32_ino
;
compat_ino_t
gf32_ino
;
s32
gf32_version
;
s32
gf32_version
;
};
};
...
@@ -1645,7 +1613,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -1645,7 +1613,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
return
-
ENOMEM
;
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_uidlen
;
i
++
)
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_uidlen
;
i
++
)
err
|=
__get_user
(
karg
->
ca_umap
.
ug_udimap
[
i
],
err
|=
__get_user
(
karg
->
ca_umap
.
ug_udimap
[
i
],
&
(((
__kernel_uid_t32
*
)
A
(
uaddr
))[
i
]));
&
(((
compat_uid_t
*
)
A
(
uaddr
))[
i
]));
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gidbase
,
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gidbase
,
&
arg32
->
ca32_umap
.
ug32_gidbase
);
&
arg32
->
ca32_umap
.
ug32_gidbase
);
err
|=
__get_user
(
karg
->
ca_umap
.
ug_uidlen
,
err
|=
__get_user
(
karg
->
ca_umap
.
ug_uidlen
,
...
@@ -1659,7 +1627,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -1659,7 +1627,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
return
-
ENOMEM
;
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_gidlen
;
i
++
)
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_gidlen
;
i
++
)
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
&
(((
__kernel_gid_t32
*
)
A
(
uaddr
))[
i
]));
&
(((
compat_gid_t
*
)
A
(
uaddr
))[
i
]));
return
err
;
return
err
;
}
}
...
@@ -2076,37 +2044,6 @@ asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *t
...
@@ -2076,37 +2044,6 @@ asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *t
}
}
struct
tms32
{
__kernel_clock_t32
tms_utime
;
__kernel_clock_t32
tms_stime
;
__kernel_clock_t32
tms_cutime
;
__kernel_clock_t32
tms_cstime
;
};
extern
asmlinkage
long
sys_times
(
struct
tms
*
tbuf
);
asmlinkage
long
sys32_times
(
struct
tms32
*
tbuf
)
{
struct
tms
t
;
long
ret
;
mm_segment_t
old_fs
=
get_fs
();
int
err
;
set_fs
(
KERNEL_DS
);
ret
=
sys_times
(
tbuf
?
&
t
:
NULL
);
set_fs
(
old_fs
);
if
(
tbuf
)
{
err
=
put_user
(
t
.
tms_utime
,
&
tbuf
->
tms_utime
);
err
|=
__put_user
(
t
.
tms_stime
,
&
tbuf
->
tms_stime
);
err
|=
__put_user
(
t
.
tms_cutime
,
&
tbuf
->
tms_cutime
);
err
|=
__put_user
(
t
.
tms_cstime
,
&
tbuf
->
tms_cstime
);
if
(
err
)
ret
=
-
EFAULT
;
}
return
ret
;
}
struct
msgbuf32
{
s32
mtype
;
char
mtext
[
1
];
};
struct
msgbuf32
{
s32
mtype
;
char
mtext
[
1
];
};
struct
semid_ds32
{
struct
semid_ds32
{
...
@@ -2159,8 +2096,8 @@ struct msqid64_ds32 {
...
@@ -2159,8 +2096,8 @@ struct msqid64_ds32 {
unsigned
int
msg_cbytes
;
unsigned
int
msg_cbytes
;
unsigned
int
msg_qnum
;
unsigned
int
msg_qnum
;
unsigned
int
msg_qbytes
;
unsigned
int
msg_qbytes
;
__kernel_pid_t32
msg_lspid
;
compat_pid_t
msg_lspid
;
__kernel_pid_t32
msg_lrpid
;
compat_pid_t
msg_lrpid
;
unsigned
int
__unused4
;
unsigned
int
__unused4
;
unsigned
int
__unused5
;
unsigned
int
__unused5
;
};
};
...
@@ -2189,8 +2126,8 @@ struct shmid64_ds32 {
...
@@ -2189,8 +2126,8 @@ struct shmid64_ds32 {
compat_time_t
shm_ctime
;
compat_time_t
shm_ctime
;
unsigned
int
__unused4
;
unsigned
int
__unused4
;
compat_size_t
shm_segsz
;
compat_size_t
shm_segsz
;
__kernel_pid_t32
shm_cpid
;
compat_pid_t
shm_cpid
;
__kernel_pid_t32
shm_lpid
;
compat_pid_t
shm_lpid
;
unsigned
int
shm_nattch
;
unsigned
int
shm_nattch
;
unsigned
int
__unused5
;
unsigned
int
__unused5
;
unsigned
int
__unused6
;
unsigned
int
__unused6
;
...
@@ -2712,7 +2649,7 @@ extern asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t* offset, siz
...
@@ -2712,7 +2649,7 @@ extern asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t* offset, siz
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* 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.
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
*/
asmlinkage
long
sys32_sendfile
(
u32
out_fd
,
u32
in_fd
,
__kernel_off_t32
*
offset
,
u32
count
)
asmlinkage
long
sys32_sendfile
(
u32
out_fd
,
u32
in_fd
,
compat_off_t
*
offset
,
u32
count
)
{
{
mm_segment_t
old_fs
=
get_fs
();
mm_segment_t
old_fs
=
get_fs
();
int
ret
;
int
ret
;
...
@@ -4296,7 +4233,7 @@ asmlinkage long sys32_time(compat_time_t* tloc)
...
@@ -4296,7 +4233,7 @@ asmlinkage long sys32_time(compat_time_t* tloc)
extern
asmlinkage
int
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
extern
asmlinkage
int
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_setaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
asmlinkage
int
sys32_sched_setaffinity
(
compat_pid_t
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
u32
*
user_mask_ptr
)
{
{
unsigned
long
kernel_mask
;
unsigned
long
kernel_mask
;
...
@@ -4320,7 +4257,7 @@ asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
...
@@ -4320,7 +4257,7 @@ asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
extern
asmlinkage
int
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
extern
asmlinkage
int
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_getaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
asmlinkage
int
sys32_sched_getaffinity
(
compat_pid_t
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
u32
*
user_mask_ptr
)
{
{
unsigned
long
kernel_mask
;
unsigned
long
kernel_mask
;
...
...
include/asm-ppc64/compat.h
View file @
7b732481
...
@@ -5,9 +5,20 @@
...
@@ -5,9 +5,20 @@
*/
*/
#include <linux/types.h>
#include <linux/types.h>
#define COMPAT_USER_HZ 100
typedef
u32
compat_size_t
;
typedef
u32
compat_size_t
;
typedef
s32
compat_ssize_t
;
typedef
s32
compat_ssize_t
;
typedef
s32
compat_time_t
;
typedef
s32
compat_time_t
;
typedef
s32
compat_clock_t
;
typedef
s32
compat_pid_t
;
typedef
u32
compat_uid_t
;
typedef
u32
compat_gid_t
;
typedef
u32
compat_mode_t
;
typedef
u32
compat_ino_t
;
typedef
u32
compat_dev_t
;
typedef
s32
compat_off_t
;
typedef
s16
compat_nlink_t
;
struct
compat_timespec
{
struct
compat_timespec
{
compat_time_t
tv_sec
;
compat_time_t
tv_sec
;
...
@@ -19,4 +30,24 @@ struct compat_timeval {
...
@@ -19,4 +30,24 @@ struct compat_timeval {
s32
tv_usec
;
s32
tv_usec
;
};
};
struct
compat_stat
{
compat_dev_t
st_dev
;
compat_ino_t
st_ino
;
compat_mode_t
st_mode
;
compat_nlink_t
st_nlink
;
compat_uid_t
st_uid
;
compat_gid_t
st_gid
;
compat_dev_t
st_rdev
;
compat_off_t
st_size
;
compat_off_t
st_blksize
;
compat_off_t
st_blocks
;
compat_time_t
st_atime
;
u32
__unused1
;
compat_time_t
st_mtime
;
u32
__unused2
;
compat_time_t
st_ctime
;
u32
__unused3
;
u32
__unused4
[
2
];
};
#endif
/* _ASM_PPC64_COMPAT_H */
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-ppc64/ppc32.h
View file @
7b732481
...
@@ -44,19 +44,9 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
...
@@ -44,19 +44,9 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
})
})
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
typedef
int
__kernel_ptrdiff_t32
;
typedef
int
__kernel_clock_t32
;
typedef
int
__kernel_pid_t32
;
typedef
unsigned
short
__kernel_ipc_pid_t32
;
typedef
unsigned
short
__kernel_ipc_pid_t32
;
typedef
unsigned
int
__kernel_uid_t32
;
typedef
unsigned
int
__kernel_gid_t32
;
typedef
unsigned
int
__kernel_dev_t32
;
typedef
unsigned
int
__kernel_ino_t32
;
typedef
unsigned
int
__kernel_mode_t32
;
typedef
unsigned
int
__kernel_umode_t32
;
typedef
unsigned
int
__kernel_umode_t32
;
typedef
short
__kernel_nlink_t32
;
typedef
int
__kernel_daddr_t32
;
typedef
int
__kernel_daddr_t32
;
typedef
int
__kernel_off_t32
;
typedef
unsigned
int
__kernel_caddr_t32
;
typedef
unsigned
int
__kernel_caddr_t32
;
typedef
int
__kernel_loff_t32
;
typedef
int
__kernel_loff_t32
;
...
@@ -88,8 +78,8 @@ typedef struct siginfo32 {
...
@@ -88,8 +78,8 @@ typedef struct siginfo32 {
/* kill() */
/* kill() */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* sender's pid */
compat_pid_t
_pid
;
/* sender's pid */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
}
_kill
;
}
_kill
;
/* POSIX.1b timers */
/* POSIX.1b timers */
...
@@ -100,18 +90,18 @@ typedef struct siginfo32 {
...
@@ -100,18 +90,18 @@ typedef struct siginfo32 {
/* POSIX.1b signals */
/* POSIX.1b signals */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* sender's pid */
compat_pid_t
_pid
;
/* sender's pid */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
sigval_t32
_sigval
;
sigval_t32
_sigval
;
}
_rt
;
}
_rt
;
/* SIGCHLD */
/* SIGCHLD */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* which child */
compat_pid_t
_pid
;
/* which child */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
int
_status
;
/* exit code */
int
_status
;
/* exit code */
__kernel_clock_t32
_utime
;
compat_clock_t
_utime
;
__kernel_clock_t32
_stime
;
compat_clock_t
_stime
;
}
_sigchld
;
}
_sigchld
;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
...
@@ -164,32 +154,12 @@ typedef struct sigaltstack_32 {
...
@@ -164,32 +154,12 @@ typedef struct sigaltstack_32 {
struct
flock32
{
struct
flock32
{
short
l_type
;
short
l_type
;
short
l_whence
;
short
l_whence
;
__kernel_off_t32
l_start
;
compat_off_t
l_start
;
__kernel_off_t32
l_len
;
compat_off_t
l_len
;
__kernel_pid_t32
l_pid
;
compat_pid_t
l_pid
;
short
__unused
;
short
__unused
;
};
};
struct
stat32
{
__kernel_dev_t32
st_dev
;
/* 2 */
__kernel_ino_t32
st_ino
;
/* 4 */
__kernel_mode_t32
st_mode
;
/* 2 */
short
st_nlink
;
/* 2 */
__kernel_uid_t32
st_uid
;
/* 2 */
__kernel_gid_t32
st_gid
;
/* 2 */
__kernel_dev_t32
st_rdev
;
/* 2 */
__kernel_off_t32
st_size
;
/* 4 */
__kernel_off_t32
st_blksize
;
/* 4 */
__kernel_off_t32
st_blocks
;
/* 4 */
compat_time_t
st_atime
;
/* 4 */
unsigned
int
__unused1
;
/* 4 */
compat_time_t
st_mtime
;
/* 4 */
unsigned
int
__unused2
;
/* 4 */
compat_time_t
st_ctime
;
/* 4 */
unsigned
int
__unused3
;
/* 4 */
unsigned
int
__unused4
[
2
];
/* 2*4 */
};
struct
sigcontext32
{
struct
sigcontext32
{
unsigned
int
_unused
[
4
];
unsigned
int
_unused
[
4
];
int
signal
;
int
signal
;
...
...
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