diff options
author | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> | 2013-11-14 11:12:29 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-22 14:19:00 -0500 |
commit | 198bb4cef13525dd9391623c514557123cc6cc31 (patch) | |
tree | 8282a9e992fe0d756857f8e2846268ae9c945e2d /arch | |
parent | b0d4d30026ba4e5f3c71012ec90b77084fe9825b (diff) |
MIPS: Add function for flushing the TLB using the TLBINV instruction
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6136/
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/mipsregs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 0558f9b429ae..d9910a1e754a 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -705,6 +705,19 @@ static inline int mm_insn_16bit(u16 insn) | |||
705 | } | 705 | } |
706 | 706 | ||
707 | /* | 707 | /* |
708 | * TLB Invalidate Flush | ||
709 | */ | ||
710 | static inline void tlbinvf(void) | ||
711 | { | ||
712 | __asm__ __volatile__( | ||
713 | ".set push\n\t" | ||
714 | ".set noreorder\n\t" | ||
715 | ".word 0x42000004\n\t" /* tlbinvf */ | ||
716 | ".set pop"); | ||
717 | } | ||
718 | |||
719 | |||
720 | /* | ||
708 | * Functions to access the R10000 performance counters. These are basically | 721 | * Functions to access the R10000 performance counters. These are basically |
709 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit | 722 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit |
710 | * performance counter number encoded into bits 1 ... 5 of the instruction. | 723 | * performance counter number encoded into bits 1 ... 5 of the instruction. |