diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
commit | 8abb719409c9060a7c0676f76e9182c1e0b8ca46 (patch) | |
tree | b88cc5a6cd513a04a512b7e6215c873c90a1c5dd /arch/sparc64/kernel | |
parent | f01bd7aeafd95a08aafc9e3636bb26974df69d82 (diff) |
Merge with 2.3.99-pre1.
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/binfmt_aout32.c | 48 | ||||
-rw-r--r-- | arch/sparc64/kernel/ioctl32.c | 12 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sparc32.c | 13 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sunos32.c | 52 | ||||
-rw-r--r-- | arch/sparc64/kernel/systbls.S | 8 |
5 files changed, 31 insertions, 102 deletions
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index 009c506a0..3e95ed9cf 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c @@ -82,8 +82,7 @@ if (file->f_op->llseek) { \ * dumping of the process results in another error.. */ -static inline int -do_aout32_core_dump(long signr, struct pt_regs * regs, struct file *file) +static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) { mm_segment_t fs; int has_dumped = 0; @@ -143,17 +142,6 @@ end_coredump: return has_dumped; } -static int -aout32_core_dump(long signr, struct pt_regs * regs, struct file * file) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_aout32_core_dump(signr, regs, file); - MOD_DEC_USE_COUNT; - return retval; -} - /* * create_aout32_tables() parses the env- and arg-strings in new user * memory and creates the pointer tables from them, and puts their @@ -207,8 +195,7 @@ static u32 *create_aout32_tables(char * p, struct linux_binprm * bprm) * libraries. There is no binary dependent code anywhere else. */ -static inline int do_load_aout32_binary(struct linux_binprm * bprm, - struct pt_regs * regs) +static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) { struct exec ex; struct file * file; @@ -320,14 +307,11 @@ static inline int do_load_aout32_binary(struct linux_binprm * bprm, } } beyond_if: - if (current->exec_domain && current->exec_domain->module) - __MOD_DEC_USE_COUNT(current->exec_domain->module); + put_exec_domain(current->exec_domain); if (current->binfmt && current->binfmt->module) __MOD_DEC_USE_COUNT(current->binfmt->module); current->exec_domain = lookup_exec_domain(current->personality); current->binfmt = &aout32_format; - if (current->exec_domain && current->exec_domain->module) - __MOD_INC_USE_COUNT(current->exec_domain->module); if (current->binfmt && current->binfmt->module) __MOD_INC_USE_COUNT(current->binfmt->module); @@ -358,21 +342,8 @@ beyond_if: return 0; } - -static int -load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_load_aout32_binary(bprm, regs); - MOD_DEC_USE_COUNT; - return retval; -} - /* N.B. Move to .h file and use code in fs/binfmt_aout.c? */ -static inline int -do_load_aout32_library(int fd) +static int load_aout32_library(int fd) { struct file * file; struct inode * inode; @@ -444,17 +415,6 @@ out: return retval; } -static int -load_aout32_library(int fd) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_load_aout32_library(fd); - MOD_DEC_USE_COUNT; - return retval; -} - static int __init init_aout32_binfmt(void) { return register_binfmt(&aout32_format); diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c index 39a000ef3..d3a3814a8 100644 --- a/arch/sparc64/kernel/ioctl32.c +++ b/arch/sparc64/kernel/ioctl32.c @@ -1,4 +1,4 @@ -/* $Id: ioctl32.c,v 1.80 2000/02/17 06:45:09 jj Exp $ +/* $Id: ioctl32.c,v 1.82 2000/03/13 21:57:27 davem Exp $ * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) @@ -34,6 +34,7 @@ #include <linux/cdrom.h> #include <linux/loop.h> #include <linux/auto_fs.h> +#include <linux/devfs_fs.h> #include <linux/tty.h> #include <linux/vt_kern.h> #include <linux/fb.h> @@ -2334,6 +2335,10 @@ COMPATIBLE_IOCTL(PPPIOCSDEBUG) COMPATIBLE_IOCTL(PPPIOCNEWUNIT) COMPATIBLE_IOCTL(PPPIOCATTACH) COMPATIBLE_IOCTL(PPPIOCDETACH) +COMPATIBLE_IOCTL(PPPIOCSMRRU) +COMPATIBLE_IOCTL(PPPIOCCONNECT) +COMPATIBLE_IOCTL(PPPIOCDISCONN) +COMPATIBLE_IOCTL(PPPIOCATTCHAN) /* CDROM stuff */ COMPATIBLE_IOCTL(CDROMPAUSE) COMPATIBLE_IOCTL(CDROMRESUME) @@ -2517,6 +2522,11 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL) COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC) COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER) COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE) +/* DEVFS */ +COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV) +COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK) +COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE) +COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK) /* Raw devices */ COMPATIBLE_IOCTL(RAW_SETBIND) COMPATIBLE_IOCTL(RAW_GETBIND) diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 1fc0b1ba5..d4ecb0f4f 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc32.c,v 1.134 2000/03/07 22:27:30 davem Exp $ +/* $Id: sys_sparc32.c,v 1.136 2000/03/13 21:57:29 davem Exp $ * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -3645,7 +3645,7 @@ struct nfsctl_arg32 { }; union nfsctl_res32 { - struct knfs_fh cr32_getfh; + __u8 cr32_getfh[NFS_FHSIZE]; u32 cr32_debug; }; @@ -4218,3 +4218,12 @@ out_sem: out: return ret; } + +extern asmlinkage long sys_mincore(unsigned long start, size_t len, unsigned char *vec); + +asmlinkage long sys32_mincore(unsigned long start, u32 __len, unsigned char *vec) +{ + size_t len = (size_t) __len; + + return sys_mincore(start, len, vec); +} diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 9673cdd36..f7f5964e9 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sunos32.c,v 1.40 2000/03/07 22:27:31 davem Exp $ +/* $Id: sys_sunos32.c,v 1.41 2000/03/13 21:57:31 davem Exp $ * sys_sunos32.c: SunOS binary compatability layer on sparc64. * * Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu) @@ -252,56 +252,6 @@ asmlinkage void sunos_madvise(u32 address, u32 len, u32 strategy) unlock_kernel(); } -/* Places into character array, the status of all the pages in the passed - * range from 'addr' to 'addr + len'. -1 on failure, 0 on success... - * The encoding in each character is: - * low-bit is zero == Page is not in physical ram right now - * low-bit is one == Page is currently residing in core - * All other bits are undefined within the character so there... - * Also, if you try to get stats on an area outside of the user vm area - * *or* the passed base address is not aligned on a page boundary you - * get an error. - */ -asmlinkage int sunos_mincore(u32 __addr, u32 len, u32 u_array) -{ - pgd_t *pgdp; - pmd_t *pmdp; - pte_t *ptep; - unsigned long limit, addr = (unsigned long)__addr; - int num_pages, pnum, retval = -EINVAL; - char *array = (char *)A(u_array); - - lock_kernel(); - if(addr & ~(4096)) - goto out; - num_pages = (len / 4096); - retval = -EFAULT; - if(verify_area(VERIFY_WRITE, array, num_pages)) - goto out; - retval = -ENOMEM; - if((addr >= 0xf0000000) || ((addr + len) > 0xf0000000)) - goto out; /* I'm sure you're curious about kernel mappings.. */ - /* Wheee, go through pte's */ - pnum = 0; - for(limit = addr + len; addr < limit; addr += 4096, pnum++) { - pgdp = pgd_offset(current->mm, addr); - if(pgd_none(*pgdp)) - goto out; /* As per SunOS manpage */ - pmdp = pmd_offset(pgdp, addr); - if(pmd_none(*pmdp)) - goto out; /* As per SunOS manpage */ - ptep = pte_offset(pmdp, addr); - if(pte_none(*ptep)) - goto out; /* As per SunOS manpage */ - /* Page in core or Swapped page? */ - __put_user((pte_present(*ptep) ? 1 : 0), &array[pnum]); - } - retval = 0; /* Success... I think... */ -out: - unlock_kernel(); - return retval; -} - /* This just wants the soft limit (ie. rlim_cur element) of the RLIMIT_NOFILE * resource limit and is for backwards compatibility with older sunos * revs. diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 1f7ab3fef..0a0edbf82 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S @@ -1,4 +1,4 @@ -/* $Id: systbls.S,v 1.68 2000/02/16 07:31:38 davem Exp $ +/* $Id: systbls.S,v 1.69 2000/03/13 21:57:28 davem Exp $ * systbls.S: System call entry point tables for OS compatibility. * The native Linux system call table lives here also. * @@ -34,7 +34,7 @@ sys_call_table32: /*60*/ .word sys_umask, sys_chroot, sys32_newfstat, sys_fstat64, sys_getpagesize .word sys_msync, sys_vfork, sys32_pread, sys32_pwrite, sys_geteuid /*70*/ .word sys_getegid, sys32_mmap, sys_setreuid, sys_munmap, sys_mprotect - .word sys_nis_syscall, sys_vhangup, sys32_truncate64, sys_nis_syscall, sys32_getgroups16 + .word sys_nis_syscall, sys_vhangup, sys32_truncate64, sys32_mincore, sys32_getgroups16 /*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, sys32_setitimer, sys32_ftruncate64 .word sys_swapon, sys32_getitimer, sys_setuid, sys_sethostname, sys_setgid /*90*/ .word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid @@ -93,7 +93,7 @@ sys_call_table: /*60*/ .word sys_umask, sys_chroot, sys_newfstat, sys_nis_syscall, sys_getpagesize .word sys_msync, sys_vfork, sys_pread, sys_pwrite, sys_nis_syscall /*70*/ .word sys_nis_syscall, sys_mmap, sys_nis_syscall, sys64_munmap, sys_mprotect - .word sys_nis_syscall, sys_vhangup, sys_nis_syscall, sys_nis_syscall, sys_getgroups + .word sys_nis_syscall, sys_vhangup, sys_nis_syscall, sys_mincore, sys_getgroups /*80*/ .word sys_setgroups, sys_getpgrp, sys_nis_syscall, sys_setitimer, sys_nis_syscall .word sys_swapon, sys_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall /*90*/ .word sys_dup2, sys_nis_syscall, sys_fcntl, sys_select, sys_nis_syscall @@ -164,7 +164,7 @@ sunos_sys_table: .word sunos_nosys, sunos_sbrk, sunos_sstk .word sunos_mmap, sunos_vadvise, sys_munmap .word sys_mprotect, sunos_madvise, sys_vhangup - .word sunos_nosys, sunos_mincore, sys32_getgroups16 + .word sunos_nosys, sys32_mincore, sys32_getgroups16 .word sys32_setgroups16, sys_getpgrp, sunos_setpgrp .word sys32_setitimer, sunos_nosys, sys_swapon .word sys32_getitimer, sys_gethostname, sys_sethostname |