Skip to content
  • Viresh Kumar's avatar
    arm64: topology: Make AMUs work with modular cpufreq drivers · 96eb04ff
    Viresh Kumar authored and Ionela Voinescu's avatar Ionela Voinescu committed
    
    
    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>
    96eb04ff