[PATCH 04/10] microblaze: cache: improve icache Kconfig options
Michal Simek
michal.simek at xilinx.com
Fri Apr 22 14:47:28 CEST 2022
On 4/11/22 18:26, Ovidiu Panait wrote:
> 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 at gmail.com>
> ---
>
> arch/microblaze/Kconfig | 4 ----
> arch/microblaze/cpu/cache.c | 6 +++---
> board/xilinx/microblaze-generic/Kconfig | 7 +++++++
> 3 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
> index 5a2e91104f..a25a95a013 100644
> --- a/arch/microblaze/Kconfig
> +++ b/arch/microblaze/Kconfig
> @@ -25,10 +25,6 @@ config TARGET_MICROBLAZE_GENERIC
>
> endchoice
>
> -config ICACHE
> - bool "Enable icache support"
> - default y
> -
> source "board/xilinx/Kconfig"
> source "board/xilinx/microblaze-generic/Kconfig"
>
> 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)) {
the same as I commented in 3/10.
M
More information about the U-Boot
mailing list