Commit 487152c1 authored by Viresh Kumar's avatar Viresh Kumar Committed by Chromeos LUCI
Browse files

UPSTREAM: arm64: topology: Make AMUs work with modular cpufreq drivers



The AMU counters won't get used today if the cpufreq driver is built as
a module as the amu core requires everything to be ready by late init.

Fix that properly by registering for cpufreq policy notifier. Note that
the amu core don't have any cpufreq dependency after the first time
CPUFREQ_CREATE_POLICY notifier is called for all the CPUs. And so we
don't need to do anything on the CPUFREQ_REMOVE_POLICY notifier. And for
the same reason we check if the CPUs are already parsed in the beginning
of amu_fie_setup() and skip if that is true. Alternatively we can shoot
a work from there to unregister the notifier instead, but that seemed
too much instead of this simple check.

While at it, convert the print message to pr_debug instead of pr_info.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Tested-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Link: https://lore.kernel.org/r/89c1921334443e133c9c8791b4693607d65ed9f5.1610104461.git.viresh.kumar@linaro.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
(cherry picked from commit a5f1b187)

BUG=b:249685960
TEST=Build

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


Reviewed-by: default avatarSean Paul <sean@poorly.run>
Reviewed-by: default avatarSuleiman Souhlal <suleiman@chromium.org>
parent 68c626b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment