<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/platform_profile.c, branch v7.0.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-22T04:03:00+00:00</updated>
<entry>
<title>Convert more 'alloc_obj' cases to default GFP_KERNEL arguments</title>
<updated>2026-02-22T04:03:00+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T04:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32a92f8c89326985e05dce8b22d3f0aa07a3e1bd'/>
<id>urn:sha1:32a92f8c89326985e05dce8b22d3f0aa07a3e1bd</id>
<content type='text'>
This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>acpi: platform_profile - Add max-power profile option</title>
<updated>2025-11-28T10:03:22+00:00</updated>
<author>
<name>Derek J. Clark</name>
<email>derekjohn.clark@gmail.com</email>
</author>
<published>2025-11-27T15:16:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5aefbf5b68794870ccec126cd68bbfd1ee09283a'/>
<id>urn:sha1:5aefbf5b68794870ccec126cd68bbfd1ee09283a</id>
<content type='text'>
Some devices, namely Lenovo Legion devices, have an "extreme" mode where
power draw is at the maximum limit of the cooling hardware. Add a new
"max-power" platform profile to properly reflect this operating mode.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Acked-by: Rafael J. Wysocki (Intel) &lt;rafael@kernel.org&gt;
Signed-off-by: Derek J. Clark &lt;derekjohn.clark@gmail.com&gt;
Reviewed-by: Armin Wolf &lt;W_Armin@gmx.de&gt;
Reviewed-by: Mark Pearson &lt;mpearson-lenovo@squebb.ca&gt;
Link: https://patch.msgid.link/20251127151605.1018026-2-derekjohn.clark@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: platform_profile: Avoid initializing on non-ACPI platforms</title>
<updated>2025-05-23T14:44:52+00:00</updated>
<author>
<name>Alexandre Ghiti</name>
<email>alexghiti@rivosinc.com</email>
</author>
<published>2025-05-22T14:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd133162c9cff5951a692fab9811fadf46a46457'/>
<id>urn:sha1:dd133162c9cff5951a692fab9811fadf46a46457</id>
<content type='text'>
The platform profile driver is loaded even on platforms that do not have
ACPI enabled. The initialization of the sysfs entries was recently moved
from platform_profile_register() to the module init call, and those
entries need acpi_kobj to be initialized which is not the case when ACPI
is disabled.

This results in the following warning:

 WARNING: CPU: 5 PID: 1 at fs/sysfs/group.c:131 internal_create_group+0xa22/0xdd8
 Modules linked in:
 CPU: 5 UID: 0 PID: 1 Comm: swapper/0 Tainted: G        W           6.15.0-rc7-dirty #6 PREEMPT
 Tainted: [W]=WARN
 Hardware name: riscv-virtio,qemu (DT)
 epc : internal_create_group+0xa22/0xdd8
  ra : internal_create_group+0xa22/0xdd8

 Call Trace:

 internal_create_group+0xa22/0xdd8
 sysfs_create_group+0x22/0x2e
 platform_profile_init+0x74/0xb2
 do_one_initcall+0x198/0xa9e
 kernel_init_freeable+0x6d8/0x780
 kernel_init+0x28/0x24c
 ret_from_fork+0xe/0x18

Fix this by checking if ACPI is enabled before trying to create sysfs
entries.

Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile")
Signed-off-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Mark Pearson &lt;mpearson-lenovo@squebb.ca&gt;
Link: https://patch.msgid.link/20250522141410.31315-1-alexghiti@rivosinc.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: platform_profile: Optimize _aggregate_choices()</title>
<updated>2025-03-27T19:44:29+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2025-03-25T20:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3035a6dd2d4736738949600b8abebbdb181e86ef'/>
<id>urn:sha1:3035a6dd2d4736738949600b8abebbdb181e86ef</id>
<content type='text'>
Choices aggregates passed to _aggregate_choices() are already filled
with ones, therefore we can avoid copying a new bitmap on the first
iteration.

This makes setting the PLATFORM_PROFILE_LAST bit on aggregates
unnecessary, so drop it as well.

While at it, add a couple empty lines to improve style.

Reviewed-by: Armin Wolf &lt;W_Armin@gmx.de&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Link: https://patch.msgid.link/20250325-pprof-opt-v2-1-736291e6e66b@gmail.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge back ACPI platform_profile driver material for 6.15</title>
<updated>2025-03-11T17:41:27+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2025-03-11T17:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3161782eb8aa9e5c08b07b392be6be0813bdaf9'/>
<id>urn:sha1:f3161782eb8aa9e5c08b07b392be6be0813bdaf9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ACPI: platform_profile: Add support for hidden choices</title>
<updated>2025-03-04T19:45:34+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2025-02-28T17:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=778b94d7ac17b5800aa857222911f09cc986b509'/>
<id>urn:sha1:778b94d7ac17b5800aa857222911f09cc986b509</id>
<content type='text'>
When two drivers don't support all the same profiles the legacy interface
only exports the common profiles.

This causes problems for cases where one driver uses low-power but another
uses quiet because the result is that neither is exported to sysfs.

To allow two drivers to disagree, add support for "hidden choices".
Hidden choices are platform profiles that a driver supports to be
compatible with the platform profile of another driver.

Fixes: 688834743d67 ("ACPI: platform_profile: Allow multiple handlers")
Reported-by: Antheas Kapenekakis &lt;lkml@antheas.dev&gt;
Closes: https://lore.kernel.org/platform-driver-x86/e64b771e-3255-42ad-9257-5b8fc6c24ac9@gmx.de/T/#mc068042dd29df36c16c8af92664860fc4763974b
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Tested-by: Antheas Kapenekakis &lt;lkml@antheas.dev&gt;
Tested-by: Derek J. Clark &lt;derekjohn.clark@gmail.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://patch.msgid.link/20250228170155.2623386-2-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge back ACPI platform_profile material for 6.15</title>
<updated>2025-02-24T12:18:16+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2025-02-24T12:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9597965c715541c014eac68e2bdab018c4e8ec82'/>
<id>urn:sha1:9597965c715541c014eac68e2bdab018c4e8ec82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ACPI: platform_profile: Fix memory leak in profile_class_is_visible()</title>
<updated>2025-02-18T19:03:37+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2025-02-12T19:30:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d403120cb9d4787b283ea202b2162f459d18fe9d'/>
<id>urn:sha1:d403120cb9d4787b283ea202b2162f459d18fe9d</id>
<content type='text'>
If class_find_device() finds a device, it's reference count is
incremented.

Call put_device() to drop this reference before returning.

Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile")
Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Reviewed-by: Mark Pearson &lt;mpearson-lenovo@squebb.ca&gt;
Link: https://patch.msgid.link/20250212193058.32110-1-kuurtb@gmail.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: platform_profile: Improve platform_profile_unregister()</title>
<updated>2025-02-18T18:03:23+00:00</updated>
<author>
<name>Kurt Borja</name>
<email>kuurtb@gmail.com</email>
</author>
<published>2025-02-12T19:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb519cf6113473c09d571e555137a36d7e2c8566'/>
<id>urn:sha1:bb519cf6113473c09d571e555137a36d7e2c8566</id>
<content type='text'>
Drivers usually call this method on error/exit paths and do not check
for it's return value, which is always 0 anyway, so make it void.

This is safe to do as currently all drivers use
devm_platform_profile_register().

While at it, improve the style and make the function safer by checking
for IS_ERR_OR_NULL before dereferencing the device pointer.

Signed-off-by: Kurt Borja &lt;kuurtb@gmail.com&gt;
Reviewed-by: Mark Pearson &lt;mpearson-lenovo@squebb.ca&gt;
Link: https://patch.msgid.link/20250212190308.21209-1-kuurtb@gmail.com
[ rjw: Minor changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
