summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86_64/compat.h8
-rw-r--r--include/asm-x86_64/ia32.h13
-rw-r--r--include/asm-x86_64/segment.h3
-rw-r--r--include/asm-x86_64/smp.h5
-rw-r--r--include/asm-x86_64/uaccess.h4
5 files changed, 16 insertions, 17 deletions
diff --git a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h
index adc5293b3a2b..140308fb61e7 100644
--- a/include/asm-x86_64/compat.h
+++ b/include/asm-x86_64/compat.h
@@ -10,16 +10,22 @@
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
-typedef s32 compat_suseconds_t;
typedef s32 compat_clock_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_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;
diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
index 802b85d4750f..7ebb9db48314 100644
--- a/include/asm-x86_64/ia32.h
+++ b/include/asm-x86_64/ia32.h
@@ -11,17 +11,6 @@
* 32 bit structures for IA32 support.
*/
-/* 32bit compatibility types */
-typedef unsigned short __kernel_ipc_pid_t32;
-typedef unsigned __kernel_uid32_t32;
-typedef unsigned __kernel_gid32_t32;
-typedef unsigned short __kernel_umode_t32;
-typedef int __kernel_daddr_t32;
-typedef unsigned int __kernel_caddr_t32;
-typedef long __kernel_loff_t32;
-typedef __kernel_fsid_t __kernel_fsid_t32;
-
-
struct ia32_flock64 {
short l_type;
short l_whence;
@@ -120,7 +109,7 @@ struct statfs32 {
int f_bavail;
int f_files;
int f_ffree;
- __kernel_fsid_t32 f_fsid;
+ compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_spare[6];
};
diff --git a/include/asm-x86_64/segment.h b/include/asm-x86_64/segment.h
index 70cb7cf0808e..64f131070585 100644
--- a/include/asm-x86_64/segment.h
+++ b/include/asm-x86_64/segment.h
@@ -6,6 +6,8 @@
#define __KERNEL32_CS 0x38
+#define __USER_LONGBASE ((GDT_ENTRY_LONGBASE * 8) | 3)
+
/*
* we cannot use the same code segment descriptor for user and kernel
* even not in the long flat model, because of different DPL /kkeil
@@ -23,6 +25,7 @@
#define GDT_ENTRY_LDT 10
#define GDT_ENTRY_TLS_MIN 11
#define GDT_ENTRY_TLS_MAX 13
+#define GDT_ENTRY_LONGBASE 14
#define GDT_ENTRY_TLS_ENTRIES 3
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index 3af6dbea3d1c..b6a8eb92d2b1 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -83,16 +83,17 @@ extern inline int find_first_cpu(void)
return ffz(~cpu_online_map);
}
+/* RED-PEN different from i386 */
#define for_each_cpu(i) \
for((i) = find_first_cpu(); (i)>=0; (i)=find_next_cpu(i))
-extern volatile unsigned long cpu_callout_map;
-/* We don't mark CPUs online until __cpu_up(), so we need another measure */
static inline int num_booting_cpus(void)
{
return hweight32(cpu_callout_map);
}
+extern volatile unsigned long cpu_callout_map;
+
/*
* Some lowlevel functions might want to know about
* the real APIC ID <-> CPU # mapping.
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index 065eb4c8dafb..47e78d59e27b 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -240,7 +240,7 @@ extern unsigned long copy_user_generic(void *to, const void *from, unsigned len)
extern unsigned long copy_to_user(void *to, const void *from, unsigned len);
extern unsigned long copy_from_user(void *to, const void *from, unsigned len);
-static inline int __copy_from_user(void *dst, void *src, unsigned size)
+static inline int __copy_from_user(void *dst, const void *src, unsigned size)
{
if (!__builtin_constant_p(size))
return copy_user_generic(dst,src,size);
@@ -269,7 +269,7 @@ static inline int __copy_from_user(void *dst, void *src, unsigned size)
}
}
-static inline int __copy_to_user(void *dst, void *src, unsigned size)
+static inline int __copy_to_user(void *dst, const void *src, unsigned size)
{
if (!__builtin_constant_p(size))
return copy_user_generic(dst,src,size);