Commit 0eef0a48 authored by James Morse's avatar James Morse Committed by Zeng Heng
Browse files

x86/resctrl: Add resctrl_arch_is_evt_configurable() to abstract BMEC

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



---------------------------

When BMEC is supported the resctrl event can be configured in a number
of ways. This depends on architecture support. rdt_get_mon_l3_config()
modifies the struct mon_evt and calls mbm_config_rftype_init() to create
the files that allow the configuration.

Splitting this into separate architecture and filesystem parts would
require the struct mon_evt and mbm_config_rftype_init() to be exposed.

Instead, add resctrl_arch_is_evt_configurable(), and use this from
resctrl_mon_resource_init() to initialise struct mon_evt and call
mbm_config_rftype_init().

resctrl_arch_is_evt_configurable() uses rdt_cpu_has() so it can't
easily be in a header. Putting it in core.c allows rdt_cpu_has() to
become static.

resctrl_mon_resource_init() isn't marked __init, and MPAM will need
to initialise resctrl late. Drop the __init on the relevant functions,
and change rdt_options[] to be read-only after init.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 6dd3d12c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment