riscv: Rework riscv_cpu_probe for current event macros
PATCH 1/2 riscv: Rework riscv_cpu_probe for current event macros
This function should now be a EVENT_SPY_SIMPLE call, update it.
--- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/cpu/cpu.c +2 -2
@@ -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
Signature · 1 line
2.34.1
PATCH 2/2 riscv: Correct event usage for riscv_cpu_probe/setup
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.
---
Cc: Rick Chen <[email protected]>
Cc: Leo Yu-Chi Liang <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Nikita Shubin <[email protected]>
Cc: Chanho Park <[email protected]>
Cc: Yu Chien Peter Lin <[email protected]>
--- arch/riscv/cpu/cpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/riscv/cpu/cpu.c +1 -5
@@ -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' )) {
Signature · 1 line
2.34.1
Re: [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup
Quoted 6 lines · Tom Rini
With having both an
EVENT_SPY_SIMPLEsetup for bothriscv_cpu_probeandriscv_cpu_setupwe 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")Signed-off-by Tom Rini <trini at konsulko.com>
Quoted 31 lines
---
Cc: Rick Chen <rick at andestech.com>
Cc: Leo Yu-Chi Liang <ycliang at andestech.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Nikita Shubin <n.shubin at yadro.com>
Cc: Chanho Park <chanho61.park at samsung.com>
Cc: Yu Chien Peter Lin <peterlin at andestech.com>--- arch/riscv/cpu/cpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)arch/riscv/cpu/cpu.c +1
-5@@ -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' )) {Signature · 1 line
2.34.1
Hi Tom,
Quoted 21 lines · Tom Rini
This function should now be a
EVENT_SPY_SIMPLEcall, update it.Signed-off-by Tom Rini <[email protected]>--- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/cpu/cpu.c +1
-1@@ -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;
arch/riscv/cpu/cpu.c static int riscv_cpu_probe(void *ctx, struct event *event) · line 82
Quoted 5 lines
arch/riscv/cpu/cpu.c +1
-1@@ -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);
I cannot seem to find macro "EVENT_SPY_SIMPLE".
Is there anything that should be added?
Or did I miss anything?
Best regards,
Leo
Quoted 6 lines
arch/riscv/cpu/cpu.c +0
-0/* * This is called on secondary harts just after the IPI is init'd. Currently Signature · 1 line
2.34.1
Heinrich Schuchardt
Reviewed-byQuoted 25 lines · Leo Liang
Hi Tom,
Quoted 22 lines · Tom Rini
This function should now be a
EVENT_SPY_SIMPLEcall, update it.Signed-off-by Tom Rini <[email protected]>--- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/cpu/cpu.c +1
-1@@ -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)
Quoted 8 lines
arch/riscv/cpu/cpu.c static int riscv_cpu_probe(void *ctx, struct event *event) · line 82
Quoted 4 lines
arch/riscv/cpu/cpu.c +1
-1return 0 ; } -EVENT_SPY (EVT_DM_POST_INIT_R , riscv_cpu_probe); +EVENT_SPY_SIMPLE (EVT_DM_POST_INIT_R , riscv_cpu_probe);I cannot seem to find macro "
EVENT_SPY_SIMPLE".
Is there anything that should be added?
Or did I miss anything?
This patch is only applicable to origin/next. The definition there is in include/event.h:311.
Hi Heinrich,
Quoted 33 lines · Heinrich Schuchardt
Quoted 23 lines · Leo Liang
Hi Tom,
Quoted 20 lines · Tom Rini
This function should now be a
EVENT_SPY_SIMPLEcall, update it.Signed-off-by Tom Rini <[email protected]>--- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/cpu/cpu.c +1
-1@@ -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)Quoted 8 lines
arch/riscv/cpu/cpu.c static int riscv_cpu_probe(void *ctx, struct event *event) · line 82
Quoted 4 lines
arch/riscv/cpu/cpu.c +1
-1return 0 ; } -EVENT_SPY (EVT_DM_POST_INIT_R , riscv_cpu_probe); +EVENT_SPY_SIMPLE (EVT_DM_POST_INIT_R , riscv_cpu_probe);I cannot seem to find macro "
EVENT_SPY_SIMPLE".
Is there anything that should be added?
Or did I miss anything?
Quoted 3 lines
This patch is only applicable to origin/next. The definition there is in
include/event.h:311.
Thanks for the pointer!
Best regards,
Leo
Quoted 2 lines
Reviewed-by Heinrich Schuchardt <[email protected]>
Quoted 3 lines · Tom Rini
This function should now be a
EVENT_SPY_SIMPLEcall, update it.Signed-off-by Tom Rini <trini at konsulko.com>
Quoted 29 lines
--- arch/riscv/cpu/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/cpu/cpu.c +2
-2@@ -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 Signature · 1 line
2.34.1
Quoted 3 lines · Tom Rini
This function should now be a
EVENT_SPY_SIMPLEcall, update it.
Applied to u-boot/next, thanks!
Signature · 1 line
Tom