firewire: fw-ohci: add option for remote debugging
[safe/jmp/linux-2.6] / include / asm-parisc / compat.h
index 38b918f..7f32611 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <linux/types.h>
 #include <linux/sched.h>
+#include <linux/thread_info.h>
 
 #define COMPAT_USER_HZ 100
 
@@ -30,8 +31,10 @@ typedef s32  compat_timer_t;
 
 typedef s32    compat_int_t;
 typedef s32    compat_long_t;
+typedef s64    compat_s64;
 typedef u32    compat_uint_t;
 typedef u32    compat_ulong_t;
+typedef u64    compat_u64;
 
 struct compat_timespec {
        compat_time_t           tv_sec;
@@ -129,7 +132,7 @@ typedef u32         compat_sigset_word;
  * A pointer passed in from user mode. This should not
  * be used for syscall parameters, just declare them
  * as pointers because the syscall entry code will have
- * appropriately comverted them already.
+ * appropriately converted them already.
  */
 typedef        u32             compat_uptr_t;
 
@@ -138,10 +141,25 @@ static inline void __user *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 = &current->thread.regs;
        return (void __user *)regs->gr[30];
 }
 
+static inline int __is_compat_task(struct task_struct *t)
+{
+       return test_ti_thread_flag(task_thread_info(t), TIF_32BIT);
+}
+
+static inline int is_compat_task(void)
+{
+       return __is_compat_task(current);
+}
+
 #endif /* _ASM_PARISC_COMPAT_H */