Re: [PATCH 1/5] cpufreq: Introduce cpufreq_notify_post_transition()

From: Viresh Kumar
Date: Sat Nov 30 2013 - 21:48:58 EST


On 1 December 2013 01:50, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:
> On Saturday, November 30, 2013 09:26:19 PM Viresh Kumar wrote:
>> This introduces another routine cpufreq_notify_post_transition() which can be
>> used to send POSTCHANGE notification for new freq with or without both
>> {PRE|POST}CHANGE notifications for last freq in case of failures. This is useful
>> at multiple places, specially for sending transition failure notifications.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
>> ---
>>
>> Hi Rafael,
>>
>> Please see if you want to take it for 3.13 or 14, as this fixes bugs which are
>> partly introduced in 3.13..
>
> Which ones?

Patch:

commit d4019f0a92ab802f385cc9c8ad3ab7b5449712cb
Author: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Date: Wed Aug 14 19:38:24 2013 +0530

cpufreq: move freq change notifications to cpufreq core

adds:

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
+ retval = cpufreq_driver->target_index(policy, index);
+ if (retval)
+ pr_err("%s: Failed to change cpu frequency: %d\n",
+ __func__, retval);
+
+ if (notify) {
+ /*
+ * Notify with old freq in case we failed to change
+ * frequency
+ */
+ if (retval)
+ freqs.new = freqs.old;
+
+ cpufreq_notify_transition(policy, &freqs,
+ CPUFREQ_POSTCHANGE);
+ }


And I thought it might go in 3.13, but surely it doesn't fix any
obvious kernel crashes. It only fixes stuff when target_index() fails.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/