[parisc-linux-cvs] Tidyups

Matthew Wilcox willy@ldl.fc.hp.com
Sat, 03 Mar 2001 21:55:44 -0700


As noted previously, the tidyups.

Index: arch/parisc/kernel/sys_parisc.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sys_parisc.c,v
retrieving revision 1.7
diff -u -p -r1.7 sys_parisc.c
--- sys_parisc.c	2001/02/16 18:19:48	1.7
+++ sys_parisc.c	2001/03/04 04:44:42
@@ -17,9 +17,7 @@ int sys_pipe(int *fildes)
 	int fd[2];
 	int error;
 
-	lock_kernel();
 	error = do_pipe(fd);
-	unlock_kernel();
 	if (!error) {
 		if (copy_to_user(fildes, fd, 2*sizeof(int)))
 			error = -EFAULT;
@@ -39,29 +37,23 @@ int sys_mmap(unsigned long addr, unsigne
 		unsigned long offset)
 {
 	struct file * file = NULL;
-	int error;
+	int error = -EBADF;
 
-	down(&current->mm->mmap_sem);
-	lock_kernel();
 	if (!(flags & MAP_ANONYMOUS)) {
-		error = -EBADF;
 		file = fget(fd);
 		if (!file)
 			goto out;
 	}
 	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+
+	down(&current->mm->mmap_sem);
 	error = do_mmap(file, addr, len, prot, flags, offset);
+	up(&current->mm->mmap_sem);
+
 	if (file != NULL)
 		fput(file);
 out:
-	unlock_kernel();
-	up(&current->mm->mmap_sem);
 	return error;
-}
-
-int sys_ioperm(unsigned long from, unsigned long num, int on)
-{
-	return -ENOSYS;
 }
 
 long sys_shmat_wrapper(int shmid, void *shmaddr, int shmflag)
Index: drivers/char/vt.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/char/vt.c,v
retrieving revision 1.6
diff -u -p -r1.6 vt.c
--- vt.c	2001/01/25 00:00:40	1.6
+++ vt.c	2001/03/04 04:44:42
@@ -476,7 +476,7 @@ int vt_ioctl(struct tty_struct *tty, str
 		ucval = keyboard_type;
 		goto setchar;
 
-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips__) && !defined(__arm__) && !defined(__sh__)
+#if defined(__i386__) || defined(__mc68000__) || defined(__ppc__) || defined(__sparc__)
 		/*
 		 * These cannot be implemented on any machine that implements
 		 * ioperm() in user level (such as Alpha PCs).
Index: include/asm-parisc/unistd.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/unistd.h,v
retrieving revision 1.17
diff -u -p -r1.17 unistd.h
--- unistd.h	2001/02/02 03:37:08	1.17
+++ unistd.h	2001/03/04 04:44:43
@@ -579,7 +579,7 @@
 #define __NR_uselib              (__NR_Linux + 86)
 #define __NR_swapon              (__NR_Linux + 87)
 #define __NR_reboot              (__NR_Linux + 88)
-#define __NR_readdir             (__NR_Linux + 89)
+/* #define __NR_readdir             (__NR_Linux + 89) */
 #define __NR_mmap                (__NR_Linux + 90)
 #define __NR_munmap              (__NR_Linux + 91)
 #define __NR_truncate            (__NR_Linux + 92)
@@ -591,7 +591,7 @@
 #define __NR_recv                (__NR_Linux + 98)
 #define __NR_statfs              (__NR_Linux + 99)
 #define __NR_fstatfs            (__NR_Linux + 100)
-#define __NR_ioperm             (__NR_Linux + 101)
+/* #define __NR_ioperm             (__NR_Linux + 101) */
 #define __NR_socketcall         (__NR_Linux + 102)
 #define __NR_syslog             (__NR_Linux + 103)
 #define __NR_setitimer          (__NR_Linux + 104)
@@ -602,7 +602,7 @@
 #define __NR_pwrite             (__NR_Linux + 109)
 #define __NR_getcwd             (__NR_Linux + 110)
 #define __NR_vhangup            (__NR_Linux + 111)
-#define __NR_idle               (__NR_Linux + 112)
+/* #define __NR_idle               (__NR_Linux + 112) */
 #define __NR_vfork              (__NR_Linux + 113)
 #define __NR_wait4              (__NR_Linux + 114)
 #define __NR_swapoff            (__NR_Linux + 115)