mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huisong Li <lihuisong@huawei.com>
To: <rafael@kernel.org>, <lenb@kernel.org>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<Sudeep.Holla@arm.com>, <linuxarm@huawei.com>,
	<jonathan.cameron@huawei.com>, <zhanjie9@hisilicon.com>,
	<zhenglifeng1@huawei.com>, <yubowen8@huawei.com>,
	<lihuisong@huawei.com>
Subject: [PATCH v2 1/7] ACPI: processor: idle: Mark the state as invalid if its entry method is illegal
Date: Mon, 3 Nov 2025 16:42:38 +0800	[thread overview]
Message-ID: <20251103084244.2654432-2-lihuisong@huawei.com> (raw)
In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com>

According to ACPI spec, entry method in LPI sub-package must be buffer
or integer. And the entry method is very key in cpuidle. So mark the state
as invalid.

Fixes: a36a7fecfe60 ("ACPI / processor_idle: Add support for Low Power Idle(LPI) states")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/acpi/processor_idle.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 341825e8ac63..9f1040eac051 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -956,6 +956,9 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
 			lpi_state->entry_method = ACPI_CSTATE_INTEGER;
 			lpi_state->address = obj->integer.value;
 		} else {
+			pr_debug("Entry method of state-%d is illegal, disable it.\n",
+				 state_idx);
+			lpi_state->flags = 0;
 			continue;
 		}
 
-- 
2.33.0


  reply	other threads:[~2025-11-03  8:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03  8:42 [PATCH v2 0/7] ACPI: processor: idle: enhance and cleancode for cpuidle state Huisong Li
2025-11-03  8:42 ` Huisong Li [this message]
2025-11-03 17:49   ` [PATCH v2 1/7] ACPI: processor: idle: Mark the state as invalid if its entry method is illegal Rafael J. Wysocki
2025-11-04  9:30     ` lihuisong (C)
2025-11-04 15:00       ` Rafael J. Wysocki
2025-11-05  8:53         ` lihuisong (C)
2025-11-03  8:42 ` [PATCH v2 2/7] ACPI: processor: idle: Mark the state as invalid when get lpi_state->arch_flags failed Huisong Li
2025-11-03 17:53   ` Rafael J. Wysocki
2025-11-03  8:42 ` [PATCH v2 3/7] ACPI: processor: idle: Relocate and verify acpi_processor_ffh_lpi_probe Huisong Li
2025-11-03 17:56   ` Rafael J. Wysocki
2025-11-04  9:37     ` lihuisong (C)
2025-11-03  8:42 ` [PATCH v2 4/7] ACPI: processor: idle: Disable ACPI idle if get power information failed in power notify Huisong Li
2025-11-03 18:09   ` Rafael J. Wysocki
2025-11-04  9:54     ` lihuisong (C)
2025-11-04 16:19       ` Rafael J. Wysocki
2025-11-05  9:06         ` lihuisong (C)
2025-11-03  8:42 ` [PATCH v2 5/7] ACPI: processor: idle: Remove useless codes about the verification of cstate count Huisong Li
2025-11-03 18:10   ` Rafael J. Wysocki
2025-11-04 10:03     ` lihuisong (C)
2025-11-04 16:20       ` Rafael J. Wysocki
2025-11-03  8:42 ` [PATCH v2 6/7] ACPI: processor: idle: Redefine setup idle functions to void Huisong Li
2025-11-03  8:42 ` [PATCH v2 7/7] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_dev " Huisong Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251103084244.2654432-2-lihuisong@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=Sudeep.Holla@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=rafael@kernel.org \
    --cc=yubowen8@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®