Re: [PATCH 1/2] efi/loongarch: Implement efi_cache_sync_image

Huacai Chen <[email protected]>
Newsgroups org.kernel.vger.linux-efi,dev.linux.lists.loongarch,org.kernel.vger.linux-kernel
Message-ID <CAAhV-H6ggC8c=KGOZ4Fo5v-CnWpKUP47nXY9OgD6iLD+dnQTBA@mail.gmail.com>
Hi, Rui,

On Mon, Apr 27, 2026 at 11:45 AM WANG Rui <[email protected]> wrote:
>
> Provide a LoongArch implementation of efi_cache_sync_image() to ensure
> instruction cache coherency after the kernel image is relocated.
Please also add "()" after function name in the subject.

>
> Signed-off-by: WANG Rui <[email protected]>
> ---
>  drivers/firmware/efi/libstub/loongarch.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/firmware/efi/libstub/loongarch.c b/drivers/firmware/efi/libstub/loongarch.c
> index 9825f5218137..26495747f69f 100644
> --- a/drivers/firmware/efi/libstub/loongarch.c
> +++ b/drivers/firmware/efi/libstub/loongarch.c
> @@ -82,3 +82,8 @@ efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image,
>         real_kernel_entry(true, (unsigned long)cmdline_ptr,
>                           (unsigned long)efi_system_table);
>  }
> +
> +void efi_cache_sync_image(unsigned long image_base, unsigned long alloc_size)
> +{
> +       asm volatile ("ibar 0" ::: "memory");
> +}
Please move it after check_platform_features(), which is the same as arm64.

Others look good to me.

Reviewed-by: Huacai Chen <[email protected]>
> --
> 2.54.0
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.