diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-03-05 04:15:40 +0100 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2016-03-09 11:00:40 +0100 |
commit | 499b84752140a8b40f8f0956c72357743f755250 (patch) | |
tree | 35d06f159bdc7df5a9fa8819c7d68801fa4506cb | |
parent | deff6fb3a7790e93264292982000275e78bb12e5 (diff) | |
download | u-boot-imx-499b84752140a8b40f8f0956c72357743f755250.zip u-boot-imx-499b84752140a8b40f8f0956c72357743f755250.tar.gz u-boot-imx-499b84752140a8b40f8f0956c72357743f755250.tar.bz2 |
MIPS: fix mips_cache fallback without __builtin_mips_cache
The "R" constraint supplies the address of an variable in a register. Use
"r" instead and adjust asm to supply the content of addr in a register
instead.
Fixes: 2b8bcc5a ("MIPS: avoid .set ISA for cache operations")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-rw-r--r-- | arch/mips/include/asm/cacheops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h index a3b07c6..002b839 100644 --- a/arch/mips/include/asm/cacheops.h +++ b/arch/mips/include/asm/cacheops.h @@ -16,7 +16,7 @@ static inline void mips_cache(int op, const volatile void *addr) #ifdef __GCC_HAVE_BUILTIN_MIPS_CACHE __builtin_mips_cache(op, addr); #else - __asm__ __volatile__("cache %0, %1" : : "i"(op), "R"(addr)); + __asm__ __volatile__("cache %0, 0(%1)" : : "i"(op), "r"(addr)); #endif } |