Commit 8e5cae4e authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-dj.bkbits.net/agpgart

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 1f46ead5 c73e84f3
......@@ -92,6 +92,11 @@ config S390_SUPPORT
(and some other stuff like libraries and such) is needed for
executing 31 bit applications. It is safe to say "Y".
config COMPAT
bool
depends on S390_SUPPORT
default y
config BINFMT_ELF32
tristate "Kernel support for 31 bit ELF binaries"
depends on S390_SUPPORT
......
......@@ -115,14 +115,10 @@ typedef s390_regs32 elf_gregset_t;
#include <linux/config.h>
#include <linux/elfcore.h>
#include <linux/binfmts.h>
#include <linux/compat.h>
int setup_arg_pages32(struct linux_binprm *bprm);
struct timeval32
{
int tv_sec, tv_usec;
};
#define elf_prstatus elf_prstatus32
struct elf_prstatus32
{
......@@ -134,10 +130,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; /* GP registers */
int pr_fpvalid; /* True if math co-processor being used. */
};
......
......@@ -421,7 +421,7 @@ sys_call_table:
.long SYSCALL(sys_alarm,sys32_alarm_wrapper)
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old fstat syscall */
.long SYSCALL(sys_pause,sys32_pause)
.long SYSCALL(sys_utime,sys32_utime_wrapper) /* 30 */
.long SYSCALL(sys_utime,compat_sys_utime_wrapper) /* 30 */
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old stty syscall */
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old gtty syscall */
.long SYSCALL(sys_access,sys32_access_wrapper)
......@@ -434,7 +434,7 @@ sys_call_table:
.long SYSCALL(sys_rmdir,sys32_rmdir_wrapper) /* 40 */
.long SYSCALL(sys_dup,sys32_dup_wrapper)
.long SYSCALL(sys_pipe,sys32_pipe_wrapper)
.long SYSCALL(sys_times,sys32_times_wrapper)
.long SYSCALL(sys_times,compat_sys_times_wrapper)
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old prof syscall */
.long SYSCALL(sys_brk,sys32_brk_wrapper) /* 45 */
.long SYSCALL(sys_ni_syscall,sys32_setgid16) /* old setgid16 syscall*/
......@@ -495,11 +495,11 @@ sys_call_table:
.long SYSCALL(sys_ni_syscall,sys_ni_syscall)
.long SYSCALL(sys_socketcall,sys32_socketcall_wrapper)
.long SYSCALL(sys_syslog,sys32_syslog_wrapper)
.long SYSCALL(sys_setitimer,sys32_setitimer_wrapper)
.long SYSCALL(sys_getitimer,sys32_getitimer_wrapper) /* 105 */
.long SYSCALL(sys_newstat,sys32_newstat_wrapper)
.long SYSCALL(sys_newlstat,sys32_newlstat_wrapper)
.long SYSCALL(sys_newfstat,sys32_newfstat_wrapper)
.long SYSCALL(sys_setitimer,compat_sys_setitimer_wrapper)
.long SYSCALL(sys_getitimer,compat_sys_getitimer_wrapper) /* 105 */
.long SYSCALL(sys_newstat,compat_sys_newstat_wrapper)
.long SYSCALL(sys_newlstat,compat_sys_newlstat_wrapper)
.long SYSCALL(sys_newfstat,compat_sys_newfstat_wrapper)
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old uname syscall */
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* iopl for i386 */
.long SYSCALL(sys_vhangup,sys_vhangup)
......@@ -553,7 +553,7 @@ sys_call_table:
.long SYSCALL(sys_sched_get_priority_max,sys32_sched_get_priority_max_wrapper)
.long SYSCALL(sys_sched_get_priority_min,sys32_sched_get_priority_min_wrapper)
.long SYSCALL(sys_sched_rr_get_interval,sys32_sched_rr_get_interval_wrapper)
.long SYSCALL(sys_nanosleep,sys32_nanosleep_wrapper)
.long SYSCALL(sys_nanosleep,compat_sys_nanosleep_wrapper)
.long SYSCALL(sys_mremap,sys32_mremap_wrapper)
.long SYSCALL(sys_ni_syscall,sys32_setresuid16_wrapper) /* old setresuid16 syscall */
.long SYSCALL(sys_ni_syscall,sys32_getresuid16_wrapper) /* old getresuid16 syscall */
......
......@@ -12,6 +12,7 @@
*/
#include <linux/types.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/sched.h>
......@@ -70,11 +71,6 @@ static inline int hd_geometry_ioctl(unsigned int fd, unsigned int cmd, unsigned
return ret;
}
struct timeval32 {
int tv_sec;
int tv_usec;
};
#define EXT2_IOC32_GETFLAGS _IOR('f', 1, int)
#define EXT2_IOC32_SETFLAGS _IOW('f', 2, int)
#define EXT2_IOC32_GETVERSION _IOR('v', 1, int)
......@@ -383,9 +379,9 @@ static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
struct loop_info32 {
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 */
__kernel_dev_t32 lo_rdevice; /* ioctl r/o */
compat_dev_t lo_rdevice; /* ioctl r/o */
int lo_offset;
int lo_encrypt_type;
int lo_encrypt_key_size; /* ioctl w/o */
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
#define _ASM_S390X_S390_H
#include <linux/config.h>
#include <linux/compat.h>
#include <linux/socket.h>
#include <linux/nfs_fs.h>
#include <linux/sunrpc/svc.h>
......@@ -15,26 +16,6 @@
((unsigned long)(__x))
/* Now 32bit compatibility types */
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;
typedef unsigned short __kernel_uid_t32;
typedef unsigned short __kernel_gid_t32;
typedef unsigned short __kernel_dev_t32;
typedef unsigned int __kernel_ino_t32;
typedef unsigned short __kernel_mode_t32;
typedef unsigned short __kernel_umode_t32;
typedef short __kernel_nlink_t32;
typedef int __kernel_daddr_t32;
typedef int __kernel_off_t32;
typedef unsigned int __kernel_caddr_t32;
typedef long __kernel_loff_t32;
typedef __kernel_fsid_t __kernel_fsid_t32;
struct ipc_kludge_32 {
__u32 msgp; /* pointer */
__s32 msgtyp;
......@@ -47,35 +28,12 @@ struct ipc_kludge_32 {
struct flock32 {
short l_type;
short l_whence;
__kernel_off_t32 l_start;
__kernel_off_t32 l_len;
__kernel_pid_t32 l_pid;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
short __unused;
};
struct stat32 {
unsigned short st_dev;
unsigned short __pad1;
__u32 st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned short st_rdev;
unsigned short __pad2;
__u32 st_size;
__u32 st_blksize;
__u32 st_blocks;
__u32 st_atime;
__u32 __unused1;
__u32 st_mtime;
__u32 __unused2;
__u32 st_ctime;
__u32 __unused3;
__u32 __unused4;
__u32 __unused5;
};
struct statfs32 {
__s32 f_type;
__s32 f_bsize;
......@@ -141,8 +99,8 @@ typedef struct siginfo32 {
pid_t _pid; /* which child */
uid_t _uid; /* sender's uid */
int _status;/* exit code */
__kernel_clock_t32 _utime;
__kernel_clock_t32 _stime;
compat_clock_t _utime;
compat_clock_t _stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
......@@ -253,7 +211,7 @@ struct sigaction32 {
typedef struct {
__u32 ss_sp; /* pointer */
int ss_flags;
__kernel_size_t32 ss_size;
compat_size_t ss_size;
} stack_t32;
/* asm/ucontext.h */
......
......@@ -130,11 +130,11 @@ sys32_alarm_wrapper:
#sys32_pause_wrapper # void
.globl sys32_utime_wrapper
sys32_utime_wrapper:
.globl compat_sys_utime_wrapper
compat_sys_utime_wrapper:
llgtr %r2,%r2 # char *
llgtr %r3,%r3 # struct utimbuf_emu31 *
jg sys32_utime # branch to system call
llgtr %r3,%r3 # struct compat_utimbuf *
jg compat_sys_utime # branch to system call
.globl sys32_access_wrapper
sys32_access_wrapper:
......@@ -182,10 +182,10 @@ sys32_pipe_wrapper:
llgtr %r2,%r2 # u32 *
jg sys_pipe # branch to system call
.globl sys32_times_wrapper
sys32_times_wrapper:
llgtr %r2,%r2 # struct tms_emu31 *
jg sys32_times # branch to system call
.globl compat_sys_times_wrapper
compat_sys_times_wrapper:
llgtr %r2,%r2 # struct compat_tms *
jg compat_sys_times # branch to system call
.globl sys32_brk_wrapper
sys32_brk_wrapper:
......@@ -465,36 +465,36 @@ sys32_syslog_wrapper:
lgfr %r4,%r4 # int
jg sys_syslog # branch to system call
.globl sys32_setitimer_wrapper
sys32_setitimer_wrapper:
.globl compat_sys_setitimer_wrapper
compat_sys_setitimer_wrapper:
lgfr %r2,%r2 # int
llgtr %r3,%r3 # struct itimerval_emu31 *
llgtr %r4,%r4 # struct itimerval_emu31 *
jg sys32_setitimer # branch to system call
jg compat_sys_setitimer # branch to system call
.globl sys32_getitimer_wrapper
sys32_getitimer_wrapper:
.globl compat_sys_getitimer_wrapper
compat_sys_getitimer_wrapper:
lgfr %r2,%r2 # int
llgtr %r3,%r3 # struct itimerval_emu31 *
jg sys32_getitimer # branch to system call
jg compat_sys_getitimer # branch to system call
.globl sys32_newstat_wrapper
sys32_newstat_wrapper:
.globl compat_sys_newstat_wrapper
compat_sys_newstat_wrapper:
llgtr %r2,%r2 # char *
llgtr %r3,%r3 # struct stat_emu31 *
jg sys32_newstat # branch to system call
jg compat_sys_newstat # branch to system call
.globl sys32_newlstat_wrapper
sys32_newlstat_wrapper:
.globl compat_sys_newlstat_wrapper
compat_sys_newlstat_wrapper:
llgtr %r2,%r2 # char *
llgtr %r3,%r3 # struct stat_emu31 *
jg sys32_newlstat # branch to system call
jg compat_sys_newlstat # branch to system call
.globl sys32_newfstat_wrapper
sys32_newfstat_wrapper:
.globl compat_sys_newfstat_wrapper
compat_sys_newfstat_wrapper:
llgfr %r2,%r2 # unsigned int
llgtr %r3,%r3 # struct stat_emu31 *
jg sys32_newfstat # branch to system call
jg compat_sys_newfstat # branch to system call
#sys32_vhangup_wrapper # void
......@@ -743,14 +743,14 @@ sys32_sched_get_priority_min_wrapper:
.globl sys32_sched_rr_get_interval_wrapper
sys32_sched_rr_get_interval_wrapper:
lgfr %r2,%r2 # pid_t
llgtr %r3,%r3 # struct timespec_emu31 *
llgtr %r3,%r3 # struct compat_timespec *
jg sys32_sched_rr_get_interval # branch to system call
.globl sys32_nanosleep_wrapper
sys32_nanosleep_wrapper:
llgtr %r2,%r2 # struct timespec_emu31 *
llgtr %r3,%r3 # struct timespec_emu31 *
jg sys32_nanosleep # branch to system call
.globl compat_sys_nanosleep_wrapper
compat_sys_nanosleep_wrapper:
llgtr %r2,%r2 # struct compat_timespec *
llgtr %r3,%r3 # struct compat_timespec *
jg compat_sys_nanosleep # branch to system call
.globl sys32_mremap_wrapper
sys32_mremap_wrapper:
......@@ -839,7 +839,7 @@ sys32_rt_sigpending_wrapper:
sys32_rt_sigtimedwait_wrapper:
llgtr %r2,%r2 # const sigset_emu31_t *
llgtr %r3,%r3 # siginfo_emu31_t *
llgtr %r4,%r4 # const struct timespec_emu31 *
llgtr %r4,%r4 # const struct compat_timespec *
llgfr %r5,%r5 # size_t
jg sys32_rt_sigtimedwait # branch to system call
......
......@@ -103,7 +103,7 @@ static struct quota_format_type *find_quota_format(int id)
lock_kernel();
for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
if (actqf && !try_module_get:(actqf->qf_owner))
if (actqf && !try_module_get(actqf->qf_owner))
actqf = NULL;
unlock_kernel();
return actqf;
......
#ifndef _ASM_S390X_COMPAT_H
#define _ASM_S390X_COMPAT_H
/*
* Architecture specific compatibility types
*/
#include <linux/types.h>
#define COMPAT_USER_HZ 100
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u16 compat_uid_t;
typedef u16 compat_gid_t;
typedef u16 compat_mode_t;
typedef u32 compat_ino_t;
typedef u16 compat_dev_t;
typedef s32 compat_off_t;
typedef s64 compat_loff_t;
typedef u16 compat_nlink_t;
typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t;
struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};
struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};
struct compat_stat {
compat_dev_t st_dev;
u16 __pad1;
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;
u16 __pad2;
u32 st_size;
u32 st_blksize;
u32 st_blocks;
u32 st_atime;
u32 __unused1;
u32 st_mtime;
u32 __unused2;
u32 st_ctime;
u32 __unused3;
u32 __unused4;
u32 __unused5;
};
#endif /* _ASM_S390X_COMPAT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment