diff mbox series

[1/2] riscv: Rework riscv_cpu_probe for current event macros

Message ID 20230904190635.3896494-1-trini@konsulko.com
State Accepted
Commit 68f446fb9b0b137dd4e288985ed674be5e544a1e
Delegated to: Tom Rini
Headers show
Series [1/2] riscv: Rework riscv_cpu_probe for current event macros | expand

Commit Message

Tom Rini Sept. 4, 2023, 7:06 p.m. UTC
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(-)

Comments

Leo Yu-Chi Liang Sept. 5, 2023, 3:01 a.m. UTC | #1
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
>
Heinrich Schuchardt Sept. 5, 2023, 8:58 a.m. UTC | #2
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>
Leo Yu-Chi Liang Sept. 5, 2023, 9:02 a.m. UTC | #3
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>
>
Milan P. Stanić Sept. 5, 2023, 5:17 p.m. UTC | #4
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
>
Tom Rini Sept. 6, 2023, 5:50 p.m. UTC | #5
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!
diff mbox series

Patch

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