<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/cpuidle/sysfs.c, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-01-05T17:31:17+00:00</updated>
<entry>
<title>cpuidle: use default_groups in kobj_type</title>
<updated>2022-01-05T17:31:17+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-01-04T16:43:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7dfc5b6e909e8c434ce458d61c7d7c8cd95d5ad6'/>
<id>urn:sha1:7dfc5b6e909e8c434ce458d61c7d7c8cd95d5ad6</id>
<content type='text'>
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the cpuidle sysfs code to use default_groups field which
has been the preferred way since aa30f47cf666 ("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Fix cpuidle_remove_state_sysfs() kerneldoc comment</title>
<updated>2021-12-17T15:20:23+00:00</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-12-10T04:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d00ebcc6542da052b0afe28b1d448cc0f95827ad'/>
<id>urn:sha1:d00ebcc6542da052b0afe28b1d448cc0f95827ad</id>
<content type='text'>
Fix function name in sysfs.c kernel-doc comment
to remove a warning found by running scripts/kernel-doc,
which is caused by using 'make W=1'.

drivers/cpuidle/sysfs.c:512: warning: expecting prototype for
cpuidle_remove_driver_sysfs(). Prototype was for
cpuidle_remove_state_sysfs() instead

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Fix kobject memory leaks in error paths</title>
<updated>2021-10-01T18:42:22+00:00</updated>
<author>
<name>Anel Orazgaliyeva</name>
<email>anelkz@amazon.de</email>
</author>
<published>2021-09-06T18:34:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5f5a66c9aa9c331da5527c2e3fd9394e7091e01'/>
<id>urn:sha1:e5f5a66c9aa9c331da5527c2e3fd9394e7091e01</id>
<content type='text'>
Commit c343bf1ba5ef ("cpuidle: Fix three reference count leaks")
fixes the cleanup of kobjects; however, it removes kfree() calls
altogether, leading to memory leaks.

Fix those and also defer the initialization of dev-&gt;kobj_dev until
after the error check, so that we do not end up with a dangling
pointer.

Fixes: c343bf1ba5ef ("cpuidle: Fix three reference count leaks")
Signed-off-by: Anel Orazgaliyeva &lt;anelkz@amazon.de&gt;
Suggested-by: Aman Priyadarshi &lt;apeureka@amazon.de&gt;
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: record state entry rejection statistics</title>
<updated>2020-09-23T12:10:31+00:00</updated>
<author>
<name>Lina Iyer</name>
<email>ilina@codeaurora.org</email>
</author>
<published>2020-09-22T18:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f49735f4978f479b0de4f50ab217d5a56bc83c55'/>
<id>urn:sha1:f49735f4978f479b0de4f50ab217d5a56bc83c55</id>
<content type='text'>
CPUs may fail to enter the chosen idle state if there was a
pending interrupt, causing the cpuidle driver to return an error
value.

Record that and export it via sysfs along with the other idle state
statistics.

This could prove useful in understanding behavior of the governor
and the system during usecases that involve multiple CPUs.

Signed-off-by: Lina Iyer &lt;ilina@codeaurora.org&gt;
[ rjw: Changelog and documentation edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Fix three reference count leaks</title>
<updated>2020-05-29T16:07:18+00:00</updated>
<author>
<name>Qiushi Wu</name>
<email>wu000273@umn.edu</email>
</author>
<published>2020-05-28T18:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c343bf1ba5efcbf2266a1fe3baefec9cc82f867f'/>
<id>urn:sha1:c343bf1ba5efcbf2266a1fe3baefec9cc82f867f</id>
<content type='text'>
kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object.

Previous commit "b8eb718348b8" fixed a similar problem.

Signed-off-by: Qiushi Wu &lt;wu000273@umn.edu&gt;
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: sysfs: Remove sysfs_switch and switch attributes</title>
<updated>2020-05-19T15:41:17+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-05-19T06:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cce55cc902baa3e6b6bab5f72f3ce826cb8dc9a9'/>
<id>urn:sha1:cce55cc902baa3e6b6bab5f72f3ce826cb8dc9a9</id>
<content type='text'>
Since the cpuidle governor can be switched via sysfs in default,
remove sysfs_switch and cpuidle_switch_attrs.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Make cpuidle governor switchable to be the default behaviour</title>
<updated>2020-05-19T15:41:17+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-05-19T06:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b52e93e4e86c600492f977badad3c9e0f0303cb2'/>
<id>urn:sha1:b52e93e4e86c600492f977badad3c9e0f0303cb2</id>
<content type='text'>
For now cpuidle governor can be switched via sysfs only when the
boot option "cpuidle_sysfs_switch" is passed, but it's important
to switch the governor to adapt to different workloads, especially
after TEO and haltpoll governor were introduced.

Add available_governors and current_governor into the default
attributes, but reserve the current_governor_ro for compatiblity.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: sysfs: Accept governor name with 15 characters</title>
<updated>2020-05-19T15:41:17+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-05-19T06:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef7e7d65eb808b5d37b4596974526962a741e930'/>
<id>urn:sha1:ef7e7d65eb808b5d37b4596974526962a741e930</id>
<content type='text'>
CPUIDLE_NAME_LEN is 16, so it's possible to accept governor name
with 15 characters, but now store_current_governor() rejects
governor name with 15 characters as it returns -EINVAL if count
equals CPUIDLE_NAME_LEN.

Refactor the code to accept such case and simplify the code.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: sysfs: Fix the overlap for showing available governors</title>
<updated>2020-05-19T15:41:17+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-05-19T06:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f9f8daad3422809d1db47ef1ca5b1400c889f9d'/>
<id>urn:sha1:3f9f8daad3422809d1db47ef1ca5b1400c889f9d</id>
<content type='text'>
When showing the available governors, it's "%s " in scnprintf(),
not "%s", so if the governor name has 15 characters, it will
overlap with the later one, fix it by adding one more for the
size.

While we are at it, fix the minor coding style issue and remove
the "/sizeof(char)" since sizeof(char) always equals 1.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Reviewed-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Tested-by: Doug Smythies &lt;dsmythies@telus.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: sysfs: Minor coding style corrections</title>
<updated>2020-04-29T11:33:24+00:00</updated>
<author>
<name>Hanjun Guo</name>
<email>guohanjun@huawei.com</email>
</author>
<published>2020-04-27T09:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eba933ceebf212127c9aa1c87a162867af9cf781'/>
<id>urn:sha1:eba933ceebf212127c9aa1c87a162867af9cf781</id>
<content type='text'>
Fix two minor coding style issues.

Signed-off-by: Hanjun Guo &lt;guohanjun@huawei.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
