Received: from multi.imgtec.com ([194.200.65.239]:1076 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6865326Ab3KNQM7CoOj3 (ORCPT ); Thu, 14 Nov 2013 17:12:59 +0100 From: Markos Chandras Subject: [PATCH v2 09/12] MIPS: Add function for flushing the TLB using the TLBINV instruction Date: Thu, 14 Nov 2013 16:12:29 +0000 Message-ID: <1384445552-30573-10-git-send-email-markos.chandras@imgtec.com> In-Reply-To: <1384445552-30573-1-git-send-email-markos.chandras@imgtec.com> References: <1384445552-30573-1-git-send-email-markos.chandras@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-mips@linux-mips.org Cc: Leonid Yegoshin , Markos Chandras Message-ID: <20131114161229.iCfu-4btSxwRja_0AsnB1zlmyE7TLVj3adD0bT0j-qA@z> From: Leonid Yegoshin Signed-off-by: Leonid Yegoshin Signed-off-by: Markos Chandras --- arch/mips/include/asm/mipsregs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 0558f9b..d9910a1 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) } /* + * 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 * performance counter number encoded into bits 1 ... 5 of the instruction. -- 1.8.4.3