Commit cca21640 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull more x32 uabi type fixes from Peter Anvin:
 "Despite the branch name, **most of these changes are to generic
  code**.  They change types so that they make an increasing amount of
  the exported uapi kernel headers usable for libc.

  The ARM64 people are also interested in these changes for their ILP32
  ABI"

* 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  uapi: Use __kernel_long_t in struct mq_attr
  uapi: Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info
  x86, uapi, x32: Use __kernel_ulong_t in x86 struct semid64_ds
  uapi: Use __kernel_ulong_t in struct msqid64_ds
  uapi: Use __kernel_long_t in struct msgbuf
  uapi, asm-generic: Use __kernel_ulong_t in uapi struct ipc64_perm
  uapi: Use __kernel_long_t/__kernel_ulong_t in <linux/resource.h>
  uapi: Use __kernel_long_t in struct timex
parents e914e3f4 63159f5d
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
struct semid64_ds { struct semid64_ds {
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
__kernel_time_t sem_otime; /* last semop time */ __kernel_time_t sem_otime; /* last semop time */
unsigned long __unused1; __kernel_ulong_t __unused1;
__kernel_time_t sem_ctime; /* last change time */ __kernel_time_t sem_ctime; /* last change time */
unsigned long __unused2; __kernel_ulong_t __unused2;
unsigned long sem_nsems; /* no. of semaphores in array */ __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
unsigned long __unused3; __kernel_ulong_t __unused3;
unsigned long __unused4; __kernel_ulong_t __unused4;
}; };
#endif /* _ASM_X86_SEMBUF_H */ #endif /* _ASM_X86_SEMBUF_H */
...@@ -27,8 +27,8 @@ struct ipc64_perm { ...@@ -27,8 +27,8 @@ struct ipc64_perm {
unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; unsigned char __pad1[4 - sizeof(__kernel_mode_t)];
unsigned short seq; unsigned short seq;
unsigned short __pad2; unsigned short __pad2;
unsigned long __unused1; __kernel_ulong_t __unused1;
unsigned long __unused2; __kernel_ulong_t __unused2;
}; };
#endif /* __ASM_GENERIC_IPCBUF_H */ #endif /* __ASM_GENERIC_IPCBUF_H */
...@@ -35,13 +35,13 @@ struct msqid64_ds { ...@@ -35,13 +35,13 @@ struct msqid64_ds {
#if __BITS_PER_LONG != 64 #if __BITS_PER_LONG != 64
unsigned long __unused3; unsigned long __unused3;
#endif #endif
unsigned long msg_cbytes; /* current number of bytes on queue */ __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
unsigned long msg_qnum; /* number of messages in queue */ __kernel_ulong_t msg_qnum; /* number of messages in queue */
unsigned long msg_qbytes; /* max number of bytes on queue */ __kernel_ulong_t 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 long __unused4; __kernel_ulong_t __unused4;
unsigned long __unused5; __kernel_ulong_t __unused5;
}; };
#endif /* __ASM_GENERIC_MSGBUF_H */ #endif /* __ASM_GENERIC_MSGBUF_H */
...@@ -39,21 +39,21 @@ struct shmid64_ds { ...@@ -39,21 +39,21 @@ struct shmid64_ds {
#endif #endif
__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 long shm_nattch; /* no. of current attaches */ __kernel_ulong_t shm_nattch; /* no. of current attaches */
unsigned long __unused4; __kernel_ulong_t __unused4;
unsigned long __unused5; __kernel_ulong_t __unused5;
}; };
struct shminfo64 { struct shminfo64 {
unsigned long shmmax; __kernel_ulong_t shmmax;
unsigned long shmmin; __kernel_ulong_t shmmin;
unsigned long shmmni; __kernel_ulong_t shmmni;
unsigned long shmseg; __kernel_ulong_t shmseg;
unsigned long shmall; __kernel_ulong_t shmall;
unsigned long __unused1; __kernel_ulong_t __unused1;
unsigned long __unused2; __kernel_ulong_t __unused2;
unsigned long __unused3; __kernel_ulong_t __unused3;
unsigned long __unused4; __kernel_ulong_t __unused4;
}; };
#endif /* __ASM_GENERIC_SHMBUF_H */ #endif /* __ASM_GENERIC_SHMBUF_H */
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
#define MQ_BYTES_MAX 819200 #define MQ_BYTES_MAX 819200
struct mq_attr { struct mq_attr {
long mq_flags; /* message queue flags */ __kernel_long_t mq_flags; /* message queue flags */
long mq_maxmsg; /* maximum number of messages */ __kernel_long_t mq_maxmsg; /* maximum number of messages */
long mq_msgsize; /* maximum message size */ __kernel_long_t mq_msgsize; /* maximum message size */
long mq_curmsgs; /* number of messages currently queued */ __kernel_long_t mq_curmsgs; /* number of messages currently queued */
long __reserved[4]; /* ignored for input, zeroed for output */ __kernel_long_t __reserved[4]; /* ignored for input, zeroed for output */
}; };
/* /*
......
...@@ -34,7 +34,7 @@ struct msqid_ds { ...@@ -34,7 +34,7 @@ struct msqid_ds {
/* message buffer for msgsnd and msgrcv calls */ /* message buffer for msgsnd and msgrcv calls */
struct msgbuf { struct msgbuf {
long mtype; /* type of message */ __kernel_long_t mtype; /* type of message */
char mtext[1]; /* message text */ char mtext[1]; /* message text */
}; };
......
...@@ -23,25 +23,25 @@ ...@@ -23,25 +23,25 @@
struct rusage { struct rusage {
struct timeval ru_utime; /* user time used */ struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */ struct timeval ru_stime; /* system time used */
long ru_maxrss; /* maximum resident set size */ __kernel_long_t ru_maxrss; /* maximum resident set size */
long ru_ixrss; /* integral shared memory size */ __kernel_long_t ru_ixrss; /* integral shared memory size */
long ru_idrss; /* integral unshared data size */ __kernel_long_t ru_idrss; /* integral unshared data size */
long ru_isrss; /* integral unshared stack size */ __kernel_long_t ru_isrss; /* integral unshared stack size */
long ru_minflt; /* page reclaims */ __kernel_long_t ru_minflt; /* page reclaims */
long ru_majflt; /* page faults */ __kernel_long_t ru_majflt; /* page faults */
long ru_nswap; /* swaps */ __kernel_long_t ru_nswap; /* swaps */
long ru_inblock; /* block input operations */ __kernel_long_t ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */ __kernel_long_t ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */ __kernel_long_t ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */ __kernel_long_t ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */ __kernel_long_t ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */ __kernel_long_t ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary " */ __kernel_long_t ru_nivcsw; /* involuntary " */
}; };
struct rlimit { struct rlimit {
unsigned long rlim_cur; __kernel_ulong_t rlim_cur;
unsigned long rlim_max; __kernel_ulong_t rlim_max;
}; };
#define RLIM64_INFINITY (~0ULL) #define RLIM64_INFINITY (~0ULL)
......
...@@ -68,11 +68,11 @@ struct shminfo { ...@@ -68,11 +68,11 @@ struct shminfo {
struct shm_info { struct shm_info {
int used_ids; int used_ids;
unsigned long shm_tot; /* total allocated shm */ __kernel_ulong_t shm_tot; /* total allocated shm */
unsigned long shm_rss; /* total resident shm */ __kernel_ulong_t shm_rss; /* total resident shm */
unsigned long shm_swp; /* total swapped shm */ __kernel_ulong_t shm_swp; /* total swapped shm */
unsigned long swap_attempts; __kernel_ulong_t swap_attempts;
unsigned long swap_successes; __kernel_ulong_t swap_successes;
}; };
......
...@@ -63,27 +63,27 @@ ...@@ -63,27 +63,27 @@
*/ */
struct timex { struct timex {
unsigned int modes; /* mode selector */ unsigned int modes; /* mode selector */
long offset; /* time offset (usec) */ __kernel_long_t offset; /* time offset (usec) */
long freq; /* frequency offset (scaled ppm) */ __kernel_long_t freq; /* frequency offset (scaled ppm) */
long maxerror; /* maximum error (usec) */ __kernel_long_t maxerror;/* maximum error (usec) */
long esterror; /* estimated error (usec) */ __kernel_long_t esterror;/* estimated error (usec) */
int status; /* clock command/status */ int status; /* clock command/status */
long constant; /* pll time constant */ __kernel_long_t constant;/* pll time constant */
long precision; /* clock precision (usec) (read only) */ __kernel_long_t precision;/* clock precision (usec) (read only) */
long tolerance; /* clock frequency tolerance (ppm) __kernel_long_t tolerance;/* clock frequency tolerance (ppm)
* (read only) * (read only)
*/ */
struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
long tick; /* (modified) usecs between clock ticks */ __kernel_long_t tick; /* (modified) usecs between clock ticks */
long ppsfreq; /* pps frequency (scaled ppm) (ro) */ __kernel_long_t ppsfreq;/* pps frequency (scaled ppm) (ro) */
long jitter; /* pps jitter (us) (ro) */ __kernel_long_t jitter; /* pps jitter (us) (ro) */
int shift; /* interval duration (s) (shift) (ro) */ int shift; /* interval duration (s) (shift) (ro) */
long stabil; /* pps stability (scaled ppm) (ro) */ __kernel_long_t stabil; /* pps stability (scaled ppm) (ro) */
long jitcnt; /* jitter limit exceeded (ro) */ __kernel_long_t jitcnt; /* jitter limit exceeded (ro) */
long calcnt; /* calibration intervals (ro) */ __kernel_long_t calcnt; /* calibration intervals (ro) */
long errcnt; /* calibration errors (ro) */ __kernel_long_t errcnt; /* calibration errors (ro) */
long stbcnt; /* stability limit exceeded (ro) */ __kernel_long_t stbcnt; /* stability limit exceeded (ro) */
int tai; /* TAI offset (ro) */ int tai; /* TAI offset (ro) */
......
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