Commit 373ee21e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'parisc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
 "We have two patches in here:

   - The parisc uapi headers have been screwed up since quite some time.
     This patch fixes some bugs (e.g. endianess not respected in
     compat_semid64_ds) and cleans them up (e.g. uid_t was used instead
     of __kernel_uid_t) so that they can be used by userspace again.
     This patch has been reviewed by Arnd Bergmann and is scheduled for
     stable kernel series.

   - Drop the hpux_stat64 struct from stat.h, we do not support HP-UX
     binaries since kernel 4.0"

* 'parisc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fixes and cleanups in kernel uapi header files
  parisc: Drop hpux_stat64 struct from stat.h header file
parents f4d68930 d0cf62fb
...@@ -206,10 +206,10 @@ struct compat_ipc64_perm { ...@@ -206,10 +206,10 @@ struct compat_ipc64_perm {
struct compat_semid64_ds { struct compat_semid64_ds {
struct compat_ipc64_perm sem_perm; struct compat_ipc64_perm sem_perm;
compat_time_t sem_otime;
unsigned int __unused1; unsigned int __unused1;
compat_time_t sem_ctime; compat_time_t sem_otime;
unsigned int __unused2; unsigned int __unused2;
compat_time_t sem_ctime;
compat_ulong_t sem_nsems; compat_ulong_t sem_nsems;
compat_ulong_t __unused3; compat_ulong_t __unused3;
compat_ulong_t __unused4; compat_ulong_t __unused4;
......
#ifndef __PARISC_IPCBUF_H__ #ifndef __PARISC_IPCBUF_H__
#define __PARISC_IPCBUF_H__ #define __PARISC_IPCBUF_H__
#include <asm/bitsperlong.h>
#include <linux/posix_types.h>
/* /*
* The ipc64_perm structure for PA-RISC is almost identical to * The ipc64_perm structure for PA-RISC is almost identical to
* kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the kernel. * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the kernel.
...@@ -10,13 +13,15 @@ ...@@ -10,13 +13,15 @@
struct ipc64_perm struct ipc64_perm
{ {
key_t key; __kernel_key_t key;
uid_t uid; __kernel_uid_t uid;
gid_t gid; __kernel_gid_t gid;
uid_t cuid; __kernel_uid_t cuid;
gid_t cgid; __kernel_gid_t cgid;
#if __BITS_PER_LONG != 64
unsigned short int __pad1; unsigned short int __pad1;
mode_t mode; #endif
__kernel_mode_t mode;
unsigned short int __pad2; unsigned short int __pad2;
unsigned short int seq; unsigned short int seq;
unsigned int __pad3; unsigned int __pad3;
......
...@@ -27,13 +27,13 @@ struct msqid64_ds { ...@@ -27,13 +27,13 @@ struct msqid64_ds {
unsigned int __pad3; unsigned int __pad3;
#endif #endif
__kernel_time_t msg_ctime; /* last change time */ __kernel_time_t msg_ctime; /* last change time */
unsigned int msg_cbytes; /* current number of bytes on queue */ unsigned long msg_cbytes; /* current number of bytes on queue */
unsigned int msg_qnum; /* number of messages in queue */ unsigned long msg_qnum; /* number of messages in queue */
unsigned int msg_qbytes; /* max number of bytes on queue */ unsigned long msg_qbytes; /* max number of bytes on queue */
__kernel_pid_t msg_lspid; /* pid of last msgsnd */ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
__kernel_pid_t msg_lrpid; /* last receive pid */ __kernel_pid_t msg_lrpid; /* last receive pid */
unsigned int __unused1; unsigned long __unused1;
unsigned int __unused2; unsigned long __unused2;
}; };
#endif /* _PARISC_MSGBUF_H */ #endif /* _PARISC_MSGBUF_H */
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
#ifndef __LP64__
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
#define __kernel_mode_t __kernel_mode_t #define __kernel_mode_t __kernel_mode_t
#endif
typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_ipc_pid_t;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t #define __kernel_ipc_pid_t __kernel_ipc_pid_t
......
...@@ -23,9 +23,9 @@ struct semid64_ds { ...@@ -23,9 +23,9 @@ struct semid64_ds {
unsigned int __pad2; unsigned int __pad2;
#endif #endif
__kernel_time_t sem_ctime; /* last change time */ __kernel_time_t sem_ctime; /* last change time */
unsigned int sem_nsems; /* no. of semaphores in array */ unsigned long sem_nsems; /* no. of semaphores in array */
unsigned int __unused1; unsigned long __unused1;
unsigned int __unused2; unsigned long __unused2;
}; };
#endif /* _PARISC_SEMBUF_H */ #endif /* _PARISC_SEMBUF_H */
...@@ -30,12 +30,12 @@ struct shmid64_ds { ...@@ -30,12 +30,12 @@ struct shmid64_ds {
#if __BITS_PER_LONG != 64 #if __BITS_PER_LONG != 64
unsigned int __pad4; unsigned int __pad4;
#endif #endif
size_t shm_segsz; /* size of segment (bytes) */ __kernel_size_t shm_segsz; /* size of segment (bytes) */
__kernel_pid_t shm_cpid; /* pid of creator */ __kernel_pid_t shm_cpid; /* pid of creator */
__kernel_pid_t shm_lpid; /* pid of last operator */ __kernel_pid_t shm_lpid; /* pid of last operator */
unsigned int shm_nattch; /* no. of current attaches */ unsigned long shm_nattch; /* no. of current attaches */
unsigned int __unused1; unsigned long __unused1;
unsigned int __unused2; unsigned long __unused2;
}; };
struct shminfo64 { struct shminfo64 {
......
...@@ -36,37 +36,6 @@ struct stat { ...@@ -36,37 +36,6 @@ struct stat {
#define STAT_HAVE_NSEC #define STAT_HAVE_NSEC
struct hpux_stat64 {
unsigned int st_dev; /* dev_t is 32 bits on parisc */
unsigned int st_ino; /* 32 bits */
unsigned short st_mode; /* 16 bits */
unsigned short st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */
unsigned int st_rdev;
signed long long st_size;
signed int st_atime;
unsigned int st_spare1;
signed int st_mtime;
unsigned int st_spare2;
signed int st_ctime;
unsigned int st_spare3;
int st_blksize;
unsigned long long st_blocks;
unsigned int __unused1; /* ACL stuff */
unsigned int __unused2; /* network */
unsigned int __unused3; /* network */
unsigned int __unused4; /* cnodes */
unsigned short __unused5; /* netsite */
short st_fstype;
unsigned int st_realdev;
unsigned short st_basemode;
unsigned short st_spareshort;
unsigned int st_uid;
unsigned int st_gid;
unsigned int st_spare4[3];
};
/* This is the struct that 32-bit userspace applications are expecting. /* This is the struct that 32-bit userspace applications are expecting.
* How 64-bit apps are going to be compiled, I have no idea. But at least * How 64-bit apps are going to be compiled, I have no idea. But at least
* this way, we don't have a wrapper in the kernel. * this way, we don't have a wrapper in the kernel.
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/nodemask.h> /* for node_online_map */ #include <linux/nodemask.h> /* for node_online_map */
#include <linux/pagemap.h> /* for release_pages and page_cache_release */ #include <linux/pagemap.h> /* for release_pages and page_cache_release */
#include <linux/compat.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
#include <asm/pdc_chassis.h> #include <asm/pdc_chassis.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/msgbuf.h>
extern int data_start; extern int data_start;
extern void parisc_kernel_start(void); /* Kernel entry point in head.S */ extern void parisc_kernel_start(void); /* Kernel entry point in head.S */
...@@ -590,6 +592,20 @@ unsigned long pcxl_dma_start __read_mostly; ...@@ -590,6 +592,20 @@ unsigned long pcxl_dma_start __read_mostly;
void __init mem_init(void) void __init mem_init(void)
{ {
/* Do sanity checks on IPC (compat) structures */
BUILD_BUG_ON(sizeof(struct ipc64_perm) != 48);
#ifndef CONFIG_64BIT
BUILD_BUG_ON(sizeof(struct semid64_ds) != 80);
BUILD_BUG_ON(sizeof(struct msqid64_ds) != 104);
BUILD_BUG_ON(sizeof(struct shmid64_ds) != 104);
#endif
#ifdef CONFIG_COMPAT
BUILD_BUG_ON(sizeof(struct compat_ipc64_perm) != sizeof(struct ipc64_perm));
BUILD_BUG_ON(sizeof(struct compat_semid64_ds) != 80);
BUILD_BUG_ON(sizeof(struct compat_msqid64_ds) != 104);
BUILD_BUG_ON(sizeof(struct compat_shmid64_ds) != 104);
#endif
/* Do sanity checks on page table constants */ /* Do sanity checks on page table constants */
BUILD_BUG_ON(PTE_ENTRY_SIZE != sizeof(pte_t)); BUILD_BUG_ON(PTE_ENTRY_SIZE != sizeof(pte_t));
BUILD_BUG_ON(PMD_ENTRY_SIZE != sizeof(pmd_t)); BUILD_BUG_ON(PMD_ENTRY_SIZE != sizeof(pmd_t));
......
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