patch-2.1.101 linux/arch/mips/mm/tfp.c

Next file: linux/arch/mips/sgi/kernel/Makefile
Previous file: linux/arch/mips/mm/r6000.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/arch/mips/mm/tfp.c linux/arch/mips/mm/tfp.c
@@ -1,9 +1,10 @@
-/* $Id: tfp.c,v 1.2 1997/12/02 05:51:09 ralf Exp $
+/*
  * tfp.c: MMU and cache routines specific to the r8000 (TFP).
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
  */
-
+#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
@@ -85,7 +86,12 @@
         /* XXX */
 }
 
-void ld_mmu_tfp(void)
+static int tfp_user_mode(struct pt_regs *regs)
+{
+	return (regs->cp0_status & ST0_KSU) == KSU_USER;
+}
+
+__initfunc(void ld_mmu_tfp(void))
 {
 	flush_cache_all = tfp_flush_cache_all;
 	flush_cache_mm = tfp_flush_cache_mm;
@@ -101,10 +107,11 @@
 
         add_wired_entry = tfp_add_wired_entry;
 
+	user_mode = tfp_user_mode;
+
 	load_pgd = tfp_load_pgd;
 	pgd_init = tfp_pgd_init;
     
 	flush_cache_all();
 	flush_tlb_all();
 }
-

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