linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
@ 2022-08-05 23:07 Florian Fainelli
  2022-08-06 17:45 ` Sudeep Holla
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Florian Fainelli @ 2022-08-05 23:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Sudeep Holla, Greg Kroah-Hartman,
	Rafael J. Wysocki, Ionela Voinescu, Conor Dooley

Architectures which do not have cacheinfo such as ARM 32-bit would spit
out the following during boot:

 Early cacheinfo failed, ret = -2

Treat -ENOENT specifically to silence this error since it means that the
platform does not support reporting its cache information.

Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/base/arch_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 0424b59b695e..eaa1b8d2d39d 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -735,7 +735,7 @@ void update_siblings_masks(unsigned int cpuid)
 	int cpu, ret;
 
 	ret = detect_cache_attributes(cpuid);
-	if (ret)
+	if (ret && ret != -ENOENT)
 		pr_info("Early cacheinfo failed, ret = %d\n", ret);
 
 	/* update core and thread sibling masks */
-- 
2.25.1


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

* Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
  2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
@ 2022-08-06 17:45 ` Sudeep Holla
  2022-08-06 18:27 ` Conor.Dooley
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2022-08-06 17:45 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki,
	Sudeep Holla, Ionela Voinescu, Conor Dooley

On Fri, Aug 05, 2022 at 04:07:36PM -0700, Florian Fainelli wrote:
> Architectures which do not have cacheinfo such as ARM 32-bit would spit
> out the following during boot:
> 
>  Early cacheinfo failed, ret = -2
> 
> Treat -ENOENT specifically to silence this error since it means that the
> platform does not support reporting its cache information.
>

Makes sense, I wanted to send something similar after testing on some
platforms without cacheinfo like Qemu.

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

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

* Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
  2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
  2022-08-06 17:45 ` Sudeep Holla
@ 2022-08-06 18:27 ` Conor.Dooley
  2022-08-10 11:16 ` Michael Walle
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Conor.Dooley @ 2022-08-06 18:27 UTC (permalink / raw)
  To: f.fainelli, linux-kernel; +Cc: sudeep.holla, gregkh, rafael, ionela.voinescu

On 06/08/2022 00:07, Florian Fainelli wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Architectures which do not have cacheinfo such as ARM 32-bit would spit
> out the following during boot:
> 
>  Early cacheinfo failed, ret = -2
> 
> Treat -ENOENT specifically to silence this error since it means that the
> platform does not support reporting its cache information.

Makes sense to me. Maybe we could soften the wording for failures on the
platforms that do support it since early cacheinfo failures (at least on
RISC-V) appear harmless - but that's for another day.
FWIW:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> 
> Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  drivers/base/arch_topology.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 0424b59b695e..eaa1b8d2d39d 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -735,7 +735,7 @@ void update_siblings_masks(unsigned int cpuid)
>         int cpu, ret;
> 
>         ret = detect_cache_attributes(cpuid);
> -       if (ret)
> +       if (ret && ret != -ENOENT)
>                 pr_info("Early cacheinfo failed, ret = %d\n", ret);
> 
>         /* update core and thread sibling masks */
> --
> 2.25.1
> 


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

* Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
  2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
  2022-08-06 17:45 ` Sudeep Holla
  2022-08-06 18:27 ` Conor.Dooley
@ 2022-08-10 11:16 ` Michael Walle
  2022-08-15  8:57 ` Geert Uytterhoeven
  2022-08-15 13:08 ` Sudeep Holla
  4 siblings, 0 replies; 6+ messages in thread
From: Michael Walle @ 2022-08-10 11:16 UTC (permalink / raw)
  To: f.fainelli
  Cc: conor.dooley, gregkh, ionela.voinescu, linux-kernel, rafael,
	sudeep.holla, Michael Walle

> Architectures which do not have cacheinfo such as ARM 32-bit would spit
> out the following during boot:
> 
>  Early cacheinfo failed, ret = -2
> 
> Treat -ENOENT specifically to silence this error since it means that the
> platform does not support reporting its cache information.
> 
> Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks!
Tested-by: Michael Walle <michael@walle.cc>

-michael

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

* Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
  2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
                   ` (2 preceding siblings ...)
  2022-08-10 11:16 ` Michael Walle
@ 2022-08-15  8:57 ` Geert Uytterhoeven
  2022-08-15 13:08 ` Sudeep Holla
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2022-08-15  8:57 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Linux Kernel Mailing List, Sudeep Holla, Greg Kroah-Hartman,
	Rafael J. Wysocki, Ionela Voinescu, Conor Dooley, Linux-Renesas

Hi Florian,

On Sat, Aug 6, 2022 at 1:10 AM Florian Fainelli <f.fainelli@gmail.com> wrote:
> Architectures which do not have cacheinfo such as ARM 32-bit would spit
> out the following during boot:
>
>  Early cacheinfo failed, ret = -2
>
> Treat -ENOENT specifically to silence this error since it means that the
> platform does not support reporting its cache information.
>
> Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Thank you, this fixes the issue seen with v6.0-rc1 on e.g. R-Car Gen2.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent
  2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
                   ` (3 preceding siblings ...)
  2022-08-15  8:57 ` Geert Uytterhoeven
@ 2022-08-15 13:08 ` Sudeep Holla
  4 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2022-08-15 13:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Florian Fainelli, Rafael J. Wysocki,
	Ionela Voinescu, Conor Dooley

Hi Greg,

Can you pick this fix for v6.0 when you start collecting the fixes, please ?

--
Regards,
Sudeep

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

end of thread, other threads:[~2022-08-15 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 23:07 [PATCH] arch_topology: Silence early cacheinfo errors when non-existent Florian Fainelli
2022-08-06 17:45 ` Sudeep Holla
2022-08-06 18:27 ` Conor.Dooley
2022-08-10 11:16 ` Michael Walle
2022-08-15  8:57 ` Geert Uytterhoeven
2022-08-15 13:08 ` Sudeep Holla

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).