From: WANG Rui <r@hev.cc>
To: Ard Biesheuvel <ardb@kernel.org>, Huacai Chen <chenhuacai@kernel.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
WANG Xuerui <kernel@xen0n.name>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
loongarch@lists.linux.dev, WANG Rui <r@hev.cc>
Subject: [PATCH 1/2] efi/loongarch: Implement efi_cache_sync_image
Date: Mon, 27 Apr 2026 11:44:50 +0800 [thread overview]
Message-ID: <20260427034451.717817-2-r@hev.cc> (raw)
In-Reply-To: <20260427034451.717817-1-r@hev.cc>
Provide a LoongArch implementation of efi_cache_sync_image() to ensure
instruction cache coherency after the kernel image is relocated.
Signed-off-by: WANG Rui <r@hev.cc>
---
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");
+}
--
2.54.0
next prev parent reply other threads:[~2026-04-27 3:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 3:44 [PATCH 0/2] efi/libstub: Ensure instruction cache coherency after kernel relocation WANG Rui
2026-04-27 3:44 ` WANG Rui [this message]
2026-04-27 8:09 ` [PATCH 1/2] efi/loongarch: Implement efi_cache_sync_image Huacai Chen
2026-04-27 3:44 ` [PATCH 2/2] efi/libstub: Synchronize instruction cache after kernel relocation WANG Rui
2026-04-27 8:09 ` Huacai Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427034451.717817-2-r@hev.cc \
--to=r@hev.cc \
--cc=ardb@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=kernel@xen0n.name \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox