summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/ctrlmondata.c')
-rw-r--r--arch/x86/kernel/cpu/resctrl/ctrlmondata.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
index 405b99d31ef9..d10fddaef5f4 100644
--- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
+++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
@@ -286,14 +286,12 @@ done:
static int rdtgroup_parse_resource(char *resname, char *tok,
struct rdtgroup *rdtgrp)
{
- struct rdt_hw_resource *hw_res;
struct resctrl_schema *s;
struct rdt_resource *r;
list_for_each_entry(s, &resctrl_schema_all, list) {
r = s->res;
- hw_res = resctrl_to_arch_res(s->res);
- if (!strcmp(resname, r->name) && rdtgrp->closid < hw_res->num_closid)
+ if (!strcmp(resname, r->name) && rdtgrp->closid < s->num_closid)
return parse_line(tok, r, rdtgrp);
}
rdt_last_cmd_printf("Unknown or unsupported resource name '%s'\n", resname);
@@ -404,7 +402,6 @@ static void show_doms(struct seq_file *s, struct rdt_resource *r, int closid)
int rdtgroup_schemata_show(struct kernfs_open_file *of,
struct seq_file *s, void *v)
{
- struct rdt_hw_resource *hw_res;
struct resctrl_schema *schema;
struct rdtgroup *rdtgrp;
struct rdt_resource *r;
@@ -432,8 +429,8 @@ int rdtgroup_schemata_show(struct kernfs_open_file *of,
} else {
closid = rdtgrp->closid;
list_for_each_entry(schema, &resctrl_schema_all, list) {
- hw_res = resctrl_to_arch_res(schema->res);
- if (closid < hw_res->num_closid)
+ r = schema->res;
+ if (closid < schema->num_closid)
show_doms(s, r, closid);
}
}