arch_topology: Remove early cacheinfo error message if -ENOENT
PATCH 1/1 arch_topology: Remove early cacheinfo error message if -ENOENT
From: Pierre Gondois <[email protected]>
fetch_cache_info() tries to get the number of cache leaves/levels for each CPU in order to pre-allocate memory for cacheinfo struct. Allocating this memory later triggers a:
'BUG: sleeping function called from invalid context'
in PREEMPT_RT kernels.
If there is no cache related information available in DT or ACPI, fetch_cache_info() fails and an error message is printed:
'Early cacheinfo failed, ret = ...'
Not having cache information should be a valid configuration. Remove the error message if fetch_cache_info() fails with -ENOENT.
Suggested-by Conor Dooley <[email protected]>
Signed-off-by Pierre Gondois <[email protected]>
Reviewed-by Conor Dooley <[email protected]>
Signed-off-by Sudeep Holla <[email protected]>
--- drivers/base/arch_topology.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/base/arch_topology.c +4 -3
@@ -843,10 +843,11 @@ void __init init_cpu_topology(void)for_each_possible_cpu (cpu) { ret =fetch_cache_info (cpu); -if (ret) { +if (!ret) +continue ; +else if (ret != -ENOENT )pr_err ("Early cacheinfo failed, ret = %d\n" , ret); -break ; - } +return ; } }
Signature · 1 line
2.25.1