]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: perf: correct PMUVer probing
authorMark Rutland <mark.rutland@arm.com>
Wed, 14 Feb 2018 17:21:57 +0000 (17:21 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 20 Feb 2018 11:34:54 +0000 (11:34 +0000)
commit2379d3fe6337560b8bb5a3e597cec3bb5db92ee9
treec90b08996ecc564dd13ab08cb3e92616cc69150b
parentc4c5c921eddcc0a5fbcc74050ac5b2cf024131c4
arm64: perf: correct PMUVer probing

The ID_AA64DFR0_EL1.PMUVer field doesn't follow the usual ID registers
scheme. While value 0xf indicates a non-architected PMU is implemented,
values 0x1 to 0xe indicate an increasingly featureful architected PMU,
as if the field were unsigned.

For more details, see ARM DDI 0487C.a, D10.1.4, "Alternative ID scheme
used for the Performance Monitors Extension version".

Currently, we treat the field as signed, and erroneously bail out for
values 0x8 to 0xe. Let's correct that.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/perf_event.c