Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms
@ 2026-06-04 10:36 Breno Leitao
  2026-06-15 15:32 ` Breno Leitao
  0 siblings, 1 reply; 4+ messages in thread
From: Breno Leitao @ 2026-06-04 10:36 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Dmitry Osipenko
  Cc: Thierry Reding, linux-tegra, linux-kernel, kernel-team,
	Breno Leitao

My Grace host started to show this warning:
  WARNING: drivers/soc/tegra/fuse/tegra-apbmisc.c:120 at tegra_read_straps
   tegra30_fuse_add_randomness
   tegra30_fuse_init
   tegra_fuse_probe

tegra_read_straps() warns when the static "chipid" cache is still zero,
using it as a proxy for "APBMISC has been initialised". However chipid
is only ever populated lazily by tegra_read_chipid() when it reads the
APBMISC register.

Guard on apbmisc_base instead, which is set unconditionally in
tegra_init_apbmisc_resources() for all platforms and is already the
sentinel used by tegra_read_chipid().

Fixes: c71f213fa5af ("soc/tegra: fuse: Warn if straps are not ready")
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
index 87ae63a7e52d..7aba7c58bad0 100644
--- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
+++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
@@ -117,7 +117,7 @@ bool tegra_is_silicon(void)
 
 u32 tegra_read_straps(void)
 {
-	WARN(!chipid, "Tegra ABP MISC not yet available\n");
+	WARN(!apbmisc_base, "Tegra ABP MISC not yet available\n");
 
 	return strapping;
 }

---
base-commit: 1f5563665c2715e5ab2f64ec3d4b0af60927014f
change-id: 20260604-tegra_warn_fix-f9e8085b4175

Best regards,
-- 
Breno Leitao <leitao@debian.org>


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

* Re: [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms
  2026-06-04 10:36 [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms Breno Leitao
@ 2026-06-15 15:32 ` Breno Leitao
  2026-06-22  7:24   ` Thierry Reding
  0 siblings, 1 reply; 4+ messages in thread
From: Breno Leitao @ 2026-06-15 15:32 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Dmitry Osipenko
  Cc: Thierry Reding, linux-tegra, linux-kernel, kernel-team


On Thu, Jun 04, 2026 at 03:36:17AM -0700, Breno Leitao wrote:
> My Grace host started to show this warning:
>   WARNING: drivers/soc/tegra/fuse/tegra-apbmisc.c:120 at tegra_read_straps
>    tegra30_fuse_add_randomness
>    tegra30_fuse_init
>    tegra_fuse_probe
> 
> tegra_read_straps() warns when the static "chipid" cache is still zero,
> using it as a proxy for "APBMISC has been initialised". However chipid
> is only ever populated lazily by tegra_read_chipid() when it reads the
> APBMISC register.
> 
> Guard on apbmisc_base instead, which is set unconditionally in
> tegra_init_apbmisc_resources() for all platforms and is already the
> sentinel used by tegra_read_chipid().
> 
> Fixes: c71f213fa5af ("soc/tegra: fuse: Warn if straps are not ready")
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> index 87ae63a7e52d..7aba7c58bad0 100644
> --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
> +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> @@ -117,7 +117,7 @@ bool tegra_is_silicon(void)
>  
>  u32 tegra_read_straps(void)
>  {
> -	WARN(!chipid, "Tegra ABP MISC not yet available\n");
> +	WARN(!apbmisc_base, "Tegra ABP MISC not yet available\n");

Hello Thierry,

Have you had a chance to look at this one? This is showing up in my
Grace all the time.

Thanks


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

* Re: [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms
  2026-06-15 15:32 ` Breno Leitao
@ 2026-06-22  7:24   ` Thierry Reding
  2026-06-22  9:33     ` Breno Leitao
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2026-06-22  7:24 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Jonathan Hunter, Dmitry Osipenko, Thierry Reding, linux-tegra,
	linux-kernel, kernel-team

