Commit 9b1ac04
powerpc/papr_scm: Fix nvdimm event mappings
Commit 4c08d4b ("powerpc/papr_scm: Add perf interface support")
added performance monitoring support for papr-scm nvdimm devices via
perf interface. Commit also added an array in papr_scm_priv
structure called "nvdimm_events_map", which got filled based on the
result of H_SCM_PERFORMANCE_STATS hcall.
Currently there is an assumption that the order of events in the
stats buffer, returned by the hypervisor is same. And order also
happens to matches with the events specified in nvdimm driver code.
But this assumption is not documented in Power Architecture
Platform Requirements (PAPR) document. Although the order
of events happens to be same on current generation od system, but
it might not be true in future generation systems. Fix the issue, by
adding a static mapping for nvdimm events to corresponding stat-id,
and removing the dynamic map from papr_scm_priv structure. Also
remove the function papr_scm_pmu_check_events from papr_scm.c file,
as we no longer need to copy stat-ids dynamically.
Fixes: 4c08d4b ("powerpc/papr_scm: Add perf interface support")
Reported-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Kajol Jain <[email protected]>
Reviewed-by: Vaibhav Jain <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 1c23f9e commit 9b1ac04
1 file changed
+27
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
353 | 369 | | |
354 | 370 | | |
355 | 371 | | |
356 | 372 | | |
357 | 373 | | |
358 | 374 | | |
359 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
360 | 380 | | |
361 | 381 | | |
362 | 382 | | |
363 | 383 | | |
364 | | - | |
| 384 | + | |
365 | 385 | | |
366 | 386 | | |
367 | 387 | | |
| |||
370 | 390 | | |
371 | 391 | | |
372 | 392 | | |
373 | | - | |
| 393 | + | |
374 | 394 | | |
375 | 395 | | |
376 | 396 | | |
| |||
458 | 478 | | |
459 | 479 | | |
460 | 480 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | 481 | | |
512 | 482 | | |
513 | 483 | | |
| |||
519 | 489 | | |
520 | 490 | | |
521 | 491 | | |
522 | | - | |
523 | | - | |
| 492 | + | |
524 | 493 | | |
525 | 494 | | |
526 | 495 | | |
| |||
539 | 508 | | |
540 | 509 | | |
541 | 510 | | |
542 | | - | |
| 511 | + | |
543 | 512 | | |
544 | 513 | | |
545 | 514 | | |
| |||
548 | 517 | | |
549 | 518 | | |
550 | 519 | | |
551 | | - | |
552 | | - | |
553 | 520 | | |
554 | 521 | | |
555 | 522 | | |
| |||
1560 | 1527 | | |
1561 | 1528 | | |
1562 | 1529 | | |
1563 | | - | |
1564 | 1530 | | |
1565 | 1531 | | |
1566 | 1532 | | |
| |||
0 commit comments