Re: [PATCH v7 29/49] x86/resctrl: Move get_config_index() to a header

From: Reinette Chatre
Date: Thu Mar 06 2025 - 23:38:41 EST


Hi James,

On 2/28/25 11:58 AM, James Morse wrote:
> get_config_index() is used by the architecture specific code to map a
> CLOSID+type pair to an index in the configuration arrays.
>
> MPAM needs to do this too to preserve the ABI to user-space, there is
> no reason to do it differently.
>
> Move the helper to a header file to allow all architectures that either
> use or emulate CDP to use the same pattern of CLOSID values. Moving
> this to a header file means it must be marked inline, which matches
> the existing compiler choice for this static function.
>
> Co-developed-by: Dave Martin <Dave.Martin@xxxxxxx>
> Signed-off-by: Dave Martin <Dave.Martin@xxxxxxx>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> Tested-by: Carl Worth <carl@xxxxxxxxxxxxxxxxxxxxxx> # arm64
> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---

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

Reinette