[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <026561ca-8aca-4585-92f9-d1b65fd32b5c@huawei.com>
Date: Wed, 7 Jan 2026 18:21:35 +0800
From: "lihuisong (C)" <lihuisong@...wei.com>
To: <AmandeepKaur.Longia@....com>
CC: <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...wei.com>, <jonathan.cameron@...wei.com>,
<zhanjie9@...ilicon.com>, <zhenglifeng1@...wei.com>, <yubowen8@...wei.com>,
<zhangpengjie2@...wei.com>, <wangzhi12@...wei.com>,
<prime.zeng@...ilicon.com>, <lenb@...nel.org>, <bp@...en8.de>,
<rafael@...nel.org>
Subject: Re: [PATCH v1 0/6] ACPI: processor: Recovery some reverted patches
Hi Amandeep,
Could you help test this series on your platform?
It would be perfect if has your Tested-by.
/Huisong
在 2025/12/23 18:09, Huisong Li 写道:
> 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(-)
>
Powered by blists - more mailing lists