Re: [PATCH v9 19/27] x86/resctrl: Always initialise rid field in rdt_resources_all[]

From: Reinette Chatre
Date: Thu May 01 2025 - 13:32:15 EST


Hi James,

On 4/25/25 10:38 AM, James Morse wrote:
> x86 has an array, rdt_resources_all[], of all possible resources.
> The for-each-resource walkers depend on the rid field of all
> resources being initialised.
>
> If the array ever grows due to another architecture adding a resource
> type that is not defined on x86, the for-each-resources walkers will
> loop forever.
>
> Initialise all the rid values in resctrl_arch_late_init() before
> any for-each-resource walker can be called.
>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
>
> ---

Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reinette