]> err.no Git - linux-2.6/blobdiff - include/asm-ia64/compat.h
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6] / include / asm-ia64 / compat.h
index 0c05e5bad8a0fe01e4ba88abcb84d1516014d414..0f6e5264ab8fcccefa2da67faa794fec3d79d206 100644 (file)
@@ -13,10 +13,10 @@ typedef s32         compat_time_t;
 typedef s32            compat_clock_t;
 typedef s32            compat_key_t;
 typedef s32            compat_pid_t;
-typedef u16            compat_uid_t;
-typedef u16            compat_gid_t;
-typedef u32            compat_uid32_t;
-typedef u32            compat_gid32_t;
+typedef u16            __compat_uid_t;
+typedef u16            __compat_gid_t;
+typedef u32            __compat_uid32_t;
+typedef u32            __compat_gid32_t;
 typedef u16            compat_mode_t;
 typedef u32            compat_ino_t;
 typedef u16            compat_dev_t;
@@ -31,8 +31,10 @@ typedef s32          compat_timer_t;
 
 typedef s32            compat_int_t;
 typedef s32            compat_long_t;
+typedef s64 __attribute__((aligned(4))) compat_s64;
 typedef u32            compat_uint_t;
 typedef u32            compat_ulong_t;
+typedef u64 __attribute__((aligned(4))) compat_u64;
 
 struct compat_timespec {
        compat_time_t   tv_sec;
@@ -50,8 +52,8 @@ struct compat_stat {
        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_uid_t  st_uid;
+       __compat_gid_t  st_gid;
        compat_dev_t    st_rdev;
        u16             __pad2;
        u32             st_size;
@@ -120,10 +122,10 @@ typedef u32               compat_sigset_word;
 
 struct compat_ipc64_perm {
        compat_key_t key;
-       compat_uid32_t uid;
-       compat_gid32_t gid;
-       compat_uid32_t cuid;
-       compat_gid32_t cgid;
+       __compat_uid32_t uid;
+       __compat_gid32_t gid;
+       __compat_uid32_t cuid;
+       __compat_gid32_t cgid;
        unsigned short mode;
        unsigned short __pad1;
        unsigned short seq;
@@ -189,10 +191,16 @@ compat_ptr (compat_uptr_t uptr)
        return (void __user *) (unsigned long) uptr;
 }
 
+static inline compat_uptr_t
+ptr_to_compat(void __user *uptr)
+{
+       return (u32)(unsigned long)uptr;
+}
+
 static __inline__ void __user *
 compat_alloc_user_space (long len)
 {
-       struct pt_regs *regs = ia64_task_regs(current);
+       struct pt_regs *regs = task_pt_regs(current);
        return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len);
 }