Commit b045b8cc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:
 "Two fixes:

   - An objdump checker fix to ignore parenthesized strings in the
     objdump version

   - Fix resctrl default monitoring groups reporting when new subgroups
     get created"

* tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/resctrl: Fix default monitoring groups reporting
  x86/tools: Fix objdump version check again
parents 3e763ec7 064855a6
...@@ -285,15 +285,14 @@ static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width) ...@@ -285,15 +285,14 @@ static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width)
return chunks >>= shift; return chunks >>= shift;
} }
static int __mon_event_count(u32 rmid, struct rmid_read *rr) static u64 __mon_event_count(u32 rmid, struct rmid_read *rr)
{ {
struct mbm_state *m; struct mbm_state *m;
u64 chunks, tval; u64 chunks, tval;
tval = __rmid_read(rmid, rr->evtid); tval = __rmid_read(rmid, rr->evtid);
if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) { if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
rr->val = tval; return tval;
return -EINVAL;
} }
switch (rr->evtid) { switch (rr->evtid) {
case QOS_L3_OCCUP_EVENT_ID: case QOS_L3_OCCUP_EVENT_ID:
...@@ -305,12 +304,6 @@ static int __mon_event_count(u32 rmid, struct rmid_read *rr) ...@@ -305,12 +304,6 @@ static int __mon_event_count(u32 rmid, struct rmid_read *rr)
case QOS_L3_MBM_LOCAL_EVENT_ID: case QOS_L3_MBM_LOCAL_EVENT_ID:
m = &rr->d->mbm_local[rmid]; m = &rr->d->mbm_local[rmid];
break; break;
default:
/*
* Code would never reach here because
* an invalid event id would fail the __rmid_read.
*/
return -EINVAL;
} }
if (rr->first) { if (rr->first) {
...@@ -361,23 +354,29 @@ void mon_event_count(void *info) ...@@ -361,23 +354,29 @@ void mon_event_count(void *info)
struct rdtgroup *rdtgrp, *entry; struct rdtgroup *rdtgrp, *entry;
struct rmid_read *rr = info; struct rmid_read *rr = info;
struct list_head *head; struct list_head *head;
u64 ret_val;
rdtgrp = rr->rgrp; rdtgrp = rr->rgrp;
if (__mon_event_count(rdtgrp->mon.rmid, rr)) ret_val = __mon_event_count(rdtgrp->mon.rmid, rr);
return;
/* /*
* For Ctrl groups read data from child monitor groups. * For Ctrl groups read data from child monitor groups and
* add them together. Count events which are read successfully.
* Discard the rmid_read's reporting errors.
*/ */
head = &rdtgrp->mon.crdtgrp_list; head = &rdtgrp->mon.crdtgrp_list;
if (rdtgrp->type == RDTCTRL_GROUP) { if (rdtgrp->type == RDTCTRL_GROUP) {
list_for_each_entry(entry, head, mon.crdtgrp_list) { list_for_each_entry(entry, head, mon.crdtgrp_list) {
if (__mon_event_count(entry->mon.rmid, rr)) if (__mon_event_count(entry->mon.rmid, rr) == 0)
return; ret_val = 0;
} }
} }
/* Report error if none of rmid_reads are successful */
if (ret_val)
rr->val = ret_val;
} }
/* /*
......
...@@ -10,6 +10,7 @@ BEGIN { ...@@ -10,6 +10,7 @@ BEGIN {
/^GNU objdump/ { /^GNU objdump/ {
verstr = "" verstr = ""
gsub(/\(.*\)/, "");
for (i = 3; i <= NF; i++) for (i = 3; i <= NF; i++)
if (match($(i), "^[0-9]")) { if (match($(i), "^[0-9]")) {
verstr = $(i); verstr = $(i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment