diff -ur /home/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- /home/linux/arch/i386/kernel/entry.S	Wed Nov  6 20:54:51 1996
+++ linux/arch/i386/kernel/entry.S	Tue Dec  3 17:43:43 1996
@@ -674,4 +674,5 @@
 	.long SYMBOL_NAME(sys_sched_rr_get_interval)
 	.long SYMBOL_NAME(sys_nanosleep)
 	.long SYMBOL_NAME(sys_mremap)
-	.space (NR_syscalls-163)*4
+	.long SYMBOL_NAME(sys_cachectl)
+	.space (NR_syscalls-164)*4
diff -ur /home/linux/arch/i386/kernel/sys_i386.c linux/arch/i386/kernel/sys_i386.c
--- /home/linux/arch/i386/kernel/sys_i386.c	Fri Apr 12 16:49:30 1996
+++ linux/arch/i386/kernel/sys_i386.c	Tue Dec  3 20:00:50 1996
@@ -174,3 +174,30 @@
 		}
 	return -EINVAL;
 }
+
+/*
+ * Cache control for ix86, x>=4. Allows one to enable or disable
+ * the L1 cache. See asm/system.h for l1cacheoff() and l1cacheon().
+ */
+
+asmlinkage int sys_cachectl (int mode)
+{
+	if (!suser())
+		return -EPERM;
+
+	if (x86 < 4)
+		return -EINVAL;
+	
+	switch (mode) {
+		case 0: {
+			l1cacheoff();
+			return 0;
+			}
+		case 1: {
+			l1cacheon();
+			return 0;
+			}
+		default:
+			return -EINVAL;
+	}
+}
diff -ur /home/linux/include/asm-i386/system.h linux/include/asm-i386/system.h
--- /home/linux/include/asm-i386/system.h	Mon Aug  5 17:13:54 1996
+++ linux/include/asm-i386/system.h	Tue Dec  3 20:03:52 1996
@@ -188,6 +188,39 @@
 	: /* no inputs */ \
 	:"ax")
 
+/*
+ * Flush and disable/enable L1 cache respectively. The two bits in
+ * %cr0 that are being twiddled are CD and NW. The "jmp" to the
+ * next instruction is to force a queue flush.
+ */
+#define l1cacheoff() \
+__asm__ __volatile__ ( \
+	"movl %%cr0,%%eax\n\t" \
+	"orl $0x40000000,%%eax\n\t" \
+	"orl $0x20000000,%%eax\n\t" \
+	"movl %%eax,%%cr0\n\t" \
+	"wbinvd\n\t" \
+	"invd\n\t" \
+	"jmp next_off\n\t" \
+	"next_off:\n\t" \
+	"nop\n\t" \
+	: /* no outputs */ \
+	: /* no inputs */ \
+	:"ax")
+
+#define l1cacheon() \
+__asm__ __volatile__ ( \
+	"wbinvd\n\t" \
+	"invd\n\t" \
+	"jmp next_on\n\t" \
+	"next_on:\n\t" \
+	"movl %%cr0,%%eax\n\t" \
+	"andl $0xbfffffff,%%eax\n\t" \
+	"andl $0xdfffffff,%%eax\n\t" \
+	"movl %%eax,%%cr0\n\t" \
+	: /* no outputs */ \
+	: /* no inputs */ \
+	:"ax")
 
 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
 #define tas(ptr) (xchg((ptr),1))
diff -ur /home/linux/include/asm-i386/unistd.h linux/include/asm-i386/unistd.h
--- /home/linux/include/asm-i386/unistd.h	Fri Mar 22 16:34:02 1996
+++ linux/include/asm-i386/unistd.h	Tue Dec  3 15:18:21 1996
@@ -169,6 +169,7 @@
 #define __NR_sched_rr_get_interval	161
 #define __NR_nanosleep		162
 #define __NR_mremap		163
+#define __NR_cachectl		164
 
 /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
 #define _syscall0(type,name) \
