<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/cpufreq.h, branch v4.4.190</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.190</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.190'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-03-23T07:44:21Z</updated>
<entry>
<title>cpufreq: Use struct kobj_attribute instead of struct global_attr</title>
<updated>2019-03-23T07:44:21Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2019-01-25T07:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8d66722d84b7d543073edf3459e024869b706e3'/>
<id>urn:sha1:c8d66722d84b7d543073edf3459e024869b706e3</id>
<content type='text'>
commit 625c85a62cb7d3c79f6e16de3cfa972033658250 upstream.

The cpufreq_global_kobject is created using kobject_create_and_add()
helper, which assigns the kobj_type as dynamic_kobj_ktype and show/store
routines are set to kobj_attr_show() and kobj_attr_store().

These routines pass struct kobj_attribute as an argument to the
show/store callbacks. But all the cpufreq files created using the
cpufreq_global_kobject expect the argument to be of type struct
attribute. Things work fine currently as no one accesses the "attr"
argument. We may not see issues even if the argument is used, as struct
kobj_attribute has struct attribute as its first element and so they
will both get same address.

But this is logically incorrect and we should rather use struct
kobj_attribute instead of struct global_attr in the cpufreq core and
drivers and the show/store callbacks should take struct kobj_attribute
as argument instead.

This bug is caught using CFI CLANG builds in android kernel which
catches mismatch in function prototypes for such callbacks.

Reported-by: Donghee Han &lt;dh.han@samsung.com&gt;
Reported-by: Sangkyu Kim &lt;skwith.kim@samsung.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>cpufreq: use last policy after online for drivers with -&gt;setpolicy</title>
<updated>2015-12-02T22:50:33Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2015-12-02T00:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/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: create cpu/cpufreq/policyX directories</title>
<updated>2015-10-28T08:21:12Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/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:12Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/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:12Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-10-15T16:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/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: acpi-cpufreq: Use cpufreq_cpu_get_raw() in -&gt;get()</title>
<updated>2015-09-16T00:17:49Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-09-16T00:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/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>
<entry>
<title>Merge branch 'pm-opp'</title>
<updated>2015-09-01T13:52:41Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-09-01T13:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac2a29c8a4a641574febccd10169b26138a5d656'/>
<id>urn:sha1:ac2a29c8a4a641574febccd10169b26138a5d656</id>
<content type='text'>
* pm-opp:
  PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
  PM / OPP: Fix static checker warning (broken 64bit big endian systems)
  PM / OPP: Free resources and properly return error on failure
  cpufreq-dt: make scaling_boost_freqs sysfs attr available when boost is enabled
  cpufreq: dt: Add support for turbo/boost mode
  cpufreq: dt: Add support for operating-points-v2 bindings
  cpufreq: Allow drivers to enable boost support after registering driver
  cpufreq: Update boost flag while initializing freq table from OPPs
  PM / OPP: add dev_pm_opp_is_turbo() helper
  PM / OPP: Add helpers for initializing CPU OPPs
  PM / OPP: Add support for opp-suspend
  PM / OPP: Add OPP sharing information to OPP library
  PM / OPP: Add clock-latency-ns support
  PM / OPP: Add support to parse "operating-points-v2" bindings
  PM / OPP: Break _opp_add_dynamic() into smaller functions
  PM / OPP: Allocate dev_opp from _add_device_opp()
  PM / OPP: Create _remove_device_opp() for freeing dev_opp
  PM / OPP: Relocate few routines
  PM / OPP: Create a directory for opp bindings
  PM / OPP: Update bindings to make opp-hz a 64 bit value
</content>
</entry>
<entry>
<title>cpufreq: rename cpufreq_real_policy as cpufreq_user_policy</title>
<updated>2015-09-01T13:50:39Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-08-03T03:06:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c7a7b418dd1991079dd7ef03fec7d1863ef96154'/>
<id>urn:sha1:c7a7b418dd1991079dd7ef03fec7d1863ef96154</id>
<content type='text'>
Its all about caching min/max freq requested by userspace, and
the name 'cpufreq_real_policy' doesn't fit that well. Rename it to
cpufreq_user_policy.

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: remove redundant 'policy' field from user_policy</title>
<updated>2015-09-01T13:50:39Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-08-03T03:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=88dc4384958759510db248bf9158434ac783d407'/>
<id>urn:sha1:88dc4384958759510db248bf9158434ac783d407</id>
<content type='text'>
Its always same as policy-&gt;policy, and there is no need to keep another
copy of it. Remove it.

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: remove redundant 'governor' field from user_policy</title>
<updated>2015-09-01T13:50:39Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-08-03T03:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e27f8bd248756310a6df8b67f96d41d5a693642c'/>
<id>urn:sha1:e27f8bd248756310a6df8b67f96d41d5a693642c</id>
<content type='text'>
Its always same as policy-&gt;governor, and there is no need to keep
another copy of it. Remove it.

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>
</feed>
