Commit e22c369
committed
KVM: arm64: Add unified helper for reprogramming counters by mask
Having separate helpers for enabling/disabling counters provides the
wrong abstraction, as the state of each counter needs to be evaluated
independently and, in some cases, use a different global enable bit.
Collapse the enable/disable accessors into a single, common helper that
reconfigures every counter set in @Mask, leaving the complexity of
determining if an event is actually enabled in
kvm_pmu_counter_is_enabled().
Reviewed-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>1 parent 985bb51 commit e22c369
3 files changed
+29
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 331 | + | |
338 | 332 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
| 333 | + | |
| 334 | + | |
344 | 335 | | |
| 336 | + | |
345 | 337 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
353 | 342 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
362 | 347 | | |
363 | 348 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
| 349 | + | |
372 | 350 | | |
373 | 351 | | |
374 | 352 | | |
375 | 353 | | |
376 | 354 | | |
377 | 355 | | |
378 | 356 | | |
379 | | - | |
| 357 | + | |
380 | 358 | | |
381 | 359 | | |
382 | 360 | | |
383 | 361 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
388 | 366 | | |
| 367 | + | |
| 368 | + | |
389 | 369 | | |
390 | 370 | | |
391 | 371 | | |
| |||
630 | 610 | | |
631 | 611 | | |
632 | 612 | | |
633 | | - | |
| 613 | + | |
634 | 614 | | |
635 | 615 | | |
636 | | - | |
| 616 | + | |
637 | 617 | | |
638 | 618 | | |
639 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | | - | |
| 1211 | + | |
1212 | 1212 | | |
1213 | 1213 | | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
| 1214 | + | |
1217 | 1215 | | |
1218 | 1216 | | |
1219 | | - | |
1220 | | - | |
| 1217 | + | |
| 1218 | + | |
1221 | 1219 | | |
1222 | 1220 | | |
1223 | 1221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | | - | |
131 | | - | |
| 129 | + | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
0 commit comments