Re: [PATCH 1/8] cpufreq: Auto-register with energy model if asked
From: Lukasz Luba <lukasz.luba@arm.com>
Date: 2021-08-10 15:34:49
Also in:
lkml
From: Lukasz Luba <lukasz.luba@arm.com>
Date: 2021-08-10 15:34:49
Also in:
lkml
On 8/10/21 10:38 AM, Viresh Kumar wrote:
On 10-08-21, 10:36, Lukasz Luba wrote:quoted
The of_cpufreq_cooling_register() should be called after the EM is present for the CPU device. When you check that function, you will see that we call em_cpu_get(policy->cpu) to get the EM pointer. Otherwise IPA might fail.Good point.
In other patch set I had a discussion with Quentin and I've checked the Performance Domains setup code. There is a code triggering the rebuilding perf domains with EM from governor. We cannot call EM registration so late in this cpufreq_online(), not after cpufreq_init_policy() call. So this dev_pm_opp_of_unregister_em() must be called before the policy is initialized. I'm not sure if you still would like to push forward this patch set in this case.