From 5b736cd243f942d474621a7521e08b34b8e4197b Mon Sep 17 00:00:00 2001 From: Leonid Yegoshin Date: Tue, 3 Dec 2013 10:48:15 +0000 Subject: MIPS: asm: Add prefetch instruction for EVA 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 Signed-off-by: Markos Chandras --- arch/mips/include/asm/asm.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/mips/include/asm/asm.h') diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 879691d194af..b79be18a9267 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -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 */ -- cgit v1.2.2 From 932449459522ef879c6d6a8fa707d801bdd8080e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 4 Dec 2013 13:56:03 +0000 Subject: MIPS: asm: Add wrappers for EVA/non-EVA instructions EVA uses specific instructions for accessing user memory. Instead of polluting the kernel with numerous #ifdef CONFIG_EVA we add wrappers for all the instructions that need special handling when EVA is enabled. Signed-off-by: Markos Chandras --- arch/mips/include/asm/asm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/mips/include/asm/asm.h') diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index b79be18a9267..b153e7991a9d 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -18,6 +18,7 @@ #define __ASM_ASM_H #include +#include #ifndef CAT #ifdef __STDC__ -- cgit v1.2.2 From a809d46066d5171ed446d59a51cd1e57d99fcfc3 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 30 Mar 2014 13:20:10 +0200 Subject: MIPS: Fix gigaton of warning building with microMIPS. With binutils 2.24 the attempt to switch with microMIPS mode to MIPS III mode through .set mips3 results in *lots* of warnings like {standard input}: Assembler messages: {standard input}:397: Warning: the 64-bit MIPS architecture does not support the `smartmips' extension during a kernel build. Fixed by using .set arch=r4000 instead. This breaks support for building the kernel with binutils 2.13 which was supported for 32 bit kernels only anyway and 2.14 which was a bad vintage for MIPS anyway. Signed-off-by: Ralf Baechle --- arch/mips/include/asm/asm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/mips/include/asm/asm.h') diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index b153e7991a9d..7c26b28bf252 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -146,7 +146,7 @@ symbol = value #define PREF(hint,addr) \ .set push; \ - .set mips4; \ + .set arch=r5000; \ pref hint, addr; \ .set pop @@ -159,7 +159,7 @@ symbol = value #define PREFX(hint,addr) \ .set push; \ - .set mips4; \ + .set arch=r5000; \ prefx hint, addr; \ .set pop -- cgit v1.2.2