* [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
@ 2023-09-04 19:06 Tom Rini
2023-09-04 19:06 ` [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup Tom Rini
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Tom Rini @ 2023-09-04 19:06 UTC (permalink / raw)
To: u-boot
This function should now be a EVENT_SPY_SIMPLE call, update it.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
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 d64aa330f206..cfe9fdc9df55 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
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup
2023-09-04 19:06 [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Tom Rini
@ 2023-09-04 19:06 ` Tom Rini
2023-09-05 17:20 ` Milan P. Stanić
2023-09-05 3:01 ` [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Leo Liang
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2023-09-04 19:06 UTC (permalink / raw)
To: u-boot
Cc: Rick Chen, Leo Yu-Chi Liang, Simon Glass, Nikita Shubin,
Chanho Park, Yu Chien Peter Lin
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")
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Cc: Rick Chen <rick@andestech.com>
Cc: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Nikita Shubin <n.shubin@yadro.com>
Cc: Chanho Park <chanho61.park@samsung.com>
Cc: Yu Chien Peter Lin <peterlin@andestech.com>
---
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 cfe9fdc9df55..c1a9638c1ab7 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')) {
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
2023-09-04 19:06 [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Tom Rini
2023-09-04 19:06 ` [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup Tom Rini
@ 2023-09-05 3:01 ` Leo Liang
2023-09-05 8:58 ` Heinrich Schuchardt
2023-09-05 17:17 ` Milan P. Stanić
2023-09-06 17:50 ` Tom Rini
3 siblings, 1 reply; 8+ messages in thread
From: Leo Liang @ 2023-09-05 3:01 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot
Hi Tom,
On Mon, Sep 04, 2023 at 03:06:34PM -0400, Tom Rini wrote:
> This function should now be a EVENT_SPY_SIMPLE call, update it.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> 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 d64aa330f206..cfe9fdc9df55 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);
I cannot seem to find macro "EVENT_SPY_SIMPLE".
Is there anything that should be added?
Or did I miss anything?
Best regards,
Leo
>
> /*
> * This is called on secondary harts just after the IPI is init'd. Currently
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
2023-09-05 3:01 ` [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Leo Liang
@ 2023-09-05 8:58 ` Heinrich Schuchardt
2023-09-05 9:02 ` Leo Liang
0 siblings, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2023-09-05 8:58 UTC (permalink / raw)
To: Leo Liang; +Cc: u-boot, Tom Rini
On 05.09.23 05:01, Leo Liang wrote:
> Hi Tom,
>
> On Mon, Sep 04, 2023 at 03:06:34PM -0400, Tom Rini wrote:
>> This function should now be a EVENT_SPY_SIMPLE call, update it.
>>
>> Signed-off-by: Tom Rini <trini@konsulko.com>
>> ---
>> 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 d64aa330f206..cfe9fdc9df55 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);
>
> 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.
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
2023-09-05 8:58 ` Heinrich Schuchardt
@ 2023-09-05 9:02 ` Leo Liang
0 siblings, 0 replies; 8+ messages in thread
From: Leo Liang @ 2023-09-05 9:02 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: u-boot, Tom Rini
Hi Heinrich,
On Tue, Sep 05, 2023 at 10:58:31AM +0200, Heinrich Schuchardt wrote:
> On 05.09.23 05:01, Leo Liang wrote:
> > Hi Tom,
> >
> > On Mon, Sep 04, 2023 at 03:06:34PM -0400, Tom Rini wrote:
> > > This function should now be a EVENT_SPY_SIMPLE call, update it.
> > >
> > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > ---
> > > 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 d64aa330f206..cfe9fdc9df55 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);
> >
> > 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.
>
Thanks for the pointer!
Best regards,
Leo
> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
2023-09-04 19:06 [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Tom Rini
2023-09-04 19:06 ` [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup Tom Rini
2023-09-05 3:01 ` [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Leo Liang
@ 2023-09-05 17:17 ` Milan P. Stanić
2023-09-06 17:50 ` Tom Rini
3 siblings, 0 replies; 8+ messages in thread
From: Milan P. Stanić @ 2023-09-05 17:17 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot
On Mon, 2023-09-04 at 15:06, Tom Rini wrote:
> This function should now be a EVENT_SPY_SIMPLE call, update it.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
> ---
> 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 d64aa330f206..cfe9fdc9df55 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
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup
2023-09-04 19:06 ` [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup Tom Rini
@ 2023-09-05 17:20 ` Milan P. Stanić
0 siblings, 0 replies; 8+ messages in thread
From: Milan P. Stanić @ 2023-09-05 17:20 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot
On Mon, 2023-09-04 at 15:06, Tom Rini wrote:
> 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")
> Signed-off-by: Tom Rini <trini at konsulko.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
> ---
> 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(-)
>
> diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> index cfe9fdc9df55..c1a9638c1ab7 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')) {
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros
2023-09-04 19:06 [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Tom Rini
` (2 preceding siblings ...)
2023-09-05 17:17 ` Milan P. Stanić
@ 2023-09-06 17:50 ` Tom Rini
3 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2023-09-06 17:50 UTC (permalink / raw)
To: u-boot, Tom Rini
On Mon, 04 Sep 2023 15:06:34 -0400, Tom Rini wrote:
> This function should now be a EVENT_SPY_SIMPLE call, update it.
>
>
Applied to u-boot/next, thanks!
--
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-06 17:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-04 19:06 [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Tom Rini
2023-09-04 19:06 ` [PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup Tom Rini
2023-09-05 17:20 ` Milan P. Stanić
2023-09-05 3:01 ` [PATCH 1/2] riscv: Rework riscv_cpu_probe for current event macros Leo Liang
2023-09-05 8:58 ` Heinrich Schuchardt
2023-09-05 9:02 ` Leo Liang
2023-09-05 17:17 ` Milan P. Stanić
2023-09-06 17:50 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox