From 68f446fb9b0b137dd4e288985ed674be5e544a1e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 4 Sep 2023 15:06:34 -0400 Subject: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function should now be a EVENT_SPY_SIMPLE call, update it. Tested-by: Milan P. Stanić Reviewed-by: Heinrich Schuchardt Signed-off-by: Tom Rini --- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c index d64aa330f20..cfe9fdc9df5 100644 --- a/arch/riscv/cpu/cpu.c +++ b/arch/riscv/cpu/cpu.c @@ -66,7 +66,7 @@ static inline bool supports_extension(char ext) #endif /* CONFIG_CPU */ } -static int riscv_cpu_probe(void *ctx, struct event *event) +static int riscv_cpu_probe(void) { #ifdef CONFIG_CPU int ret; @@ -79,7 +79,7 @@ static int riscv_cpu_probe(void *ctx, struct event *event) return 0; } -EVENT_SPY(EVT_DM_POST_INIT_R, riscv_cpu_probe); +EVENT_SPY_SIMPLE(EVT_DM_POST_INIT_R, riscv_cpu_probe); /* * This is called on secondary harts just after the IPI is init'd. Currently From 59d2a7d7317b02f8224b5cd207c3318662c7fe15 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 4 Sep 2023 15:06:35 -0400 Subject: [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With having both an EVENT_SPY_SIMPLE setup for both riscv_cpu_probe and riscv_cpu_setup we do not need the latter function to call the former function as it will already have been done in time. Fixes: 1c55d62fb9cc ("riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback") Tested-by: Milan P. Stanić Signed-off-by: Tom Rini --- arch/riscv/cpu/cpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c index cfe9fdc9df5..c1a9638c1ab 100644 --- a/arch/riscv/cpu/cpu.c +++ b/arch/riscv/cpu/cpu.c @@ -94,11 +94,7 @@ static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1) int riscv_cpu_setup(void) { - int ret; - - ret = riscv_cpu_probe(ctx, event); - if (ret) - return ret; + int __maybe_unused ret; /* Enable FPU */ if (supports_extension('d') || supports_extension('f')) {