[RFC PATCH] arch_topology: Pre-allocate cacheinfo from primary CPU

Pierre Gondois pierre.gondois at arm.com
Wed Mar 29 08:39:58 PDT 2023



On 3/29/23 17:03, Sudeep Holla wrote:
> On Wed, Mar 29, 2023 at 04:42:07PM +0200, Pierre Gondois wrote:
>>
>> This would mean that for all architectures, the cacheinfo would come from
>> ACPI/DT first.....
> 
> x86 doesn't fall into the above category. So we need to ensure it continues
> to work with no errors.

Ok, then maybe having a second arch specific function like
init_cache_level() would work.

This function would be called in fetch_cache_info() after
init_of_cache_level()/acpi_get_cache_info() fail. It would fetch
cache info anywhere but in DT/ACPI.
Archs that don't want it would not implement it, and it would
allow the others to get the num_leaves/levels during early boot.

> 
> --
> Regards,
> Sudeep



More information about the linux-arm-kernel mailing list