[-- Attachment #1: Type: text/plain, Size: 2977 bytes --]

On Mon, Jun 15, 2026 at 08:32:25AM -0700, Breno Leitao wrote:
> 
> On Thu, Jun 04, 2026 at 03:36:17AM -0700, Breno Leitao wrote:
> > My Grace host started to show this warning:
> >   WARNING: drivers/soc/tegra/fuse/tegra-apbmisc.c:120 at tegra_read_straps
> >    tegra30_fuse_add_randomness
> >    tegra30_fuse_init
> >    tegra_fuse_probe
> > 
> > tegra_read_straps() warns when the static "chipid" cache is still zero,
> > using it as a proxy for "APBMISC has been initialised". However chipid
> > is only ever populated lazily by tegra_read_chipid() when it reads the
> > APBMISC register.
> > 
> > Guard on apbmisc_base instead, which is set unconditionally in
> > tegra_init_apbmisc_resources() for all platforms and is already the
> > sentinel used by tegra_read_chipid().
> > 
> > Fixes: c71f213fa5af ("soc/tegra: fuse: Warn if straps are not ready")
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> > ---
> >  drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > index 87ae63a7e52d..7aba7c58bad0 100644
> > --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > @@ -117,7 +117,7 @@ bool tegra_is_silicon(void)
> >  
> >  u32 tegra_read_straps(void)
> >  {
> > -	WARN(!chipid, "Tegra ABP MISC not yet available\n");
> > +	WARN(!apbmisc_base, "Tegra ABP MISC not yet available\n");
> 
> Hello Thierry,
> 
> Have you had a chance to look at this one? This is showing up in my
> Grace all the time.

Yeah, sorry for the delay. You're right in that we now get the warning
until we end up calling tegra_read_chipid(). However, I don't think the
Fixes: reference is right. I think this started showing up after:

  8b8ee2e56f95 ("soc/tegra: Use ARM SMCCC to get chip ID, revision, and platform info")

I don't think we accounted for tegra_read_straps() in that case and I
suspect that we're not seeing this elsewhere because we do end up
calling tegra_read_chipid() earlier in DT systems whereas for ACPI it
might only get called at a later point, if at all.

There's also this patch:

  https://lore.kernel.org/linux-tegra/20260514051252.2401568-1-kkartik@nvidia.com/

IIUC, that's the only place where tegra_read_straps() gets called on
ACPI systems. Would you mind testing that patch (without the one that
we're currently discussing) to confirm that that's the only callsite?
It doesn't really matter either way, because applying your fix here is
the right thing to do, but it'd still be useful as a data point.

If you don't have any objections, I'm going to replace the Fixes: line,
but otherwise this patch looks good.

Also, I'm going to check if we can get some better coverage in our daily
testing for the ACPI platforms. Do you happen to run any daily tests on
your systems for linux-next?

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms
  2026-06-22  7:24   ` Thierry Reding
@ 2026-06-22  9:33     ` Breno Leitao
  0 siblings, 0 replies; 4+ messages in thread
From: Breno Leitao @ 2026-06-22  9:33 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Jonathan Hunter, Dmitry Osipenko, Thierry Reding, linux-tegra,
	linux-kernel, kernel-team

Hello Thierry,

On Mon, Jun 22, 2026 at 09:24:03AM +0200, Thierry Reding wrote:
> > Have you had a chance to look at this one? This is showing up in my
> > Grace all the time.
> 
> Yeah, sorry for the delay. You're right in that we now get the warning
> until we end up calling tegra_read_chipid(). However, I don't think the
> Fixes: reference is right. I think this started showing up after:
> 
>   8b8ee2e56f95 ("soc/tegra: Use ARM SMCCC to get chip ID, revision, and platform info")

Ack!

> I don't think we accounted for tegra_read_straps() in that case and I
> suspect that we're not seeing this elsewhere because we do end up
> calling tegra_read_chipid() earlier in DT systems whereas for ACPI it
> might only get called at a later point, if at all.
> 
> There's also this patch:
> 
>   https://lore.kernel.org/linux-tegra/20260514051252.2401568-1-kkartik@nvidia.com/
> 
> IIUC, that's the only place where tegra_read_straps() gets called on
> ACPI systems. Would you mind testing that patch (without the one that
> we're currently discussing) to confirm that that's the only callsite?

Sure, I've just tested it, and it doesn't hit the problematic path.
Thanks for pointing it out.

> It doesn't really matter either way, because applying your fix here is
> the right thing to do, but it'd still be useful as a data point.

Agreed, they seem independent. This patch fixes the issue, while
Kartik's patch avoids hitting it.

> If you don't have any objections, I'm going to replace the Fixes: line,
> but otherwise this patch looks good.

Ack!

> Also, I'm going to check if we can get some better coverage in our daily
> testing for the ACPI platforms. Do you happen to run any daily tests on
> your systems for linux-next?

Yes, I use my Grace machine for development, and I am usually on
linux-next, so, I get these crazy issues from time to time.

Thanks for the reply,
--breno

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

end of thread, other threads:[~2026-06-22  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 10:36 [PATCH] soc/tegra: fuse: Fix spurious straps warning on SMCCC platforms Breno Leitao
2026-06-15 15:32 ` Breno Leitao
2026-06-22  7:24   ` Thierry Reding
2026-06-22  9:33     ` Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox