]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm64: pmuv3: handle !PMUv3 when probing
authorMark Rutland <mark.rutland@arm.com>
Tue, 11 Apr 2017 08:39:56 +0000 (09:39 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 11 Apr 2017 15:29:54 +0000 (16:29 +0100)
commitf1b36dcb5c316c276ca6faedc50d89d97f90d960
tree504b808f89e3af152bbd6a8434978952cb459966
parent45736a72fb79b204c1fbdb08a1e1a2aa52c7281a
arm64: pmuv3: handle !PMUv3 when probing

When probing via ACPI, we won't know up-front whether a CPU has a PMUv3
compatible PMU. Thus we need to consult ID registers during probe time.

This patch updates our PMUv3 probing code to test for the presence of
PMUv3 functionality before touching an PMUv3-specific registers, and
before updating the struct arm_pmu with PMUv3 data.

When a PMUv3-compatible PMU is not present, probing will return -ENODEV.

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