2022-08-05 23:35:49

by Florian Fainelli

[permalink] [raw]
Subject: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

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 <[email protected]>
---
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


2022-08-06 18:11:36

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

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 <[email protected]>

--
Regards,
Sudeep

2022-08-06 18:47:33

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

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 <[email protected]>

>
> Fixes: 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
> Signed-off-by: Florian Fainelli <[email protected]>
> ---
> 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
>

2022-08-10 11:19:58

by Michael Walle

[permalink] [raw]
Subject: Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

> 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 <[email protected]>

Thanks!
Tested-by: Michael Walle <[email protected]>

-michael

2022-08-15 09:03:53

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

Hi Florian,

On Sat, Aug 6, 2022 at 1:10 AM Florian Fainelli <[email protected]> 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 <[email protected]>

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

Tested-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2022-08-15 13:25:31

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH] arch_topology: Silence early cacheinfo errors when non-existent

Hi Greg,

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

--
Regards,
Sudeep