]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
arm64: Fix finding the pmc event ID
authorAndrew Turner <andrew@FreeBSD.org>
Thu, 1 Apr 2021 14:38:09 +0000 (14:38 +0000)
committerAndrew Turner <andrew@FreeBSD.org>
Thu, 8 Apr 2021 07:52:21 +0000 (07:52 +0000)
commit24b2f4ea49229618c5608846acfc10be2eb0d567
treeeafbf89319ec96dab7f9dace68b430edda715cc7
parentd6a53211a716c987de76294cff32b652fe38bb09
arm64: Fix finding the pmc event ID

The lower pmc event bits were masked off to find the PMC event ID.
The doesn't work when there are more events. Switch it to use the
offser relative to the first event while also checking the ID is
in the expected range.

Reviewed by: gnn, ray
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D29600
sys/dev/hwpmc/hwpmc_arm64.c
sys/dev/hwpmc/hwpmc_arm64.h