Skip to content

Commit

Permalink
MIPS: Add function for flushing the TLB using the TLBINV instruction
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
Leonid Yegoshin authored and Ralf Baechle committed Jan 22, 2014
1 parent b0d4d30 commit 198bb4c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 198bb4c

Please sign in to comment.