Commit 74470d7f authored by Ionela Voinescu's avatar Ionela Voinescu Committed by Chromeos LUCI
Browse files

BACKPORT: arm64: wrap and generalise counter read functions



In preparation for other uses of Activity Monitors (AMU) cycle counters,
place counter read functionality in generic functions that can reused:
read_corecnt() and read_constcnt().

As a result, implement update_freq_counters_refs() to replace
init_cpu_freq_invariance_counters() and both initialise and update
the per-cpu reference variables.

Signed-off-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201106125334.21570-2-ionela.voinescu@arm.com


Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 4b9cf23c)

Conflicts:
   arch/arm64/kernel/cpufeature.c

BUG=b:249685960
TEST=Build

Change-Id: I3f3d02bce23d1990148b33f16ce9977c5ed5db65
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3939325


Reviewed-by: default avatarSuleiman Souhlal <suleiman@chromium.org>
parent 9df31f49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment