On 05-07-19, 16:11, Viresh Kumar wrote: > This fixes it for me (after faking the failure). @Rafael this needs to > be merged to the top commit: > > 0d4c2a013b32 cpufreq: Add QoS requests for userspace constraints
@Rafael: I have sent V7 of this patch now after merging below diff (and improving it further). Thanks. > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 13c2f119cc0c..5eecd54195a9 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -1228,12 +1228,6 @@ static struct cpufreq_policy > *cpufreq_policy_alloc(unsigned int cpu) > goto err_min_qos_notifier; > } > > - policy->min_freq_req = kzalloc(2 * sizeof(*policy->min_freq_req), > - GFP_KERNEL); > - if (!policy->min_freq_req) > - goto err_max_qos_notifier; > - > - policy->max_freq_req = policy->min_freq_req + 1; > INIT_LIST_HEAD(&policy->policy_list); > init_rwsem(&policy->rwsem); > spin_lock_init(&policy->transition_lock); > @@ -1244,9 +1238,6 @@ static struct cpufreq_policy > *cpufreq_policy_alloc(unsigned int cpu) > policy->cpu = cpu; > return policy; > > -err_max_qos_notifier: > - dev_pm_qos_remove_notifier(dev, &policy->nb_max, > - DEV_PM_QOS_MAX_FREQUENCY); > err_min_qos_notifier: > dev_pm_qos_remove_notifier(dev, &policy->nb_min, > DEV_PM_QOS_MIN_FREQUENCY); > @@ -1370,6 +1361,13 @@ static int cpufreq_online(unsigned int cpu) > add_cpu_dev_symlink(policy, j); > } > > + policy->min_freq_req = kzalloc(2 * > sizeof(*policy->min_freq_req), > + GFP_KERNEL); > + if (!policy->min_freq_req) > + goto out_destroy_policy; > + > + policy->max_freq_req = policy->min_freq_req + 1; > + > ret = dev_pm_qos_add_request(dev, policy->min_freq_req, > DEV_PM_QOS_MIN_FREQUENCY, > policy->min); -- viresh

