From: Matthias Schiffer Date: Sat, 5 Mar 2016 03:15:40 +0000 (+0100) Subject: MIPS: fix mips_cache fallback without __builtin_mips_cache X-Git-Tag: v2016.03~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=499b84752140a8b40f8f0956c72357743f755250;p=u-boot 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 Cc: Paul Burton Cc: Daniel Schwierzeck --- diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h index a3b07c6ad0..002b839fd4 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 }