summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/ppc64/kernel/sys_ppc32.c8
-rw-r--r--arch/ppc64/kernel/syscalls.c2
-rw-r--r--arch/ppc64/mm/extable.c4
-rw-r--r--include/asm-ppc64/ipc.h6
-rw-r--r--include/asm-ppc64/posix_types.h9
-rw-r--r--include/asm-ppc64/ppc32.h54
-rw-r--r--include/asm-ppc64/processor.h2
-rw-r--r--include/asm-ppc64/sigcontext.h1
-rw-r--r--include/asm-ppc64/siginfo.h3
-rw-r--r--include/asm-ppc64/stat.h3
10 files changed, 45 insertions, 47 deletions
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
index f2ab8459f35d..e1f23888319c 100644
--- a/arch/ppc64/kernel/sys_ppc32.c
+++ b/arch/ppc64/kernel/sys_ppc32.c
@@ -2408,14 +2408,14 @@ do_sys32_msgrcv(int first, int second, int msgtyp, int third,
return -EINVAL;
if (!version) {
- struct ipc_kludge *uipck = (struct ipc_kludge *)uptr;
- struct ipc_kludge ipck;
+ struct ipc_kludge_32 *uipck = (struct ipc_kludge_32 *)uptr;
+ struct ipc_kludge_32 ipck;
err = -EINVAL;
if (!uptr)
goto out;
err = -EFAULT;
- if (copy_from_user(&ipck, uipck, sizeof(struct ipc_kludge)))
+ if (copy_from_user(&ipck, uipck, sizeof(struct ipc_kludge_32)))
goto out;
uptr = (void *)A(ipck.msgp);
msgtyp = ipck.msgtyp;
@@ -2559,7 +2559,7 @@ do_sys32_shmat(int first, int second, int third, int version, void *uptr)
static int
do_sys32_shmctl(int first, int second, void *uptr)
{
- int err = -EFAULT, err2;
+ int err = -EINVAL, err2;
mm_segment_t old_fs;
switch (second & (~IPC_64)) {
diff --git a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c
index 84936c897540..2e0296d0eb25 100644
--- a/arch/ppc64/kernel/syscalls.c
+++ b/arch/ppc64/kernel/syscalls.c
@@ -104,7 +104,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
(struct ipc_kludge *) ptr,
sizeof (tmp))))
break;
- ret = sys_msgrcv (first, (struct msgbuf *)(unsigned long)tmp.msgp,
+ ret = sys_msgrcv (first, (struct msgbuf *)tmp.msgp,
second, tmp.msgtyp, third);
break;
}
diff --git a/arch/ppc64/mm/extable.c b/arch/ppc64/mm/extable.c
index cfaf254bcaee..90e343b3b7cf 100644
--- a/arch/ppc64/mm/extable.c
+++ b/arch/ppc64/mm/extable.c
@@ -62,9 +62,9 @@ search_one_table(const struct exception_table_entry *first,
mid = (last - first) / 2 + first;
diff = mid->insn - value;
- if (diff == 0) {
+ if (diff == 0)
return mid->fixup;
- } else if (diff < 0)
+ else if (diff < 0)
first = mid+1;
else
last = mid-1;
diff --git a/include/asm-ppc64/ipc.h b/include/asm-ppc64/ipc.h
index 2fb2c4d4ccbb..f4e1841af35d 100644
--- a/include/asm-ppc64/ipc.h
+++ b/include/asm-ppc64/ipc.h
@@ -4,7 +4,7 @@
/*
* These are used to wrap system calls on PowerPC.
*
- * See arch/ppc/kernel/syscalls.c for ugly details..
+ * See arch/ppc64/kernel/syscalls.c for ugly details..
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -12,8 +12,8 @@
* 2 of the License, or (at your option) any later version.
*/
struct ipc_kludge {
- u32 msgp;
- s32 msgtyp;
+ struct msgbuf *msgp;
+ long msgtyp;
};
#define SEMOP 1
diff --git a/include/asm-ppc64/posix_types.h b/include/asm-ppc64/posix_types.h
index 03101116097f..eb84e2a478b2 100644
--- a/include/asm-ppc64/posix_types.h
+++ b/include/asm-ppc64/posix_types.h
@@ -11,19 +11,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#if 0
-# define DRENG_TYPES
-#endif
-#ifdef DRENG_TYPES
typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned long __kernel_nlink_t;
-#else
-typedef unsigned int __kernel_dev_t;
-typedef unsigned int __kernel_ino_t;
-typedef unsigned int __kernel_nlink_t;
-#endif
typedef unsigned int __kernel_mode_t;
typedef long __kernel_off_t;
typedef long long __kernel_loff_t;
diff --git a/include/asm-ppc64/ppc32.h b/include/asm-ppc64/ppc32.h
index 690b36164024..2f84579b2b4c 100644
--- a/include/asm-ppc64/ppc32.h
+++ b/include/asm-ppc64/ppc32.h
@@ -43,25 +43,24 @@ 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;
-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 short __kernel_nlink_t32;
-typedef int __kernel_daddr_t32;
-typedef int __kernel_off_t32;
-typedef unsigned int __kernel_caddr_t32;
-typedef int __kernel_loff_t32;
-/* typedef __kernel_fsid_t __kernel_fsid_t32; */
+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 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 short __kernel_nlink_t32;
+typedef int __kernel_daddr_t32;
+typedef int __kernel_off_t32;
+typedef unsigned int __kernel_caddr_t32;
+typedef int __kernel_loff_t32;
struct statfs32 {
int f_type;
@@ -87,12 +86,12 @@ typedef struct siginfo32 {
int si_code;
union {
- int _pad[SI_PAD_SIZE];
+ int _pad[SI_PAD_SIZE32];
/* kill() */
struct {
__kernel_pid_t32 _pid; /* sender's pid */
- unsigned int _uid; /* sender's uid */
+ __kernel_uid_t32 _uid; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -104,14 +103,14 @@ typedef struct siginfo32 {
/* POSIX.1b signals */
struct {
__kernel_pid_t32 _pid; /* sender's pid */
- unsigned int _uid; /* sender's uid */
+ __kernel_uid_t32 _uid; /* sender's uid */
sigval_t32 _sigval;
} _rt;
/* SIGCHLD */
struct {
__kernel_pid_t32 _pid; /* which child */
- unsigned int _uid; /* sender's uid */
+ __kernel_uid_t32 _uid; /* sender's uid */
int _status; /* exit code */
__kernel_clock_t32 _utime;
__kernel_clock_t32 _stime;
@@ -119,7 +118,7 @@ typedef struct siginfo32 {
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
struct {
- u32 _addr; /* faulting insn/memory ref. */
+ unsigned int _addr; /* faulting insn/memory ref. */
int _trapno;
} _sigfault;
@@ -153,8 +152,7 @@ typedef struct {
} sigset32_t;
struct sigaction32 {
- unsigned int sa_handler; /* Really a pointer, but need to deal
- with 32 bits */
+ unsigned int sa_handler; /* Really a pointer, but need to deal with 32 bits */
unsigned int sa_flags;
unsigned int sa_restorer; /* Another 32 bit pointer */
sigset32_t sa_mask; /* A 32 bit mask */
@@ -228,5 +226,9 @@ struct ucontext32 {
sigset_t uc_sigmask; /* mask last for extensibility */
};
+struct ipc_kludge_32 {
+ unsigned int msgp;
+ int msgtyp;
+};
#endif /* _PPC64_PPC32_H */
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index 914382934892..e408ac247385 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -477,7 +477,7 @@
#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field */
/* Processor Version Numbers */
-#define PV_NORTHSTAR 0x0033
+#define PV_NORTHSTAR 0x0033
#define PV_PULSAR 0x0034
#define PV_POWER4 0x0035
#define PV_ICESTAR 0x0036
diff --git a/include/asm-ppc64/sigcontext.h b/include/asm-ppc64/sigcontext.h
index 6d0d247c56e4..467be1a3d86b 100644
--- a/include/asm-ppc64/sigcontext.h
+++ b/include/asm-ppc64/sigcontext.h
@@ -13,6 +13,7 @@
struct sigcontext {
unsigned long _unused[4];
int signal;
+ int _pad0;
unsigned long handler;
unsigned long oldmask;
struct pt_regs *regs;
diff --git a/include/asm-ppc64/siginfo.h b/include/asm-ppc64/siginfo.h
index 3bb578cf3897..4481c731ab27 100644
--- a/include/asm-ppc64/siginfo.h
+++ b/include/asm-ppc64/siginfo.h
@@ -8,6 +8,9 @@
* 2 of the License, or (at your option) any later version.
*/
+#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4)
+#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
+
#include <asm-generic/siginfo.h>
#endif /* _PPC64_SIGINFO_H */
diff --git a/include/asm-ppc64/stat.h b/include/asm-ppc64/stat.h
index 5b12701dd858..14f338a7df43 100644
--- a/include/asm-ppc64/stat.h
+++ b/include/asm-ppc64/stat.h
@@ -27,8 +27,8 @@ struct __old_kernel_stat {
struct stat {
dev_t st_dev;
ino_t st_ino;
- mode_t st_mode;
nlink_t st_nlink;
+ mode_t st_mode;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
@@ -43,6 +43,7 @@ struct stat {
unsigned long __unused3;
unsigned long __unused4;
unsigned long __unused5;
+ unsigned long __unused6;
};
/* This matches struct stat64 in glibc2.1. */