patch-2.1.87 linux/arch/m68k/kernel/sys_m68k.c

Next file: linux/arch/m68k/kernel/time.c
Previous file: linux/arch/m68k/kernel/signal.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.86/linux/arch/m68k/kernel/sys_m68k.c linux/arch/m68k/kernel/sys_m68k.c
@@ -17,6 +17,7 @@
 #include <linux/stat.h>
 #include <linux/mman.h>
 #include <linux/file.h>
+#include <linux/utsname.h>
 
 #include <asm/setup.h>
 #include <asm/uaccess.h>
@@ -308,6 +309,10 @@
 	    }
 	  if (!--i && len)
 	    {
+	      /*
+	       * No need to page align here since it is done by
+	       * virt_to_phys_040().
+	       */
 	      addr += PAGE_SIZE;
 	      i = PAGE_SIZE / 16;
 	      /* Recompute physical address when crossing a page
@@ -462,7 +467,14 @@
 	    }
 	  if (!--i && len)
 	    {
+
+	      /*
+	       * We just want to jump to the first cache line
+	       * in the next page.
+	       */
 	      addr += PAGE_SIZE;
+	      addr &= PAGE_MASK;
+
 	      i = PAGE_SIZE / 16;
 	      /* Recompute physical address when crossing a page
 	         boundary. */
@@ -559,13 +571,13 @@
 				cacr |= 4;
 			if (cache & FLUSH_CACHE_DATA)
 				cacr |= 0x400;
-			len >>= 4;
+			len >>= 2;
 			while (len--) {
 				__asm__ __volatile__ ("movec %1, %%caar\n\t"
 						      "movec %0, %%cacr"
 						      : /* no outputs */
 						      : "r" (cacr), "r" (addr));
-				addr += 16;
+				addr += 4;
 			}
 		} else {
 			/* Flush the whole cache, even if page granularity requested. */
@@ -587,4 +599,14 @@
 out:
 	unlock_kernel();
 	return ret;
+}
+
+/*
+ * Old cruft
+ */
+asmlinkage int sys_pause(void)
+{
+	current->state = TASK_INTERRUPTIBLE;
+	schedule();
+	return -ERESTARTNOHAND;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov