<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/cpuidle/sysfs.c, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-18T18:16:29+00:00</updated>
<entry>
<title>cpuidle: Fix kobject memory leaks in error paths</title>
<updated>2021-11-18T18:16:29+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=b9a0ff08a69ed13bf3eb3a1e751a0108c0f407e7'/>
<id>urn:sha1:b9a0ff08a69ed13bf3eb3a1e751a0108c0f407e7</id>
<content type='text'>
[ Upstream commit e5f5a66c9aa9c331da5527c2e3fd9394e7091e01 ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&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>
<entry>
<title>cpuidle: sysfs: Remove the unused define_one_r(o/w) macros</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:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f516e7cbe88f05023b6cc458d3a22b7dc56af99'/>
<id>urn:sha1:2f516e7cbe88f05023b6cc458d3a22b7dc56af99</id>
<content type='text'>
The define_one_ro and define_one_rw macros are not used,
remove it.

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>
<entry>
<title>Merge branch 'intel_idle+acpi'</title>
<updated>2020-01-22T23:35:50+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-01-22T23:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6cf623ba3f83118b0f75be2cc1675931e21c887'/>
<id>urn:sha1:e6cf623ba3f83118b0f75be2cc1675931e21c887</id>
<content type='text'>
Merge changes updating the ACPI processor driver in order to export
acpi_processor_evaluate_cst() to the code outside of it and adding
ACPI support to the intel_idle driver based on that.

* intel_idle+acpi:
  Documentation: admin-guide: PM: Add intel_idle document
  intel_idle: Use ACPI _CST on server systems
  intel_idle: Add module parameter to prevent ACPI _CST from being used
  intel_idle: Allow ACPI _CST to be used for selected known processors
  cpuidle: Allow idle states to be disabled by default
  intel_idle: Use ACPI _CST for processor models without C-state tables
  intel_idle: Refactor intel_idle_cpuidle_driver_init()
  ACPI: processor: Export acpi_processor_evaluate_cst()
  ACPI: processor: Make ACPI_PROCESSOR_CSTATE depend on ACPI_PROCESSOR
  ACPI: processor: Clean up acpi_processor_evaluate_cst()
  ACPI: processor: Introduce acpi_processor_evaluate_cst()
  ACPI: processor: Export function to claim _CST control
</content>
</entry>
</feed>
