linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
@ 2022-11-12 15:40 Peter Rosin
  2022-11-18 21:38 ` Peter Rosin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Rosin @ 2022-11-12 15:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Russell King, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
	Clément Léger, linux-arm-kernel

The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
apparently not for the older SAMA5D3. At least not always.

Solves a build-time regression with the following symptom:

sama5.c:(.init.text+0x48): undefined reference to `outer_cache'

Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
Signed-off-by: Peter Rosin <peda@axentia.se>
---
 arch/arm/mach-at91/sama5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi!

I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
bigger change, and not just a tweak of the regressing commit...

Cheers,
Peter

diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index 67ed68fbe3a5..bf2b5c6a18c6 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
 static void __init sama5_secure_cache_init(void)
 {
 	sam_secure_init();
-	if (sam_linux_is_optee_available())
+	if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
 		outer_cache.write_sec = sama5_l2c310_write_sec;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-12 15:40 [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache Peter Rosin
@ 2022-11-18 21:38 ` Peter Rosin
  2022-11-22 15:13 ` Thorsten Leemhuis
  2022-11-24 10:52 ` Claudiu.Beznea
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Rosin @ 2022-11-18 21:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Russell King, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
	Clément Léger, linux-arm-kernel, regressions

Hi!

2022-11-12 at 16:40, Peter Rosin wrote:
> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
> apparently not for the older SAMA5D3. At least not always.
> 
> Solves a build-time regression with the following symptom:
> 
> sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
> 
> Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>  arch/arm/mach-at91/sama5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi!
> 
> I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
> in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
> bigger change, and not just a tweak of the regressing commit...
> 
> Cheers,
> Peter
> 
> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> index 67ed68fbe3a5..bf2b5c6a18c6 100644
> --- a/arch/arm/mach-at91/sama5.c
> +++ b/arch/arm/mach-at91/sama5.c
> @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
>  static void __init sama5_secure_cache_init(void)
>  {
>  	sam_secure_init();
> -	if (sam_linux_is_optee_available())
> +	if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
>  		outer_cache.write_sec = sama5_l2c310_write_sec;
>  }
>  

It's been a week or so of silence, thus CC:ing the regression bot so
that this issue is not lost.

Cheers,
Peter

#regzbot ^introduced: 3b5a7ca7d252 
#regzbot title: Build-time failure for SAMA5D3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-12 15:40 [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache Peter Rosin
  2022-11-18 21:38 ` Peter Rosin
@ 2022-11-22 15:13 ` Thorsten Leemhuis
  2022-11-22 17:14   ` Clément Léger
  2022-11-24 10:52 ` Claudiu.Beznea
  2 siblings, 1 reply; 8+ messages in thread
From: Thorsten Leemhuis @ 2022-11-22 15:13 UTC (permalink / raw)
  To: Clément Léger, Claudiu Beznea
  Cc: Alexandre Belloni, Russell King, linux-arm-kernel, Peter Rosin,
	linux-kernel, regressions

Hi, this is your Linux kernel regression tracker.

On 12.11.22 16:40, Peter Rosin wrote:
> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
> apparently not for the older SAMA5D3. At least not always.
> 
> Solves a build-time regression with the following symptom:
> 
> sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
> 
> Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
> Signed-off-by: Peter Rosin <peda@axentia.se>

Clément Léger and Claudiu Beznea: what's up here? Is there a particular
reason why this patch did get any feedback from you by now? It's ten
days old and Peter already sent a kind of reminder a few days ago.

Reminder, ideally this regression should be fixed by now. For details
see the section "Prioritize work on fixing regressions"  in
Documentation/process/handling-regressions.rst (
https://docs.kernel.org/process/handling-regressions.html )

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I deal with a lot of
reports and sometimes miss something important when writing mails like
this. If that's the case here, don't hesitate to tell me in a public
reply, it's in everyone's interest to set the public record straight.

> ---
>  arch/arm/mach-at91/sama5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi!
> 
> I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
> in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
> bigger change, and not just a tweak of the regressing commit...
> 
> Cheers,
> Peter
> 
> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> index 67ed68fbe3a5..bf2b5c6a18c6 100644
> --- a/arch/arm/mach-at91/sama5.c
> +++ b/arch/arm/mach-at91/sama5.c
> @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
>  static void __init sama5_secure_cache_init(void)
>  {
>  	sam_secure_init();
> -	if (sam_linux_is_optee_available())
> +	if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
>  		outer_cache.write_sec = sama5_l2c310_write_sec;
>  }
>  

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-22 15:13 ` Thorsten Leemhuis
@ 2022-11-22 17:14   ` Clément Léger
  2022-11-23  7:19     ` Claudiu.Beznea
  0 siblings, 1 reply; 8+ messages in thread
From: Clément Léger @ 2022-11-22 17:14 UTC (permalink / raw)
  To: Thorsten Leemhuis
  Cc: Claudiu Beznea, Alexandre Belloni, Russell King,
	linux-arm-kernel, Peter Rosin, linux-kernel, regressions

Le Tue, 22 Nov 2022 16:13:40 +0100,
Thorsten Leemhuis <regressions@leemhuis.info> a écrit :

> Hi, this is your Linux kernel regression tracker.
> 
> On 12.11.22 16:40, Peter Rosin wrote:
> > The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
> > apparently not for the older SAMA5D3. At least not always.
> > 
> > Solves a build-time regression with the following symptom:
> > 
> > sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
> > 
> > Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
> > Signed-off-by: Peter Rosin <peda@axentia.se>  
> 
> Clément Léger and Claudiu Beznea: what's up here? Is there a particular
> reason why this patch did get any feedback from you by now? It's ten
> days old and Peter already sent a kind of reminder a few days ago.

Hi Thorsten,

Sorry for the lack of answer, I'm not sure about the best solution to
tackle this problem. adding IS_ENABLED(CONFIG_OUTER_CACHE) seems like a
good way to avoid modifying the whole configuration. If ok for Claudiu,
I think it is the best thing to do since it will work for all cases.

Clément

> 
> Reminder, ideally this regression should be fixed by now. For details
> see the section "Prioritize work on fixing regressions"  in
> Documentation/process/handling-regressions.rst (
> https://docs.kernel.org/process/handling-regressions.html )
> 
> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
> 
> P.S.: As the Linux kernel's regression tracker I deal with a lot of
> reports and sometimes miss something important when writing mails like
> this. If that's the case here, don't hesitate to tell me in a public
> reply, it's in everyone's interest to set the public record straight.
> 
> > ---
> >  arch/arm/mach-at91/sama5.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Hi!
> > 
> > I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
> > in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
> > bigger change, and not just a tweak of the regressing commit...
> > 
> > Cheers,
> > Peter
> > 
> > diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> > index 67ed68fbe3a5..bf2b5c6a18c6 100644
> > --- a/arch/arm/mach-at91/sama5.c
> > +++ b/arch/arm/mach-at91/sama5.c
> > @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
> >  static void __init sama5_secure_cache_init(void)
> >  {
> >  	sam_secure_init();
> > -	if (sam_linux_is_optee_available())
> > +	if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
> >  		outer_cache.write_sec = sama5_l2c310_write_sec;
> >  }
> >    



-- 
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-22 17:14   ` Clément Léger
@ 2022-11-23  7:19     ` Claudiu.Beznea
  2022-11-23  8:38       ` Peter Rosin
  0 siblings, 1 reply; 8+ messages in thread
From: Claudiu.Beznea @ 2022-11-23  7:19 UTC (permalink / raw)
  To: clement.leger, regressions, peda
  Cc: alexandre.belloni, linux, linux-arm-kernel, peda, linux-kernel,
	regressions

On 22.11.2022 19:14, Clément Léger wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Le Tue, 22 Nov 2022 16:13:40 +0100,
> Thorsten Leemhuis <regressions@leemhuis.info> a écrit :
> 
>> Hi, this is your Linux kernel regression tracker.
>>
>> On 12.11.22 16:40, Peter Rosin wrote:
>>> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
>>> apparently not for the older SAMA5D3. At least not always.

Peter, what do you mean by "at least not always" here? Are you talking
about the OUTER_CACHE flag?

>>>
>>> Solves a build-time regression with the following symptom:
>>>
>>> sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
>>>
>>> Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
>>> Signed-off-by: Peter Rosin <peda@axentia.se>
>>
>> Clément Léger and Claudiu Beznea: what's up here? 

It will be in the next AT91 fixes PR.

Is there a particular
>> reason why this patch did get any feedback from you by now? It's ten

Something wrong with the email client on my side as I lost this patch. It
is back on my radar since Peter replied to it.


>> days old and Peter already sent a kind of reminder a few days ago.
> 
> Hi Thorsten,
> 
> Sorry for the lack of answer, I'm not sure about the best solution to
> tackle this problem. adding IS_ENABLED(CONFIG_OUTER_CACHE) seems like a
> good way to avoid modifying the whole configuration. If ok for Claudiu,
> I think it is the best thing to do since it will work for all cases.
> 
> Clément
> 
>>
>> Reminder, ideally this regression should be fixed by now. For details
>> see the section "Prioritize work on fixing regressions"  in
>> Documentation/process/handling-regressions.rst (
>> https://docs.kernel.org/process/handling-regressions.html )
>>
>> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
>>
>> P.S.: As the Linux kernel's regression tracker I deal with a lot of
>> reports and sometimes miss something important when writing mails like
>> this. If that's the case here, don't hesitate to tell me in a public
>> reply, it's in everyone's interest to set the public record straight.
>>
>>> ---
>>>  arch/arm/mach-at91/sama5.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> Hi!
>>>
>>> I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
>>> in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
>>> bigger change, and not just a tweak of the regressing commit...
>>>
>>> Cheers,
>>> Peter
>>>
>>> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
>>> index 67ed68fbe3a5..bf2b5c6a18c6 100644
>>> --- a/arch/arm/mach-at91/sama5.c
>>> +++ b/arch/arm/mach-at91/sama5.c
>>> @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
>>>  static void __init sama5_secure_cache_init(void)
>>>  {
>>>     sam_secure_init();
>>> -   if (sam_linux_is_optee_available())
>>> +   if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
>>>             outer_cache.write_sec = sama5_l2c310_write_sec;
>>>  }
>>>
> 
> 
> 
> --
> Clément Léger,
> Embedded Linux and Kernel engineer at Bootlin
> https://bootlin.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-23  7:19     ` Claudiu.Beznea
@ 2022-11-23  8:38       ` Peter Rosin
  2022-11-23 10:40         ` Nicolas Ferre
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Rosin @ 2022-11-23  8:38 UTC (permalink / raw)
  To: Claudiu.Beznea, clement.leger, regressions
  Cc: alexandre.belloni, linux, linux-arm-kernel, linux-kernel, regressions

Hi!

2022-11-23 at 08:19, Claudiu.Beznea@microchip.com wrote:
> On 22.11.2022 19:14, Clément Léger wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> Le Tue, 22 Nov 2022 16:13:40 +0100,
>> Thorsten Leemhuis <regressions@leemhuis.info> a écrit :
>>
>>> Hi, this is your Linux kernel regression tracker.
>>>
>>> On 12.11.22 16:40, Peter Rosin wrote:
>>>> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
>>>> apparently not for the older SAMA5D3. At least not always.
> 
> Peter, what do you mean by "at least not always" here? Are you talking
> about the OUTER_CACHE flag?

I'm not familiar with all options for L2 caching. I was just being cautious
to not exclude the possibility that there could be some variation within
the SAMA5D3 series (I'm on SAMA5D31) or with an external L2 cache or
something such. If there's simply no possible way to have an L2 cache on
any SAMA5D3, feel free to edit that "At least not always" out while you
commit.

>>>>
>>>> Solves a build-time regression with the following symptom:
>>>>
>>>> sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
>>>>
>>>> Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
>>>> Signed-off-by: Peter Rosin <peda@axentia.se>
>>>
>>> Clément Léger and Claudiu Beznea: what's up here? 
> 
> It will be in the next AT91 fixes PR.

Great, thanks!

Cheers,
Peter

*snip*

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-23  8:38       ` Peter Rosin
@ 2022-11-23 10:40         ` Nicolas Ferre
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2022-11-23 10:40 UTC (permalink / raw)
  To: Peter Rosin, Claudiu.Beznea, clement.leger, regressions
  Cc: alexandre.belloni, linux, linux-arm-kernel, linux-kernel, regressions

On 23/11/2022 at 09:38, Peter Rosin wrote:
> Hi!
> 
> 2022-11-23 at 08:19, Claudiu.Beznea@microchip.com wrote:
>> On 22.11.2022 19:14, Clément Léger wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Le Tue, 22 Nov 2022 16:13:40 +0100,
>>> Thorsten Leemhuis <regressions@leemhuis.info> a écrit :
>>>
>>>> Hi, this is your Linux kernel regression tracker.
>>>>
>>>> On 12.11.22 16:40, Peter Rosin wrote:
>>>>> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
>>>>> apparently not for the older SAMA5D3. At least not always.
>>
>> Peter, what do you mean by "at least not always" here? Are you talking
>> about the OUTER_CACHE flag?
> 
> I'm not familiar with all options for L2 caching. I was just being cautious
> to not exclude the possibility that there could be some variation within
> the SAMA5D3 series (I'm on SAMA5D31) or with an external L2 cache or
> something such. If there's simply no possible way to have an L2 cache on
> any SAMA5D3, feel free to edit that "At least not always" out while you
> commit.

I confirm that there is no L2 cache in any variant of SAMA5D3.

[..]

Thanks, best regards,
   Nicolas
-- 
Nicolas Ferre


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache
  2022-11-12 15:40 [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache Peter Rosin
  2022-11-18 21:38 ` Peter Rosin
  2022-11-22 15:13 ` Thorsten Leemhuis
@ 2022-11-24 10:52 ` Claudiu.Beznea
  2 siblings, 0 replies; 8+ messages in thread
From: Claudiu.Beznea @ 2022-11-24 10:52 UTC (permalink / raw)
  To: peda, linux-kernel
  Cc: linux, Nicolas.Ferre, alexandre.belloni, clement.leger, linux-arm-kernel

On 12.11.2022 17:40, Peter Rosin wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The L2 cache is present on the newer SAMA5D2 and SAMA5D4 families, but
> apparently not for the older SAMA5D3. At least not always.
> 
> Solves a build-time regression with the following symptom:
> 
> sama5.c:(.init.text+0x48): undefined reference to `outer_cache'
> 
> Fixes: 3b5a7ca7d252 ("ARM: at91: setup outer cache .write_sec() callback if needed")
> Signed-off-by: Peter Rosin <peda@axentia.se>

Applied to at91-fixes, thanks!

> ---
>  arch/arm/mach-at91/sama5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi!
> 
> I'm not sure this is the correct solution? Maybe SAMA5D3 should bring
> in CONFIG_OUTER_CACHE unconditionally instead? But that seems like a
> bigger change, and not just a tweak of the regressing commit...
> 
> Cheers,
> Peter
> 
> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> index 67ed68fbe3a5..bf2b5c6a18c6 100644
> --- a/arch/arm/mach-at91/sama5.c
> +++ b/arch/arm/mach-at91/sama5.c
> @@ -26,7 +26,7 @@ static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
>  static void __init sama5_secure_cache_init(void)
>  {
>         sam_secure_init();
> -       if (sam_linux_is_optee_available())
> +       if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
>                 outer_cache.write_sec = sama5_l2c310_write_sec;
>  }
> 
> --
> 2.20.1
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-24 10:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 15:40 [PATCH] ARM: at91: fix build for SAMA5D3 w/o L2 cache Peter Rosin
2022-11-18 21:38 ` Peter Rosin
2022-11-22 15:13 ` Thorsten Leemhuis
2022-11-22 17:14   ` Clément Léger
2022-11-23  7:19     ` Claudiu.Beznea
2022-11-23  8:38       ` Peter Rosin
2022-11-23 10:40         ` Nicolas Ferre
2022-11-24 10:52 ` Claudiu.Beznea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).