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
11d4e57c
Commit
11d4e57c
authored
Dec 06, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial ppc64 compat support from Stephen Rothwell
parent
580f6887
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
110 additions
and
243 deletions
+110
-243
arch/ppc64/Kconfig
arch/ppc64/Kconfig
+4
-0
arch/ppc64/kernel/binfmt_elf32.c
arch/ppc64/kernel/binfmt_elf32.c
+7
-11
arch/ppc64/kernel/ioctl32.c
arch/ppc64/kernel/ioctl32.c
+4
-8
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+4
-4
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+3
-8
arch/ppc64/kernel/sys32.S
arch/ppc64/kernel/sys32.S
+2
-2
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+59
-203
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+22
-0
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+5
-7
No files found.
arch/ppc64/Kconfig
View file @
11d4e57c
...
...
@@ -33,6 +33,10 @@ config EARLY_PRINTK
bool
default y
config COMPAT
bool
default y
source "init/Kconfig"
...
...
arch/ppc64/kernel/binfmt_elf32.c
View file @
11d4e57c
...
...
@@ -21,11 +21,7 @@
#include <linux/module.h>
#include <linux/config.h>
#include <linux/elfcore.h>
struct
timeval32
{
int
tv_sec
,
tv_usec
;
};
#include <linux/compat.h>
#define elf_prstatus elf_prstatus32
struct
elf_prstatus32
...
...
@@ -38,10 +34,10 @@ struct elf_prstatus32
pid_t
pr_ppid
;
pid_t
pr_pgrp
;
pid_t
pr_sid
;
struct
timeval32
pr_utime
;
/* User time */
struct
timeval32
pr_stime
;
/* System time */
struct
timeval32
pr_cutime
;
/* Cumulative user time */
struct
timeval32
pr_cstime
;
/* Cumulative system time */
struct
compat_timeval
pr_utime
;
/* User time */
struct
compat_timeval
pr_stime
;
/* System time */
struct
compat_timeval
pr_cutime
;
/* Cumulative user time */
struct
compat_timeval
pr_cstime
;
/* Cumulative system time */
elf_gregset_t
pr_reg
;
/* General purpose registers. */
int
pr_fpvalid
;
/* True if math co-processor being used. */
};
...
...
@@ -64,9 +60,9 @@ struct elf_prpsinfo32
#include <linux/time.h>
#define jiffies_to_timeval jiffies_to_
timeval32
#define jiffies_to_timeval jiffies_to_
compat_timeval
static
__inline__
void
jiffies_to_
timeval32
(
unsigned
long
jiffies
,
struct
timeval32
*
value
)
jiffies_to_
compat_timeval
(
unsigned
long
jiffies
,
struct
compat_timeval
*
value
)
{
value
->
tv_usec
=
(
jiffies
%
HZ
)
*
(
1000000L
/
HZ
);
value
->
tv_sec
=
jiffies
/
HZ
;
...
...
arch/ppc64/kernel/ioctl32.c
View file @
11d4e57c
...
...
@@ -22,6 +22,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/smp.h>
...
...
@@ -397,14 +398,9 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
return
err
;
}
struct
timeval32
{
int
tv_sec
;
int
tv_usec
;
};
static
int
do_siocgstamp
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
timeval32
*
up
=
(
struct
timeval32
*
)
arg
;
struct
compat_timeval
*
up
=
(
struct
compat_timeval
*
)
arg
;
struct
timeval
ktv
;
mm_segment_t
old_fs
=
get_fs
();
int
err
;
...
...
@@ -1424,8 +1420,8 @@ struct ppp_option_data32 {
#define PPPIOCSCOMPRESS32 _IOW('t', 77, struct ppp_option_data32)
struct
ppp_idle32
{
__kernel_time_t32
xmit_idle
;
__kernel_time_t32
recv_idle
;
compat_time_t
xmit_idle
;
compat_time_t
recv_idle
;
};
#define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
...
...
arch/ppc64/kernel/misc.S
View file @
11d4e57c
...
...
@@ -538,7 +538,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_alarm
.
llong
.
sys_ni_syscall
/*
old
fstat
syscall
*/
.
llong
.
sys32_pause
.
llong
.
sys32
_utime
/*
30
*/
.
llong
.
compat_sys
_utime
/*
30
*/
.
llong
.
sys_ni_syscall
/*
old
stty
syscall
*/
.
llong
.
sys_ni_syscall
/*
old
gtty
syscall
*/
.
llong
.
sys32_access
...
...
@@ -612,8 +612,8 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_ioperm
.
llong
.
sys32_socketcall
.
llong
.
sys32_syslog
.
llong
.
sys32
_setitimer
.
llong
.
sys32
_getitimer
/*
105
*/
.
llong
.
compat_sys
_setitimer
.
llong
.
compat_sys
_getitimer
/*
105
*/
.
llong
.
sys32_newstat
.
llong
.
sys32_newlstat
.
llong
.
sys32_newfstat
...
...
@@ -670,7 +670,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_sched_get_priority_max
.
llong
.
sys32_sched_get_priority_min
/*
160
*/
.
llong
.
sys32_sched_rr_get_interval
.
llong
.
sys32
_nanosleep
.
llong
.
compat_sys
_nanosleep
.
llong
.
sys32_mremap
.
llong
.
sys_setresuid
.
llong
.
sys_getresuid
/*
165
*/
...
...
arch/ppc64/kernel/signal32.c
View file @
11d4e57c
...
...
@@ -22,6 +22,7 @@
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/elf.h>
#include <linux/compat.h>
#include <asm/ppc32.h>
#include <asm/uaccess.h>
#include <asm/ppcdebug.h>
...
...
@@ -53,11 +54,6 @@
#define MSR_USERCHANGE 0
#endif
struct
timespec32
{
s32
tv_sec
;
s32
tv_nsec
;
};
struct
sigregs32
{
/*
* the gp_regs array is 32 bit representation of the pt_regs
...
...
@@ -635,8 +631,7 @@ long sys32_rt_sigprocmask(u32 how, sigset32_t *set,
extern
long
sys_rt_sigpending
(
sigset_t
*
set
,
size_t
sigsetsize
);
long
sys32_rt_sigpending
(
sigset32_t
*
set
,
__kernel_size_t32
sigsetsize
)
long
sys32_rt_sigpending
(
sigset32_t
*
set
,
compat_size_t
sigsetsize
)
{
sigset_t
s
;
sigset32_t
s32
;
...
...
@@ -708,7 +703,7 @@ extern long sys_rt_sigtimedwait(const sigset_t *uthese,
size_t
sigsetsize
);
long
sys32_rt_sigtimedwait
(
sigset32_t
*
uthese
,
siginfo_t32
*
uinfo
,
struct
timespec32
*
uts
,
__kernel_size_t32
sigsetsize
)
struct
compat_timespec
*
uts
,
compat_size_t
sigsetsize
)
{
sigset_t
s
;
sigset32_t
s32
;
...
...
arch/ppc64/kernel/sys32.S
View file @
11d4e57c
...
...
@@ -134,7 +134,7 @@ _STATIC(do_sys_recv) /* sys_recv(int, void *, size_t, unsigned int) */
lwz
r6
,
12
(
r10
)
b
.
sys_recv
_STATIC
(
do_sys_sendto
)
/
*
sys32_sendto
(
int
,
u32
,
__kernel_size_t32
,
unsigned
int
,
u32
,
int
)
*/
_STATIC
(
do_sys_sendto
)
/
*
sys32_sendto
(
int
,
u32
,
compat_size_t
,
unsigned
int
,
u32
,
int
)
*/
mr
r10
,
r4
lwa
r3
,
0
(
r10
)
lwz
r4
,
4
(
r10
)
...
...
@@ -144,7 +144,7 @@ _STATIC(do_sys_sendto) /* sys32_sendto(int, u32, __kernel_size_t32, unsigned int
lwa
r8
,
20
(
r10
)
b
.
sys32_sendto
_STATIC
(
do_sys_recvfrom
)
/
*
sys32_recvfrom
(
int
,
u32
,
__kernel_size_t32
,
unsigned
int
,
u32
,
u32
)
*/
_STATIC
(
do_sys_recvfrom
)
/
*
sys32_recvfrom
(
int
,
u32
,
compat_size_t
,
unsigned
int
,
u32
,
u32
)
*/
mr
r10
,
r4
lwa
r3
,
0
(
r10
)
lwz
r4
,
4
(
r10
)
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
11d4e57c
This diff is collapsed.
Click to expand it.
include/asm-ppc64/compat.h
0 → 100644
View file @
11d4e57c
#ifndef _ASM_PPC64_COMPAT_H
#define _ASM_PPC64_COMPAT_H
/*
* Architecture specific compatibility types
*/
#include <linux/types.h>
typedef
u32
compat_size_t
;
typedef
s32
compat_ssize_t
;
typedef
s32
compat_time_t
;
struct
compat_timespec
{
compat_time_t
tv_sec
;
s32
tv_nsec
;
};
struct
compat_timeval
{
compat_time_t
tv_sec
;
s32
tv_usec
;
};
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-ppc64/ppc32.h
View file @
11d4e57c
#ifndef _PPC64_PPC32_H
#define _PPC64_PPC32_H
#include <linux/compat.h>
#include <asm/siginfo.h>
#include <asm/signal.h>
...
...
@@ -43,10 +44,7 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
})
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
typedef
unsigned
int
__kernel_size_t32
;
typedef
int
__kernel_ssize_t32
;
typedef
int
__kernel_ptrdiff_t32
;
typedef
int
__kernel_time_t32
;
typedef
int
__kernel_clock_t32
;
typedef
int
__kernel_pid_t32
;
typedef
unsigned
short
__kernel_ipc_pid_t32
;
...
...
@@ -160,7 +158,7 @@ struct sigaction32 {
typedef
struct
sigaltstack_32
{
unsigned
int
ss_sp
;
int
ss_flags
;
__kernel_size_t32
ss_size
;
compat_size_t
ss_size
;
}
stack_32_t
;
struct
flock32
{
...
...
@@ -183,11 +181,11 @@ struct stat32 {
__kernel_off_t32
st_size
;
/* 4 */
__kernel_off_t32
st_blksize
;
/* 4 */
__kernel_off_t32
st_blocks
;
/* 4 */
__kernel_time_t32
st_atime
;
/* 4 */
compat_time_t
st_atime
;
/* 4 */
unsigned
int
__unused1
;
/* 4 */
__kernel_time_t32
st_mtime
;
/* 4 */
compat_time_t
st_mtime
;
/* 4 */
unsigned
int
__unused2
;
/* 4 */
__kernel_time_t32
st_ctime
;
/* 4 */
compat_time_t
st_ctime
;
/* 4 */
unsigned
int
__unused3
;
/* 4 */
unsigned
int
__unused4
[
2
];
/* 2*4 */
};
...
...
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