diff options
author | James Morse <james.morse@arm.com> | 2021-07-28 17:06:37 +0000 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-08-11 18:39:42 +0200 |
commit | 5c3b63cdba441c6a530b974ff73b14161d96a0c3 (patch) | |
tree | 464801a2901ad0b692870ed811cc4708519b455c /arch/x86/kernel/cpu/resctrl/internal.h | |
parent | 327364d5b6b6f8c89d2d6253a986d80323512890 (diff) |
x86/resctrl: Merge the CDP resources
resctrl uses struct rdt_resource to describe the available hardware
resources. The domains of the CDP aliases share a single ctrl_val[]
array. The only differences between the struct rdt_hw_resource aliases
is the name and conf_type.
The name from struct rdt_hw_resource is visible to user-space. To
support another architecture, as many user-visible details should be
handled in the filesystem parts of the code that is common to all
architectures. The name and conf_type go together.
Remove conf_type and the CDP aliases. When CDP is supported and enabled,
schemata_list_create() can create two schemata using the single
resource, generating the CODE/DATA suffix to the schema name itself.
This allows the alloc_ctrlval_array() and complications around free()ing
the ctrl_val arrays to be removed.
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jamie Iles <jamie@nuviainc.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://lkml.kernel.org/r/20210728170637.25610-25-james.morse@arm.com
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/internal.h')
-rw-r--r-- | arch/x86/kernel/cpu/resctrl/internal.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index e8751d0c8475..1d647188a43b 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -369,7 +369,6 @@ struct rdt_parse_data { /** * struct rdt_hw_resource - arch private attributes of a resctrl resource - * @conf_type: The type that should be used when configuring. temporary * @r_resctrl: Attributes of the resource used directly by resctrl. * @num_closid: Maximum number of closid this hardware can support, * regardless of CDP. This is exposed via @@ -387,7 +386,6 @@ struct rdt_parse_data { * msr_update and msr_base. */ struct rdt_hw_resource { - enum resctrl_conf_type conf_type; struct rdt_resource r_resctrl; u32 num_closid; unsigned int msr_base; @@ -418,11 +416,7 @@ extern struct dentry *debugfs_resctrl; enum resctrl_res_level { RDT_RESOURCE_L3, - RDT_RESOURCE_L3DATA, - RDT_RESOURCE_L3CODE, RDT_RESOURCE_L2, - RDT_RESOURCE_L2DATA, - RDT_RESOURCE_L2CODE, RDT_RESOURCE_MBA, /* Must be the last */ |