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

Next file: linux/arch/mips/mm/fault.c
Previous file: linux/arch/mips/lib/strncpy_user.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/arch/mips/mm/andes.c linux/arch/mips/mm/andes.c
@@ -1,13 +1,14 @@
-/* $Id: andes.c,v 1.2 1997/12/02 05:51:07 ralf Exp $
+/*
  * andes.c: MMU and cache operations for the R10000 (ANDES).
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * $Id: andes.c,v 1.5 1998/05/04 09:18:26 ralf Exp $
  */
-
+#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
@@ -85,7 +86,12 @@
         /* XXX */
 }
 
-void ld_mmu_andes(void)
+static int andes_user_mode(struct pt_regs *regs)
+{
+	return (regs->cp0_status & ST0_KSU) == KSU_USER;
+}
+
+__initfunc(void ld_mmu_andes(void))
 {
 	flush_cache_all = andes_flush_cache_all;
 	flush_cache_mm = andes_flush_cache_mm;
@@ -100,6 +106,8 @@
 	flush_tlb_page = andes_flush_tlb_page;
     
         add_wired_entry = andes_add_wired_entry;
+
+	user_mode = andes_user_mode;
 
 	load_pgd = andes_load_pgd;
 	pgd_init = andes_pgd_init;

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