<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/drivers/cpufreq/cpufreq.c, branch v4.4.4</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2015-12-02T22:50:33+00:00</updated>
<entry>
<title>cpufreq: use last policy after online for drivers with -&gt;setpolicy</title>
<updated>2015-12-02T22:50:33+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2015-12-02T00:52:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=69030dd1c3671625c6f766af0b64a4bb4409ac3b'/>
<id>urn:sha1:69030dd1c3671625c6f766af0b64a4bb4409ac3b</id>
<content type='text'>
For cpufreq drivers which use setpolicy interface, after offline-&gt;online
the policy is set to default. This can be reproduced by setting the
default policy of intel_pstate or longrun to ondemand and then change to
"performance". After offline and online, the setpolicy will be called with
the policy=ondemand.

For drivers using governors this condition is handled by storing
last_governor, during offline and restoring during online. The same should
be done for drivers using setpolicy interface. Storing last_policy during
offline and restoring during online.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: Always remove sysfs cpuX/cpufreq link on -&gt;remove_dev()</title>
<updated>2015-11-23T21:49:42+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-11-21T03:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=f344dae0fe9f88d3c7ec45f2d7bba84d6ce1ac00'/>
<id>urn:sha1:f344dae0fe9f88d3c7ec45f2d7bba84d6ce1ac00</id>
<content type='text'>
Subsys interface's -&gt;remove_dev() is called when the cpufreq driver is
unregistering or the CPU is getting physically removed. We keep removing
the cpuX/cpufreq link for all CPUs except the last one, which is a
mistake as all CPUs contain a link now.

Because of this, one CPU from each policy will still contain a link (to
an already removed policyX directory), after the cpufreq driver is
unregistered.

Fix that by removing the link first and then only see if the policy is
required to be freed. That will make sure that no links are left out.

Fixes: 96bdda61f58b ("cpufreq: create cpu/cpufreq/policyX directories")
Reported-and-tested-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: postfix policy directory with the first CPU in related_cpus</title>
<updated>2015-10-28T08:21:12+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-16T07:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=3510fac4549201919c565250fdff5cfa63db9e86'/>
<id>urn:sha1:3510fac4549201919c565250fdff5cfa63db9e86</id>
<content type='text'>
The sysfs policy directory is postfixed currently with the CPU number
for which the policy was created, which isn't necessarily the first CPU
in related_cpus mask.

To make it more consistent and predictable, lets postfix the policy with
the first cpu in related-cpus mask.

Suggested-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: create cpu/cpufreq/policyX directories</title>
<updated>2015-10-28T08:21:12+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=96bdda61f58b70431bbe8a3e49794c8210f7691b'/>
<id>urn:sha1:96bdda61f58b70431bbe8a3e49794c8210f7691b</id>
<content type='text'>
The cpufreq sysfs interface had been a bit inconsistent as one of the
CPUs for a policy had a real directory within its sysfs 'cpuX' directory
and all other CPUs had links to it. That also made the code a bit
complex as we need to take care of moving the sysfs directory if the CPU
containing the real directory is getting physically hot-unplugged.

Solve this by creating 'policyX' directories (per-policy) in
/sys/devices/system/cpu/cpufreq/ directory, where X is the CPU for which
the policy was first created.

This also removes the need of keeping kobj_cpu and we can remove it now.

Suggested-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Acked-by: is more of a general agreement from the person that he is
Reviewed-by: is a more strict tag and implies that the reviewer has
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: remove cpufreq_sysfs_{create|remove}_file()</title>
<updated>2015-10-28T08:21:12+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=c82bd44437f5d53d1654d9e36a9e4e55610f6624'/>
<id>urn:sha1:c82bd44437f5d53d1654d9e36a9e4e55610f6624</id>
<content type='text'>
They don't do anything special now, remove the unnecessary wrapper.

Reviewed-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: create cpu/cpufreq at boot time</title>
<updated>2015-10-28T08:21:12+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=8eec1020f0c0c03f7219ed50cf1b754be49dd448'/>
<id>urn:sha1:8eec1020f0c0c03f7219ed50cf1b754be49dd448</id>
<content type='text'>
Later patches will need to create policy specific directories in
/sys/devices/system/cpu/cpufreq/ directory and so the cpufreq directory
wouldn't be ever empty.

And so no fun creating/destroying it on need basis anymore. Create it
once on system boot.

Reviewed-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask</title>
<updated>2015-10-28T08:21:11+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=0998a03a3a4d35290993f86ffed0e311e8dd78f5'/>
<id>urn:sha1:0998a03a3a4d35290993f86ffed0e311e8dd78f5</id>
<content type='text'>
-&gt;related_cpus is empty at this point of time and copying -&gt;cpus to it
or orring -&gt;related_cpus with -&gt;cpus would result in the same value. But
cpumask_copy makes it rather clear.

Reviewed-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: Drop redundant check for inactive policies</title>
<updated>2015-10-14T00:30:28+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-13T05:27:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=e625742f9c6e5d01b5c46efcc2870893735badf3'/>
<id>urn:sha1:e625742f9c6e5d01b5c46efcc2870893735badf3</id>
<content type='text'>
We just made sure policy-&gt;cpu is online and this check will always fail
as the policy is active. Drop it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Saravana Kannan &lt;skannan@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: prevent lockup on reading scaling_available_frequencies</title>
<updated>2015-10-08T19:47:56+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2015-10-07T20:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=55582bccdc1e89ecc973c260d46e247df675d4df'/>
<id>urn:sha1:55582bccdc1e89ecc973c260d46e247df675d4df</id>
<content type='text'>
When scaling_available_frequencies is read on an offlined cpu, then
either lockup or junk values are displayed. This is caused by
freed freq_table, which policy is using.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in -&gt;get()</title>
<updated>2015-09-16T00:17:49+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-09-16T00:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=1f0bd44e937468446d080b98b5669844744c24a1'/>
<id>urn:sha1:1f0bd44e937468446d080b98b5669844744c24a1</id>
<content type='text'>
cpufreq_cpu_get() called by get_cur_freq_on_cpu() is overkill,
because the -&gt;get() callback is always invoked in a context in
which all of the conditions checked by cpufreq_cpu_get() are
guaranteed to be satisfied.

Use cpufreq_cpu_get_raw() instead of it and drop the
corresponding cpufreq_cpu_put() from get_cur_freq_on_cpu().

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
