include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / arch / sparc / kernel / sys_sparc32.c
index 0a68fdf..c0ca875 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
-#include <linux/slab.h>
 #include <linux/uio.h>
 #include <linux/nfs_fs.h>
 #include <linux/quota.h>
@@ -43,8 +42,8 @@
 #include <linux/security.h>
 #include <linux/compat.h>
 #include <linux/vfs.h>
-#include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/ptrace.h>
+#include <linux/slab.h>
 
 #include <asm/types.h>
 #include <asm/uaccess.h>
@@ -564,85 +563,6 @@ asmlinkage long sparc32_open(const char __user *filename,
        return do_sys_open(AT_FDCWD, filename, flags, mode);
 }
 
-extern unsigned long do_mremap(unsigned long addr,
-       unsigned long old_len, unsigned long new_len,
-       unsigned long flags, unsigned long new_addr);
-                
-asmlinkage unsigned long sys32_mremap(unsigned long addr,
-       unsigned long old_len, unsigned long new_len,
-       unsigned long flags, u32 __new_addr)
-{
-       unsigned long ret = -EINVAL;
-       unsigned long new_addr = __new_addr;
-
-       if (unlikely(sparc_mmap_check(addr, old_len)))
-               goto out;
-       if (unlikely(sparc_mmap_check(new_addr, new_len)))
-               goto out;
-       down_write(&current->mm->mmap_sem);
-       ret = do_mremap(addr, old_len, new_len, flags, new_addr);
-       up_write(&current->mm->mmap_sem);
-out:
-       return ret;       
-}
-
-struct __sysctl_args32 {
-       u32 name;
-       int nlen;
-       u32 oldval;
-       u32 oldlenp;
-       u32 newval;
-       u32 newlen;
-       u32 __unused[4];
-};
-
-asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
-{
-#ifndef CONFIG_SYSCTL_SYSCALL
-       return -ENOSYS;
-#else
-       struct __sysctl_args32 tmp;
-       int error;
-       size_t oldlen, __user *oldlenp = NULL;
-       unsigned long addr = (((unsigned long)&args->__unused[0]) + 7UL) & ~7UL;
-
-       if (copy_from_user(&tmp, args, sizeof(tmp)))
-               return -EFAULT;
-
-       if (tmp.oldval && tmp.oldlenp) {
-               /* Duh, this is ugly and might not work if sysctl_args
-                  is in read-only memory, but do_sysctl does indirectly
-                  a lot of uaccess in both directions and we'd have to
-                  basically copy the whole sysctl.c here, and
-                  glibc's __sysctl uses rw memory for the structure
-                  anyway.  */
-               if (get_user(oldlen, (u32 __user *)(unsigned long)tmp.oldlenp) ||
-                   put_user(oldlen, (size_t __user *)addr))
-                       return -EFAULT;
-               oldlenp = (size_t __user *)addr;
-       }
-
-       lock_kernel();
-       error = do_sysctl((int __user *)(unsigned long) tmp.name,
-                         tmp.nlen,
-                         (void __user *)(unsigned long) tmp.oldval,
-                         oldlenp,
-                         (void __user *)(unsigned long) tmp.newval,
-                         tmp.newlen);
-       unlock_kernel();
-       if (oldlenp) {
-               if (!error) {
-                       if (get_user(oldlen, (size_t __user *)addr) ||
-                           put_user(oldlen, (u32 __user *)(unsigned long) tmp.oldlenp))
-                               error = -EFAULT;
-               }
-               if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
-                       error = -EFAULT;
-       }
-       return error;
-#endif
-}
-
 long sys32_lookup_dcookie(unsigned long cookie_high,
                          unsigned long cookie_low,
                          char __user *buf, size_t len)