patch-2.2.4 linux/arch/sparc/kernel/sys_sparc.c

Next file: linux/arch/sparc/kernel/systbls.S
Previous file: linux/arch/sparc/kernel/sparc_ksyms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/arch/sparc/kernel/sys_sparc.c linux/arch/sparc/kernel/sys_sparc.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc.c,v 1.49 1998/10/11 06:57:53 davem Exp $
+/* $Id: sys_sparc.c,v 1.51 1999/03/20 22:02:00 davem Exp $
  * linux/arch/sparc/kernel/sys_sparc.c
  *
  * This file contains various random system calls that
@@ -25,6 +25,8 @@
 #include <asm/uaccess.h>
 #include <asm/ipc.h>
 
+/* #define DEBUG_UNIMP_SYSCALL */
+
 /* XXX Make this per-binary type, this way we can detect the type of
  * XXX a binary.  Every Sparc executable calls this very early on.
  */
@@ -189,6 +191,7 @@
 			goto out;
 	}
 	retval = -ENOMEM;
+	len = PAGE_ALIGN(len);
 	if(!(flags & MAP_FIXED) && !addr) {
 		addr = get_unmapped_area(addr, len);
 		if(!addr)
@@ -202,6 +205,7 @@
 
 	if(ARCH_SUN4C_SUN4) {
 		if(((addr >= 0x20000000) && (addr < 0xe0000000))) {
+			/* VM hole */
 			retval = current->mm->brk;
 			goto out_putf;
 		}
@@ -223,9 +227,14 @@
 asmlinkage unsigned long
 c_sys_nis_syscall (struct pt_regs *regs)
 {
+	static int count = 0;
+	
+	if (count++ > 5) return -ENOSYS;
 	lock_kernel();
 	printk ("Unimplemented SPARC system call %d\n",(int)regs->u_regs[1]);
+#ifdef DEBUG_UNIMP_SYSCALL	
 	show_regs (regs);
+#endif
 	unlock_kernel();
 	return -ENOSYS;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)