Commit 198bb4ce authored by Leonid Yegoshin's avatar Leonid Yegoshin Committed by Ralf Baechle

MIPS: Add function for flushing the TLB using the TLBINV instruction

Signed-off-by: default avatarLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6136/
parent b0d4d300
...@@ -704,6 +704,19 @@ static inline int mm_insn_16bit(u16 insn) ...@@ -704,6 +704,19 @@ static inline int mm_insn_16bit(u16 insn)
return (opcode >= 1 && opcode <= 3) ? 1 : 0; 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 * Functions to access the R10000 performance counters. These are basically
* mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment