]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count()
authorKim Phillips <kim.phillips@amd.com>
Tue, 8 Sep 2020 21:47:37 +0000 (16:47 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 10 Sep 2020 09:19:35 +0000 (11:19 +0200)
commitcf185e7af10bd37cc2549bc765ec9cc74919f382
tree3bfa030207d0fc95c35bdc31b8536c6b0321bd1c
parentd0c46e2b65be9e8b7a5bfe4f26bb659c8290f6bc
perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count()

get_ibs_op_count() adds hardware's current count (IbsOpCurCnt) bits
to its count regardless of hardware's valid status.

According to the PPR for AMD Family 17h Model 31h B0 55803 Rev 0.54,
if the counter rolls over, valid status is set, and the lower 7 bits
of IbsOpCurCnt are randomized by hardware.

Don't include those bits in the driver's event count.

Fixes: f096e44e40bd ("perf/x86-ibs: Fix usage of IBS op current count")
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
arch/x86/events/amd/ibs.c