mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 13:14:19 +08:00
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>
This commit is contained in:
parent
deff6fb3a7
commit
499b847521
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user