aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/intel_rdt_rdtgroup.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index b799c00bef09..32e8bbdf2400 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -1155,8 +1155,8 @@ static int rdtgroup_size_show(struct kernfs_open_file *of,
1155 struct rdt_resource *r; 1155 struct rdt_resource *r;
1156 struct rdt_domain *d; 1156 struct rdt_domain *d;
1157 unsigned int size; 1157 unsigned int size;
1158 bool sep = false; 1158 bool sep;
1159 u32 cbm; 1159 u32 ctrl;
1160 1160
1161 rdtgrp = rdtgroup_kn_lock_live(of->kn); 1161 rdtgrp = rdtgroup_kn_lock_live(of->kn);
1162 if (!rdtgrp) { 1162 if (!rdtgrp) {
@@ -1174,6 +1174,7 @@ static int rdtgroup_size_show(struct kernfs_open_file *of,
1174 } 1174 }
1175 1175
1176 for_each_alloc_enabled_rdt_resource(r) { 1176 for_each_alloc_enabled_rdt_resource(r) {
1177 sep = false;
1177 seq_printf(s, "%*s:", max_name_width, r->name); 1178 seq_printf(s, "%*s:", max_name_width, r->name);
1178 list_for_each_entry(d, &r->domains, list) { 1179 list_for_each_entry(d, &r->domains, list) {
1179 if (sep) 1180 if (sep)
@@ -1181,8 +1182,13 @@ static int rdtgroup_size_show(struct kernfs_open_file *of,
1181 if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) { 1182 if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP) {
1182 size = 0; 1183 size = 0;
1183 } else { 1184 } else {
1184 cbm = d->ctrl_val[rdtgrp->closid]; 1185 ctrl = (!is_mba_sc(r) ?
1185 size = rdtgroup_cbm_to_size(r, d, cbm); 1186 d->ctrl_val[rdtgrp->closid] :
1187 d->mbps_val[rdtgrp->closid]);
1188 if (r->rid == RDT_RESOURCE_MBA)
1189 size = ctrl;
1190 else
1191 size = rdtgroup_cbm_to_size(r, d, ctrl);
1186 } 1192 }
1187 seq_printf(s, "%d=%u", d->id, size); 1193 seq_printf(s, "%d=%u", d->id, size);
1188 sep = true; 1194 sep = true;