mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/6] ACPI: processor: Recovery some reverted patches
@ 2025-12-23 10:09 Huisong Li
  2025-12-23 10:09 ` [PATCH v1 1/6] ACPI: processor: idle: Optimize ACPI idle driver registration Huisong Li
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Huisong Li @ 2025-12-23 10:09 UTC (permalink / raw)
  To: rafael, lenb, bp, AmandeepKaur.Longia
  Cc: linux-acpi, linux-kernel, linuxarm, jonathan.cameron, zhanjie9,
	zhenglifeng1, yubowen8, zhangpengjie2, wangzhi12, prime.zeng,
	lihuisong

This series of patches have been reverted due to the crash issue reported
by Borislav [1] and a missing cpuidle sysfs directory reported by Amandeep.

The root cause was commit 7a8c994cbb2d (ACPI: processor: idle: Optimize
ACPI idle driver registration).  Since the other patches in the series 
depended on this commit, they were also reverted.

I have analyzed these issues and implemented the following fixes:
Fix for the Crash:
The crash occurred because 'max_cstate' (which defaults to 8) was not
updated before the ACPI idle states were initialized.  As a result, the idle
driver believed multiple C-states were available, but only the state with
index 1 was actually initialized in the per-CPU acpi_cstate array.  When the
cpuidle governor tried to access a C-state index greater than 1, it hit a
NULL pointer.
Patch 1/6 fixes this by adding acpi_processor_cstate_first_run_checks() to
update 'max_cstate' before initialization.

Fix for missing /sys/devices/system/cpu/cpu*/cpuidle directory:
The previous optimization depended on an external patch [2].  In kernel versions
without that patch, acpi_processor_start() was being called before the ACPI idle
driver had finished registering.  This caused the cpuidle device registration
to fail, resulting in the missing directory.
Patch 1/6 fixes this by moving acpi_processor_register_idle_driver() ahead of 
the acpi_processor_driver registration.

Note:
In this series, only patch 1/6 has been modified to address these bugs, more
detail changes please see the commit.  Patches 2-6/6 remain identical to the
versions that were previously merged.

[1] https://lore.kernel.org/lkml/20251124200019.GIaSS5U9HhsWBotrQZ@fat_crate.local/
[2] https://lore.kernel.org/all/20240529133446.28446-2-Jonathan.Cameron@huawei.com/

Huisong Li (4):
  ACPI: processor: idle: Optimize ACPI idle driver registration
  ACPI: processor: Remove unused empty stubs of some functions
  ACPI: processor: idle: Rearrange declarations in header file
  ACPI: processor: Do not expose global variable acpi_idle_driver

Rafael J. Wysocki (2):
  ACPI: processor: Update cpuidle driver check in
    __acpi_processor_start()
  ACPI: processor: idle: Redefine two functions as void

 drivers/acpi/processor_driver.c |  13 +++-
 drivers/acpi/processor_idle.c   | 116 +++++++++++++++++++-------------
 include/acpi/processor.h        |  34 ++--------
 3 files changed, 86 insertions(+), 77 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-09 21:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-23 10:09 [PATCH v1 0/6] ACPI: processor: Recovery some reverted patches Huisong Li
2025-12-23 10:09 ` [PATCH v1 1/6] ACPI: processor: idle: Optimize ACPI idle driver registration Huisong Li
2025-12-23 10:09 ` [PATCH v1 2/6] ACPI: processor: Remove unused empty stubs of some functions Huisong Li
2025-12-23 10:09 ` [PATCH v1 3/6] ACPI: processor: Update cpuidle driver check in __acpi_processor_start() Huisong Li
2025-12-23 10:09 ` [PATCH v1 4/6] ACPI: processor: idle: Redefine two functions as void Huisong Li
2025-12-23 10:09 ` [PATCH v1 5/6] ACPI: processor: idle: Rearrange declarations in header file Huisong Li
2025-12-23 10:09 ` [PATCH v1 6/6] ACPI: processor: Do not expose global variable acpi_idle_driver Huisong Li
2025-12-24  2:05 ` [PATCH v1 0/6] ACPI: processor: Recovery some reverted patches Borislav Petkov
2026-01-02 10:18   ` Borislav Petkov
2026-01-04  9:57     ` lihuisong (C)
2026-01-09 21:40     ` Rafael J. Wysocki
2026-01-07 10:21 ` lihuisong (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®