MIPS: asm: Add prefetch instruction for EVA
authorLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Tue, 3 Dec 2013 10:48:15 +0000 (10:48 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 26 Mar 2014 22:09:12 +0000 (23:09 +0100)
EVA can use the PREFE instruction to perform the virtual address
translation using the user mapping of the address rather than the
kernel mapping.

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
arch/mips/include/asm/asm.h

index 879691d194af426f5532d47c4e467491bf785038..b79be18a9267ebe70ad41166e1d4c9f35ac4285d 100644 (file)
@@ -149,6 +149,13 @@ symbol             =       value
                pref    hint, addr;                     \
                .set    pop
 
+#define PREFE(hint, addr)                              \
+               .set    push;                           \
+               .set    mips0;                          \
+               .set    eva;                            \
+               prefe   hint, addr;                     \
+               .set    pop
+
 #define PREFX(hint,addr)                               \
                .set    push;                           \
                .set    mips4;                          \
@@ -158,6 +165,7 @@ symbol              =       value
 #else /* !CONFIG_CPU_HAS_PREFETCH */
 
 #define PREF(hint, addr)
+#define PREFE(hint, addr)
 #define PREFX(hint, addr)
 
 #endif /* !CONFIG_CPU_HAS_PREFETCH */