* [PATCH] spl: add __noreturn attribute to spl_invoke_opensbi function
[not found] <CGME20230829012025epcas2p1a233126199d0ec5aa2e9ca892c963b9d@epcas2p1.samsung.com>
@ 2023-08-29 1:20 ` Chanho Park
2023-09-04 7:03 ` Leo Liang
0 siblings, 1 reply; 2+ messages in thread
From: Chanho Park @ 2023-08-29 1:20 UTC (permalink / raw)
To: Leo, Rick Chen, u-boot; +Cc: Simon Glass, Tom Rini, Lukas Auer, Chanho Park
spl_invoke_opensbi function is not returned to SPL. Thus, we need to
set __noreturn function attribute.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
common/spl/spl_opensbi.c | 7 ++++---
include/spl.h | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index b0f40076c345..e2aaa460468c 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -43,11 +43,12 @@ static int spl_opensbi_find_uboot_node(void *blob, int *uboot_node)
return -ENODEV;
}
-void spl_invoke_opensbi(struct spl_image_info *spl_image)
+void __noreturn spl_invoke_opensbi(struct spl_image_info *spl_image)
{
int ret, uboot_node;
ulong uboot_entry;
- void (*opensbi_entry)(ulong hartid, ulong dtb, ulong info);
+ typedef void __noreturn (*opensbi_entry_t)(ulong hartid, ulong dtb, ulong info);
+ opensbi_entry_t opensbi_entry;
if (!spl_image->fdt_addr) {
pr_err("No device tree specified in SPL image\n");
@@ -74,7 +75,7 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image)
opensbi_info.options = CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS;
opensbi_info.boot_hart = gd->arch.boot_hart;
- opensbi_entry = (void (*)(ulong, ulong, ulong))spl_image->entry_point;
+ opensbi_entry = (opensbi_entry_t)spl_image->entry_point;
invalidate_icache_all();
#ifdef CONFIG_SPL_SMP
diff --git a/include/spl.h b/include/spl.h
index 92bcaa90a4af..93e906431e7d 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -862,7 +862,7 @@ void __noreturn spl_optee_entry(void *arg0, void *arg1, void *arg2, void *arg3);
/**
* spl_invoke_opensbi - boot using a RISC-V OpenSBI image
*/
-void spl_invoke_opensbi(struct spl_image_info *spl_image);
+void __noreturn spl_invoke_opensbi(struct spl_image_info *spl_image);
/**
* board_return_to_bootrom - allow for boards to continue with the boot ROM
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spl: add __noreturn attribute to spl_invoke_opensbi function
2023-08-29 1:20 ` [PATCH] spl: add __noreturn attribute to spl_invoke_opensbi function Chanho Park
@ 2023-09-04 7:03 ` Leo Liang
0 siblings, 0 replies; 2+ messages in thread
From: Leo Liang @ 2023-09-04 7:03 UTC (permalink / raw)
To: Chanho Park; +Cc: Rick Chen, u-boot, Simon Glass, Tom Rini, Lukas Auer
On Tue, Aug 29, 2023 at 10:20:14AM +0900, Chanho Park wrote:
> spl_invoke_opensbi function is not returned to SPL. Thus, we need to
> set __noreturn function attribute.
>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
> common/spl/spl_opensbi.c | 7 ++++---
> include/spl.h | 2 +-
> 2 files changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-04 7:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20230829012025epcas2p1a233126199d0ec5aa2e9ca892c963b9d@epcas2p1.samsung.com>
2023-08-29 1:20 ` [PATCH] spl: add __noreturn attribute to spl_invoke_opensbi function Chanho Park
2023-09-04 7:03 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox