diff options
author | Ovidiu Panait <ovpanait@gmail.com> | 2022-05-31 21:14:27 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@amd.com> | 2022-06-24 14:16:00 +0200 |
commit | 8daf89678e9a8ce4203d2df6c65d9ff17aad785a (patch) | |
tree | cff596a8c6c55ff3995b424144eadee54995a7ad /arch/microblaze/cpu/cache.c | |
parent | ef0a592ae8e2961519510f48ffe48b655b31610a (diff) | |
download | u-boot-8daf89678e9a8ce4203d2df6c65d9ff17aad785a.tar.gz u-boot-8daf89678e9a8ce4203d2df6c65d9ff17aad785a.tar.bz2 u-boot-8daf89678e9a8ce4203d2df6c65d9ff17aad785a.zip |
microblaze: cache: improve icache Kconfig options
Replace CONFIG_ICACHE with a Kconfig option more limited in scope -
XILINX_MICROBLAZE0_USE_WIC. It should be enabled if the processor supports
the "wic" (Write to Instruction Cache) instruction. It will be used to
guard "wic" invocations in microblaze cache code.
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Link: https://lore.kernel.org/r/20220531181435.3473549-6-ovpanait@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'arch/microblaze/cpu/cache.c')
-rw-r--r-- | arch/microblaze/cpu/cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index 4e8e228a22..b6bbc215b3 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -58,14 +58,14 @@ void flush_cache(ulong addr, ulong size) { int i; for (i = 0; i < size; i += 4) { - asm volatile ( -#ifdef CONFIG_ICACHE + if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WIC)) { + asm volatile ( "wic %0, r0;" -#endif "nop;" : : "r" (addr + i) : "memory"); + } if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) { asm volatile ( |