Message ID | 1526631889-5084-2-git-send-email-skannan@codeaurora.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Fri, May 18, 2018 at 10:24 AM, Saravana Kannan <skannan@codeaurora.org> wrote: > This reverts commit f9f41e3ef99ac9d4e91b07634362e393fb929aad. No explanation, no cake. :-) > Change-Id: Iddde3ef56c9e5b14dcb14f8737899b85e56f5b43 S-o-b missing.
On 2018-05-18 01:29, Rafael J. Wysocki wrote: > On Fri, May 18, 2018 at 10:24 AM, Saravana Kannan > <skannan@codeaurora.org> wrote: >> This reverts commit f9f41e3ef99ac9d4e91b07634362e393fb929aad. > > No explanation, no cake. :-) > >> Change-Id: Iddde3ef56c9e5b14dcb14f8737899b85e56f5b43 > > S-o-b missing. Sorry, forgot the S-o-b. But there's a long explanation in the cover letter :) -Saravana
On Fri, May 18, 2018 at 10:31 AM, <skannan@codeaurora.org> wrote: > On 2018-05-18 01:29, Rafael J. Wysocki wrote: >> >> On Fri, May 18, 2018 at 10:24 AM, Saravana Kannan >> <skannan@codeaurora.org> wrote: >>> >>> This reverts commit f9f41e3ef99ac9d4e91b07634362e393fb929aad. >> >> >> No explanation, no cake. :-) >> >>> Change-Id: Iddde3ef56c9e5b14dcb14f8737899b85e56f5b43 >> >> >> S-o-b missing. > > > Sorry, forgot the S-o-b. But there's a long explanation in the cover letter > :) Cover letters don't go into git repositories, so please move it to the patch itself.
On 2018-05-18 01:33, Rafael J. Wysocki wrote: > On Fri, May 18, 2018 at 10:31 AM, <skannan@codeaurora.org> wrote: >> On 2018-05-18 01:29, Rafael J. Wysocki wrote: >>> >>> On Fri, May 18, 2018 at 10:24 AM, Saravana Kannan >>> <skannan@codeaurora.org> wrote: >>>> >>>> This reverts commit f9f41e3ef99ac9d4e91b07634362e393fb929aad. >>> >>> >>> No explanation, no cake. :-) >>> >>>> Change-Id: Iddde3ef56c9e5b14dcb14f8737899b85e56f5b43 >>> >>> >>> S-o-b missing. >> >> >> Sorry, forgot the S-o-b. But there's a long explanation in the cover >> letter >> :) > > Cover letters don't go into git repositories, so please move it to the > patch itself. Will do. Do you have any opposition to what the series is trying to do? Thanks, Saravana
On Fri, May 18, 2018 at 10:47 AM, <skannan@codeaurora.org> wrote: > On 2018-05-18 01:33, Rafael J. Wysocki wrote: >> >> On Fri, May 18, 2018 at 10:31 AM, <skannan@codeaurora.org> wrote: >>> >>> On 2018-05-18 01:29, Rafael J. Wysocki wrote: >>>> >>>> >>>> On Fri, May 18, 2018 at 10:24 AM, Saravana Kannan >>>> <skannan@codeaurora.org> wrote: >>>>> >>>>> >>>>> This reverts commit f9f41e3ef99ac9d4e91b07634362e393fb929aad. >>>> >>>> >>>> >>>> No explanation, no cake. :-) >>>> >>>>> Change-Id: Iddde3ef56c9e5b14dcb14f8737899b85e56f5b43 >>>> >>>> >>>> >>>> S-o-b missing. >>> >>> >>> >>> Sorry, forgot the S-o-b. But there's a long explanation in the cover >>> letter >>> :) >> >> >> Cover letters don't go into git repositories, so please move it to the >> patch itself. > > > Will do. Do you have any opposition to what the series is trying to do? I'm not a devfreq maintainer, so I can afford having no opinion. :-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 075d18f..f790686 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1129,11 +1129,15 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) return NULL; } -static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy) +static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy, bool notify) { struct kobject *kobj; struct completion *cmp; + if (notify) + blocking_notifier_call_chain(&cpufreq_policy_notifier_list, + CPUFREQ_REMOVE_POLICY, policy); + down_write(&policy->rwsem); cpufreq_stats_free_table(policy); kobj = &policy->kobj; @@ -1151,7 +1155,7 @@ static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy) pr_debug("wait complete\n"); } -static void cpufreq_policy_free(struct cpufreq_policy *policy) +static void cpufreq_policy_free(struct cpufreq_policy *policy, bool notify) { unsigned long flags; int cpu; @@ -1164,7 +1168,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy) per_cpu(cpufreq_cpu_data, cpu) = NULL; write_unlock_irqrestore(&cpufreq_driver_lock, flags); - cpufreq_policy_put_kobj(policy); + cpufreq_policy_put_kobj(policy, notify); free_cpumask_var(policy->real_cpus); free_cpumask_var(policy->related_cpus); free_cpumask_var(policy->cpus); @@ -1296,6 +1300,8 @@ static int cpufreq_online(unsigned int cpu) goto out_destroy_policy; cpufreq_stats_create_table(policy); + blocking_notifier_call_chain(&cpufreq_policy_notifier_list, + CPUFREQ_CREATE_POLICY, policy); write_lock_irqsave(&cpufreq_driver_lock, flags); list_add(&policy->policy_list, &cpufreq_policy_list); @@ -1334,7 +1340,7 @@ static int cpufreq_online(unsigned int cpu) cpufreq_driver->exit(policy); out_free_policy: - cpufreq_policy_free(policy); + cpufreq_policy_free(policy, !new_policy); return ret; } @@ -1447,7 +1453,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) remove_cpu_dev_symlink(policy, dev); if (cpumask_empty(policy->real_cpus)) - cpufreq_policy_free(policy); + cpufreq_policy_free(policy, true); } /** diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 87f48dd..b6209b3 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -437,6 +437,9 @@ static inline void cpufreq_resume(void) {} /* Policy Notifiers */ #define CPUFREQ_ADJUST (0) #define CPUFREQ_NOTIFY (1) +#define CPUFREQ_START (2) +#define CPUFREQ_CREATE_POLICY (3) +#define CPUFREQ_REMOVE_POLICY (4) #ifdef CONFIG_CPU_FREQ int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);