Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+14 -14
+13 -14
arch/x86/kernel/cpu/resctrl/monitor.c
··· 285 285 return chunks >>= shift; 286 286 } 287 287 288 - static int __mon_event_count(u32 rmid, struct rmid_read *rr) 288 + static u64 __mon_event_count(u32 rmid, struct rmid_read *rr) 289 289 { 290 290 struct mbm_state *m; 291 291 u64 chunks, tval; 292 292 293 293 tval = __rmid_read(rmid, rr->evtid); 294 294 if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) { 295 - rr->val = tval; 296 - return -EINVAL; 295 + return tval; 297 296 } 298 297 switch (rr->evtid) { 299 298 case QOS_L3_OCCUP_EVENT_ID: ··· 304 305 case QOS_L3_MBM_LOCAL_EVENT_ID: 305 306 m = &rr->d->mbm_local[rmid]; 306 307 break; 307 - default: 308 - /* 309 - * Code would never reach here because 310 - * an invalid event id would fail the __rmid_read. 311 - */ 312 - return -EINVAL; 313 308 } 314 309 315 310 if (rr->first) { ··· 354 361 struct rdtgroup *rdtgrp, *entry; 355 362 struct rmid_read *rr = info; 356 363 struct list_head *head; 364 + u64 ret_val; 357 365 358 366 rdtgrp = rr->rgrp; 359 367 360 - if (__mon_event_count(rdtgrp->mon.rmid, rr)) 361 - return; 368 + ret_val = __mon_event_count(rdtgrp->mon.rmid, rr); 362 369 363 370 /* 364 - * For Ctrl groups read data from child monitor groups. 371 + * For Ctrl groups read data from child monitor groups and 372 + * add them together. Count events which are read successfully. 373 + * Discard the rmid_read's reporting errors. 365 374 */ 366 375 head = &rdtgrp->mon.crdtgrp_list; 367 376 368 377 if (rdtgrp->type == RDTCTRL_GROUP) { 369 378 list_for_each_entry(entry, head, mon.crdtgrp_list) { 370 - if (__mon_event_count(entry->mon.rmid, rr)) 371 - return; 379 + if (__mon_event_count(entry->mon.rmid, rr) == 0) 380 + ret_val = 0; 372 381 } 373 382 } 383 + 384 + /* Report error if none of rmid_reads are successful */ 385 + if (ret_val) 386 + rr->val = ret_val; 374 387 } 375 388 376 389 /*
+1
arch/x86/tools/chkobjdump.awk
··· 10 10 11 11 /^GNU objdump/ { 12 12 verstr = "" 13 + gsub(/\(.*\)/, ""); 13 14 for (i = 3; i <= NF; i++) 14 15 if (match($(i), "^[0-9]")) { 15 16 verstr = $(i);