Skip to contentSkip to conversation

arch_topology: Silence early cacheinfo errors when non-existent

PATCH In review Florian Fainelli 5 participants 6 messages Aug 5, 2022 – Aug 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/base/arch_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/arch_topology.c +1 -1
index 0424b59b695e..eaa1b8d2d39d 100644
@@ -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 */
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Florian Fainelli

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.

Signature · 2 lines
Regards,
Sudeep
Reviewed-by on v1 1/1
#2 lore raw
In reply to Florian Fainelli
Quoted 9 lines · Florian Fainelli

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:

Quoted 23 lines
Fixes 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path")
---
 drivers/base/arch_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/arch_topology.c +1 -2
index 0424b59b695e..eaa1b8d2d39d 100644
@@ -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

Tested-by on v1 1/1
#3 lore raw
In reply to Florian Fainelli
Quoted 10 lines

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

Thanks!

-michael

Tested-by on v1 1/1
#4 lore raw
In reply to Florian Fainelli

Hi Florian,

Quoted 10 lines · Florian Fainelli

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

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

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