]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/mm/tlb-r4k.c
MIPS: Mask out limit field when calculating wired entry count
[karo-tx-linux.git] / arch / mips / mm / tlb-r4k.c
index bba9c1484b41e1bc8c124b3a2c50e53eb27e032c..0596505770dba382d4821df12f67cd431480873a 100644 (file)
@@ -65,7 +65,7 @@ void local_flush_tlb_all(void)
        write_c0_entrylo0(0);
        write_c0_entrylo1(0);
 
-       entry = read_c0_wired();
+       entry = num_wired_entries();
 
        /*
         * Blast 'em all away.
@@ -385,7 +385,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
        old_ctx = read_c0_entryhi();
        htw_stop();
        old_pagemask = read_c0_pagemask();
-       wired = read_c0_wired();
+       wired = num_wired_entries();
        write_c0_wired(wired + 1);
        write_c0_index(wired);
        tlbw_use_hazard();      /* What is the hazard here? */
@@ -449,7 +449,7 @@ __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
        htw_stop();
        old_ctx = read_c0_entryhi();
        old_pagemask = read_c0_pagemask();
-       wired = read_c0_wired();
+       wired = num_wired_entries();
        if (--temp_tlb_entry < wired) {
                printk(KERN_WARNING
                       "No TLB space left for add_temporary_entry\n");