Re: [PATCH v7 12/49] x86/resctrl: Move rdt_find_domain() to be visible to arch and fs code

From: Fenghua Yu
Date: Thu Mar 06 2025 - 16:09:46 EST



On 2/28/25 11:58, James Morse wrote:
rdt_find_domain() finds a domain given a resource and a cache-id.
This is used by both the architecture code and the filesystem code.

After the filesystem code moves to live in /fs/, this helper is either
duplicated by all architectures, or needs exposing by the filesystem code.

Add the definition to the global header file. As its now globally visible,
and has only a handful of callers, swap the 'rdt' for 'resctrl'. Move
the function to live with its caller in ctrlmondata.c as the filesystem
code will not have anything corresponding to core.c.

Signed-off-by: James Morse <james.morse@xxxxxxx>

Reviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>


Thanks.


-Fenghua