Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[sfrench/cifs-2.6.git] / arch / sparc64 / kernel / sys_sparc.c
index 560cb1edb1d0d97df195827d88bcf8322450a7a8..f952745d0f3d964605e6008f6f567de72a49855e 100644 (file)
@@ -1,5 +1,4 @@
-/* $Id: sys_sparc.c,v 1.57 2002/02/09 19:49:30 davem Exp $
- * linux/arch/sparc64/kernel/sys_sparc.c
+/* linux/arch/sparc64/kernel/sys_sparc.c
  *
  * This file contains various random system calls that
  * have a non-standard calling sequence on the Linux/sparc
 #include <asm/uaccess.h>
 #include <asm/utrap.h>
 #include <asm/perfctr.h>
-#include <asm/a.out.h>
 #include <asm/unistd.h>
 
+#include "entry.h"
+#include "systbls.h"
+
 /* #define DEBUG_UNIMP_SYSCALL */
 
 asmlinkage unsigned long sys_getpagesize(void)
@@ -318,7 +319,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u
 
        if (flags & MAP_FIXED) {
                /* Ok, don't mess with it. */
-               return get_unmapped_area(NULL, addr, len, pgoff, flags);
+               return get_unmapped_area(NULL, orig_addr, len, pgoff, flags);
        }
        flags &= ~MAP_SHARED;
 
@@ -446,7 +447,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
                        goto out;
                case SEMTIMEDOP:
                        err = sys_semtimedop(first, ptr, (unsigned)second,
-                               (const struct timespec __user *) fifth);
+                               (const struct timespec __user *)
+                                            (unsigned long) fifth);
                        goto out;
                case SEMGET:
                        err = sys_semget(first, (int)second, (int)third);
@@ -789,7 +791,7 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
        } else {
                if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p &&
                    current_thread_info()->utraps[0] > 1) {
-                       long *p = current_thread_info()->utraps;
+                       unsigned long *p = current_thread_info()->utraps;
 
                        current_thread_info()->utraps =
                                kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long),
@@ -817,7 +819,8 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
        return 0;
 }
 
-long sparc_memory_ordering(unsigned long model, struct pt_regs *regs)
+asmlinkage long sparc_memory_ordering(unsigned long model,
+                                     struct pt_regs *regs)
 {
        if (model >= 3)
                return -EINVAL;