x86/resctrl: Add a helper to avoid reaching into the arch code resource list
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT Reference: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/log/?h=mpam/snapshot/v6.7-rc2 --------------------------- Resctrl occasionally wants to know something about a specific resource. It reaches into the arch code's rdt_resources_all. Once the filesystem parts of resctrl are moved to /fs/, this means it will need visibility of the architecture specific structure. Move the level enum to the resctrl header and add a helper to retrieve the resctrl struct by id. resctrl_arch_get_resource() should not return NULL for any value in the enum, it may instead return a dummy resource that is !alloc_enabled && !mon_enabled. Signed-off-by:James Morse <james.morse@arm.com> Signed-off-by:
Zeng Heng <zengheng4@huawei.com>
Loading
Please sign in to comment