<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/processor_idle.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-15T09:59:57+00:00</updated>
<entry>
<title>ACPI: processor: idle: Fix memory leak when register cpuidle device failed</title>
<updated>2025-10-15T09:59:57+00:00</updated>
<author>
<name>Huisong Li</name>
<email>lihuisong@huawei.com</email>
</author>
<published>2025-07-28T07:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31ff8aa00948bd79f4f8c43a3fe56719b044ec18'/>
<id>urn:sha1:31ff8aa00948bd79f4f8c43a3fe56719b044ec18</id>
<content type='text'>
[ Upstream commit 11b3de1c03fa9f3b5d17e6d48050bc98b3704420 ]

The cpuidle device's memory is leaked when cpuidle device registration
fails in acpi_processor_power_init().  Free it as appropriate.

Fixes: 3d339dcbb56d ("cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure")
Signed-off-by: Huisong Li &lt;lihuisong@huawei.com&gt;
Link: https://patch.msgid.link/20250728070612.1260859-2-lihuisong@huawei.com
[ rjw: Changed the order of the new statements, added empty line after if () ]
[ rjw: Changelog 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>ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid</title>
<updated>2025-04-10T12:39:27+00:00</updated>
<author>
<name>Giovanni Gherdovich</name>
<email>ggherdovich@suse.cz</email>
</author>
<published>2025-03-28T14:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3561dc471ac6c83c2d02640f53e8957cba138b8'/>
<id>urn:sha1:d3561dc471ac6c83c2d02640f53e8957cba138b8</id>
<content type='text'>
[ Upstream commit 9e9b893404d43894d69a18dd2fc8fcf1c36abb7e ]

Prior to commit 496121c02127 ("ACPI: processor: idle: Allow probing on
platforms with one ACPI C-state"), the acpi_idle driver wouldn't load on
systems without a valid C-State at least as deep as C2.

The behavior was desirable for guests on hypervisors such as VMWare
ESXi, which by default don't have the _CST ACPI method, and set the C2
and C3 latencies to 101 and 1001 microseconds respectively via the FADT,
to signify they're unsupported.

Since the above change though, these virtualized deployments end up
loading acpi_idle, and thus entering the default C1 C-State set by
acpi_processor_get_power_info_default(); this is undesirable for a
system that's communicating to the OS it doesn't want C-States (missing
_CST, and invalid C2/C3 in FADT).

Make acpi_processor_get_power_info_fadt() return -ENODEV in that case,
so that acpi_processor_get_cstate_info() exits early and doesn't set
pr-&gt;flags.power = 1.

Fixes: 496121c02127 ("ACPI: processor: idle: Allow probing on platforms with one ACPI C-state")
Signed-off-by: Giovanni Gherdovich &lt;ggherdovich@suse.cz&gt;
Reviewed-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://patch.msgid.link/20250328143040.9348-1-ggherdovich@suse.cz
[ rjw: Changelog 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>ACPI: processor_idle: Fix invalid comparison with insertion sort for latency</title>
<updated>2024-07-02T18:35:29+00:00</updated>
<author>
<name>Kuan-Wei Chiu</name>
<email>visitorckw@gmail.com</email>
</author>
<published>2024-07-01T20:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=233323f9b9f828cd7cd5145ad811c1990b692542'/>
<id>urn:sha1:233323f9b9f828cd7cd5145ad811c1990b692542</id>
<content type='text'>
The acpi_cst_latency_cmp() comparison function currently used for
sorting C-state latencies does not satisfy transitivity, causing
incorrect sorting results.

Specifically, if there are two valid acpi_processor_cx elements A and B
and one invalid element C, it may occur that A &lt; B, A = C, and B = C.
Sorting algorithms assume that if A &lt; B and A = C, then C &lt; B, leading
to incorrect ordering.

Given the small size of the array (&lt;=8), we replace the library sort
function with a simple insertion sort that properly ignores invalid
elements and sorts valid ones based on latency. This change ensures
correct ordering of the C-state latencies.

Fixes: 65ea8f2c6e23 ("ACPI: processor idle: Fix up C-state latency if not ordered")
Reported-by: Julian Sikorski &lt;belegdol@gmail.com&gt;
Closes: https://lore.kernel.org/lkml/70674dc7-5586-4183-8953-8095567e73df@gmail.com
Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Tested-by: Julian Sikorski &lt;belegdol@gmail.com&gt;
Cc: All applicable &lt;stable@vger.kernel.org&gt;
Link: https://patch.msgid.link/20240701205639.117194-1-visitorckw@gmail.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()</title>
<updated>2024-02-15T19:26:40+00:00</updated>
<author>
<name>Armin Wolf</name>
<email>W_Armin@gmx.de</email>
</author>
<published>2024-02-13T00:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e18afcb7b2a12b635ac10081f943fcf84ddacc51'/>
<id>urn:sha1:e18afcb7b2a12b635ac10081f943fcf84ddacc51</id>
<content type='text'>
After unregistering the CPU idle device, the memory associated with
it is not freed, leading to a memory leak:

unreferenced object 0xffff896282f6c000 (size 1024):
  comm "swapper/0", pid 1, jiffies 4294893170
  hex dump (first 32 bytes):
    00 00 00 00 0b 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace (crc 8836a742):
    [&lt;ffffffff993495ed&gt;] kmalloc_trace+0x29d/0x340
    [&lt;ffffffff9972f3b3&gt;] acpi_processor_power_init+0xf3/0x1c0
    [&lt;ffffffff9972d263&gt;] __acpi_processor_start+0xd3/0xf0
    [&lt;ffffffff9972d2bc&gt;] acpi_processor_start+0x2c/0x50
    [&lt;ffffffff99805872&gt;] really_probe+0xe2/0x480
    [&lt;ffffffff99805c98&gt;] __driver_probe_device+0x78/0x160
    [&lt;ffffffff99805daf&gt;] driver_probe_device+0x1f/0x90
    [&lt;ffffffff9980601e&gt;] __driver_attach+0xce/0x1c0
    [&lt;ffffffff99803170&gt;] bus_for_each_dev+0x70/0xc0
    [&lt;ffffffff99804822&gt;] bus_add_driver+0x112/0x210
    [&lt;ffffffff99807245&gt;] driver_register+0x55/0x100
    [&lt;ffffffff9aee4acb&gt;] acpi_processor_driver_init+0x3b/0xc0
    [&lt;ffffffff990012d1&gt;] do_one_initcall+0x41/0x300
    [&lt;ffffffff9ae7c4b0&gt;] kernel_init_freeable+0x320/0x470
    [&lt;ffffffff99b231f6&gt;] kernel_init+0x16/0x1b0
    [&lt;ffffffff99042e6d&gt;] ret_from_fork+0x2d/0x50

Fix this by freeing the CPU idle device after unregistering it.

Fixes: 3d339dcbb56d ("cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure")
Signed-off-by: Armin Wolf &lt;W_Armin@gmx.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: processor_idle: use raw_safe_halt() in acpi_idle_play_dead()</title>
<updated>2023-11-20T16:26:20+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-27T18:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9bb69ba4c177dccaa1f5b5cbdf80b67813328348'/>
<id>urn:sha1:9bb69ba4c177dccaa1f5b5cbdf80b67813328348</id>
<content type='text'>
Xen HVM guests were observed taking triple-faults when attempting to
online a previously offlined vCPU.

Investigation showed that the fault was coming from a failing call
to lockdep_assert_irqs_disabled(), in load_current_idt() which was
too early in the CPU bringup to actually catch the exception and
report the failure cleanly.

This was a false positive, caused by acpi_idle_play_dead() setting
the per-cpu hardirqs_enabled flag by calling safe_halt(). Switch it
to use raw_safe_halt() instead, which doesn't do so.

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: 6.6+ &lt;stable@vger.kernel.org&gt; # 6.6+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle, ACPI: Evaluate LPI arch_flags for broadcast timer</title>
<updated>2023-10-04T15:31:27+00:00</updated>
<author>
<name>Oza Pawandeep</name>
<email>quic_poza@quicinc.com</email>
</author>
<published>2023-10-03T17:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4785aa8028536c2be656d22c74ec1995b97056f3'/>
<id>urn:sha1:4785aa8028536c2be656d22c74ec1995b97056f3</id>
<content type='text'>
Arm® Functional Fixed Hardware Specification defines LPI states,
which provide an architectural context loss flags field that can
be used to describe the context that might be lost when an LPI
state is entered.

- Core context Lost
        - General purpose registers.
        - Floating point and SIMD registers.
        - System registers, include the System register based
        - generic timer for the core.
        - Debug register in the core power domain.
        - PMU registers in the core power domain.
        - Trace register in the core power domain.
- Trace context loss
- GICR
- GICD

Qualcomm's custom CPUs preserves the architectural state,
including keeping the power domain for local timers active.
when core is power gated, the local timers are sufficient to
wake the core up without needing broadcast timer.

The patch fixes the evaluation of cpuidle arch_flags, and moves only to
broadcast timer if core context lost is defined in ACPI LPI.

Fixes: a36a7fecfe60 ("ACPI / processor_idle: Add support for Low Power Idle(LPI) states")
Reviewed-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Oza Pawandeep &lt;quic_poza@quicinc.com&gt;
Link: https://lore.kernel.org/r/20231003173333.2865323-1-quic_poza@quicinc.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/smpboot: Remove the CPU0 hotplug kludge</title>
<updated>2023-05-15T11:44:49+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2023-05-12T21:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5475abbde77f6d78a052a81e5d5de70e59f7181e'/>
<id>urn:sha1:5475abbde77f6d78a052a81e5d5de70e59f7181e</id>
<content type='text'>
This was introduced with commit e1c467e69040 ("x86, hotplug: Wake up CPU0
via NMI instead of INIT, SIPI, SIPI") to eventually support physical
hotplug of CPU0:

 "We'll change this code in the future to wake up hard offlined CPU0 if
  real platform and request are available."

11 years later this has not happened and physical hotplug is not officially
supported. Remove the cruft.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Tested-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Tested-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Tested-by: Helge Deller &lt;deller@gmx.de&gt; # parisc
Tested-by: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt; # Steam Deck
Link: https://lore.kernel.org/r/20230512205255.768845190@linutronix.de
</content>
</entry>
<entry>
<title>Merge tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2023-02-21T20:23:24+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-21T20:23:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88af9b164c7a25a71b1a1a699872b869e2e84c77'/>
<id>urn:sha1:88af9b164c7a25a71b1a1a699872b869e2e84c77</id>
<content type='text'>
Pull ACPI updates from Rafael Wysocki:
 "These fix a frequency limit issue in the ACPI processor performance
  library code, fix a few issues in the ACPICA code, improve Crystal
  Cove support in the ACPI PMIC driver, fix string handling in the ACPI
  battery driver, add IRQ override quirks for a few machines more, fix
  other assorted problems and clean up code and documentation.

  Specifics:

   - Drop port I/O validation for some regions to avoid AML failures due
     to rejections of legitimate port I/O writes (Mario Limonciello)

   - Constify acpi_get_handle() pathname argument to allow its callers
     to pass const pathnames to it (Sakari Ailus)

   - Prevent acpi_ns_simple_repair() from crashing in some cases when
     AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin)

   - Fix typo in CDAT DSMAS struct definition (Lukas Wunner)

   - Drop an unnecessary (void *) conversion from the ACPI processor
     driver (Zhou jie)

   - Modify the ACPI processor performance library code to use the "no
     limit" frequency QoS as appropriate and adjust the intel_pstate
     driver accordingly (Rafael Wysocki)

   - Add support for NBFT to the ACPI table parser (Stuart Hayes)

   - Introduce list of known non-PNP devices to avoid enumerating some
     of them as PNP devices (Rafael Wysocki)

   - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow
     scripts to report the actual maintainers information (Rafael
     Wysocki)

   - Add two more entries to the ACPI IRQ override quirk list (Adam
     Niederer, Werner Sembach)

   - Add a pmic_i2c_address entry for Intel Bay Trail Crystal Cove to
     allow intel_soc_pmic_exec_mipi_pmic_seq_element() to be used with
     the Bay Trail Crystal Cove PMIC OpRegion driver (Hans de Goede)

   - Add comments with DSDT power OpRegion field names to the ACPI PMIC
     driver (Hans de Goede)

   - Fix string termination handling in the ACPI battery driver (Armin
     Wolf)

   - Limit error type to 32-bit width in the ACPI APEI error injection
     code (Shuai Xue)

   - Fix Lenovo Ideapad Z570 DMI match in the ACPI backlight driver
     (Hans de Goede)

   - Silence missing prototype warnings in some places in the
     ACPI-related code (Ammar Faizi)

   - Make kobj_type structures used in the ACPI code constant (Thomas
     Weißschuh)

   - Correct spelling in firmware-guide/ACPI (Randy Dunlap)

   - Clarify the meaning of Explicit and Implicit in the _DSD GPIO
     properties documentation (Andy Shevchenko)

   - Fix some kernel-doc comments in the ACPI CPPC library code (Yang
     Li)"

* tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
  ACPI: make kobj_type structures constant
  Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit
  ACPICA: Fix typo in CDAT DSMAS struct definition
  ACPI: resource: Do IRQ override on all TongFang GMxRGxx
  ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models
  ACPI: CPPC: Fix some kernel-doc comments
  ACPI: video: Fix Lenovo Ideapad Z570 DMI match
  Documentation: firmware-guide/ACPI: correct spelling
  ACPI: PMIC: Add comments with DSDT power opregion field names
  ACPI: battery: Increase maximum string length
  ACPI: battery: Fix buffer overread if not NUL-terminated
  ACPI: APEI: EINJ: Limit error type to 32-bit width
  MAINTAINERS: Add x86 ACPI paths to the ACPI entry
  ACPI: battery: Fix missing NUL-termination with large strings
  ACPI: PNP: Introduce list of known non-PNP devices
  ACPICA: nsrepair: handle cases without a return value correctly
  ACPI: Silence missing prototype warnings
  cpufreq: intel_pstate: Drop ACPI _PSS states table patching
  ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily
  ACPI: processor: perflib: Use the "no limit" frequency QoS
  ...
</content>
</entry>
<entry>
<title>cpuidle, ACPI: Make noinstr clean</title>
<updated>2023-01-13T10:48:16+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-01-12T19:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a123d6ae6ea930b9bb3c595ceac2b2f93039f67'/>
<id>urn:sha1:6a123d6ae6ea930b9bb3c595ceac2b2f93039f67</id>
<content type='text'>
objtool found cases where ACPI methods called out into instrumentation code:

  vmlinux.o: warning: objtool: io_idle+0xc: call to __inb.isra.0() leaves .noinstr.text section
  vmlinux.o: warning: objtool: acpi_idle_enter+0xfe: call to num_online_cpus() leaves .noinstr.text section
  vmlinux.o: warning: objtool: acpi_idle_enter+0x115: call to acpi_idle_fallback_to_c1.isra.0() leaves .noinstr.text section

Fix this by: marking the IO in/out, acpi_idle_fallback_to_c1() and
num_online_cpus() methods as __always_inline.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Link: https://lore.kernel.org/r/20230112195541.294846301@infradead.org
</content>
</entry>
<entry>
<title>acpi_idle: Remove tracing</title>
<updated>2023-01-13T10:48:15+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2023-01-12T19:43:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8ce78470bf2dd1d08107736e813fa62e09aa4647'/>
<id>urn:sha1:8ce78470bf2dd1d08107736e813fa62e09aa4647</id>
<content type='text'>
All the idle routines are called with RCU disabled, as such there must
not be any tracing inside.

While there; clean-up the io-port idle thing.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Link: https://lore.kernel.org/r/20230112195540.251666856@infradead.org
</content>
</entry>
</feed>
