]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Add function for flushing the TLB using the TLBINV instruction
authorLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Thu, 14 Nov 2013 16:12:29 +0000 (16:12 +0000)
committerJohn Crispin <blogic@openwrt.org>
Tue, 14 Jan 2014 11:48:28 +0000 (12:48 +0100)
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6136/

arch/mips/include/asm/mipsregs.h

index 0558f9b429aece4e02e4630f2bc80da461c259ae..d9910a1e754a87b1a847c5c1ad98d64d312192ea 100644 (file)
@@ -704,6 +704,19 @@ static inline int mm_insn_16bit(u16 insn)
        return (opcode >= 1 && opcode <= 3) ? 1 : 0;
 }
 
+/*
+ * TLB Invalidate Flush
+ */
+static inline void tlbinvf(void)
+{
+       __asm__ __volatile__(
+               ".set push\n\t"
+               ".set noreorder\n\t"
+               ".word 0x42000004\n\t" /* tlbinvf */
+               ".set pop");
+}
+
+
 /*
  * Functions to access the R10000 performance counters.         These are basically
  * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit