[parisc-linux-cvs] linux-2.5 tausq

Randolph Chung Randolph Chung <tausq@debian.org>
Wed, 28 May 2003 23:52:31 -0700


> Log message:
> 2.4.70-pa2
> define compat_alloc_user_space for 64-bit compat
> compiles and boots on a500

seems to work for me, but would appreciate if someone can confirm that
this looks correct :)

randolph

Index: include/asm-parisc/compat.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-parisc/compat.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- include/asm-parisc/compat.h 11 Apr 2003 05:29:35 -0000      1.9
+++ include/asm-parisc/compat.h 29 May 2003 06:45:08 -0000      1.10
@@ -4,6 +4,7 @@
  * Architecture specific compatibility types
  */
 #include <linux/types.h>
+#include <linux/sched.h>

 #define COMPAT_USER_HZ 100

@@ -122,6 +123,14 @@ typedef    u32             compat_uptr_t;
 static inline void *compat_ptr(compat_uptr_t uptr)
 {
        return (void *)(unsigned long)uptr;
+}
+
+static __inline__ void *compat_alloc_user_space(long len)
+{
+       struct pt_regs *regs = &current->thread.regs;
+       unsigned long usp = regs->gr[30];
+
+       return (void *)(usp + len);
 }

 #endif /* _ASM_PARISC_COMPAT_H */