Merge branch 'next/generic' into mips-for-linux-next
[deliverable/linux.git] / arch / mips / mm / tlb-r4k.c
index 88dc49cfa16387fa7125a359e93c05c70c6af9b8..2dc625346c40f3b40f616310479b07c6695edd02 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
+#include <asm/tlbmisc.h>
 
 extern void build_tlb_refill_handler(void);
 
@@ -376,51 +377,6 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
        EXIT_CRITICAL(flags);
 }
 
-/*
- * Used for loading TLB entries before trap_init() has started, when we
- * don't actually want to add a wired entry which remains throughout the
- * lifetime of the system
- */
-
-static int temp_tlb_entry __cpuinitdata;
-
-__init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
-                              unsigned long entryhi, unsigned long pagemask)
-{
-       int ret = 0;
-       unsigned long flags;
-       unsigned long wired;
-       unsigned long old_pagemask;
-       unsigned long old_ctx;
-
-       ENTER_CRITICAL(flags);
-       /* Save old context and create impossible VPN2 value */
-       old_ctx = read_c0_entryhi();
-       old_pagemask = read_c0_pagemask();
-       wired = read_c0_wired();
-       if (--temp_tlb_entry < wired) {
-               printk(KERN_WARNING
-                      "No TLB space left for add_temporary_entry\n");
-               ret = -ENOSPC;
-               goto out;
-       }
-
-       write_c0_index(temp_tlb_entry);
-       write_c0_pagemask(pagemask);
-       write_c0_entryhi(entryhi);
-       write_c0_entrylo0(entrylo0);
-       write_c0_entrylo1(entrylo1);
-       mtc0_tlbw_hazard();
-       tlb_write_indexed();
-       tlbw_use_hazard();
-
-       write_c0_entryhi(old_ctx);
-       write_c0_pagemask(old_pagemask);
-out:
-       EXIT_CRITICAL(flags);
-       return ret;
-}
-
 static int __cpuinitdata ntlb;
 static int __init set_ntlb(char *str)
 {
@@ -458,8 +414,6 @@ void __cpuinit tlb_init(void)
                write_c0_pagegrain(pg);
        }
 
-       temp_tlb_entry = current_cpu_data.tlbsize - 1;
-
         /* From this point on the ARC firmware is dead.  */
        local_flush_tlb_all();
 
This page took 0.025267 seconds and 5 git commands to generate.