This is a note to let you know that I've just added the patch titled

    MIPS: tlb-r4k: Add missing HTW stop/start sequences

to the 3.17-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mips-tlb-r4k-add-missing-htw-stop-start-sequences.patch
and it can be found in the queue-3.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6a8dff6ab16c903b0d8ef5fbf21543f39bf5d675 Mon Sep 17 00:00:00 2001
From: Markos Chandras <[email protected]>
Date: Mon, 17 Nov 2014 09:31:07 +0000
Subject: MIPS: tlb-r4k: Add missing HTW stop/start sequences

From: Markos Chandras <[email protected]>

commit 6a8dff6ab16c903b0d8ef5fbf21543f39bf5d675 upstream.

HTW needs to stop and start again whenever the EntryHI register
changes otherwise an inflight HTW operation might use the new
EntryHI register for updating an old entry and that could lead
to crashes or even a machine check exception. We fix this by
ensuring the HTW has stop whenever the EntryHI register is about
to change

Signed-off-by: Markos Chandras <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/8511/
Signed-off-by: Ralf Baechle <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/mips/mm/tlb-r4k.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -299,6 +299,7 @@ void __update_tlb(struct vm_area_struct
 
        local_irq_save(flags);
 
+       htw_stop();
        pid = read_c0_entryhi() & ASID_MASK;
        address &= (PAGE_MASK << 1);
        write_c0_entryhi(address | pid);
@@ -346,6 +347,7 @@ void __update_tlb(struct vm_area_struct
                        tlb_write_indexed();
        }
        tlbw_use_hazard();
+       htw_start();
        flush_itlb_vm(vma);
        local_irq_restore(flags);
 }
@@ -422,6 +424,7 @@ __init int add_temporary_entry(unsigned
 
        local_irq_save(flags);
        /* Save old context and create impossible VPN2 value */
+       htw_stop();
        old_ctx = read_c0_entryhi();
        old_pagemask = read_c0_pagemask();
        wired = read_c0_wired();
@@ -443,6 +446,7 @@ __init int add_temporary_entry(unsigned
 
        write_c0_entryhi(old_ctx);
        write_c0_pagemask(old_pagemask);
+       htw_start();
 out:
        local_irq_restore(flags);
        return ret;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.17/mips-asm-uaccess-add-v1-register-to-clobber-list-on-eva.patch
queue-3.17/mips-cpu-probe-set-the-ftlb-probability-bit-on-supported-cores.patch
queue-3.17/mips-lib-memcpy-restore-nop-on-delay-slot-before-returning-to-caller.patch
queue-3.17/mips-tlbex-fix-potential-htw-race-on-tlbl-m-s-handlers.patch
queue-3.17/mips-tlb-r4k-add-missing-htw-stop-start-sequences.patch
queue-3.17/mips-r4kcache-add-eva-case-for-protected_writeback_dcache_line.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to