From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout03.his.huawei.com (canpmsgout03.his.huawei.com [113.46.200.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3A88287245; Mon, 3 Nov 2025 08:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159372; cv=none; b=FR/o2RFCdefOlEMATH/aKsgKgXRkBaqnN6mjyhdfDCh+nRh6zYSFQQrNcj5d4XJjrOv/lfUatPqTthrEsV+lS6Lk6bc+zUSPf8NnUPmo0eAH8WixtNs4ptNb4txfBsYT7ywlWwD22dnWe2LJHhzV33u3aEM1lL+Gys/nqAbOHv4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159372; c=relaxed/simple; bh=Eal9+GaBaTK8Emch51Crk0Ut0f2tDLiKgxG1ESeFIvY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tjVYzntqmxjLqeEsEWHkzRQgNPf0ImsQfw4tV/0+zza573TpemW4bY3rHkRp0y2AGy3HCk6AHwmhVyyGvTsXFkOZnQcsGgv815HzQiPGlSFdv0Al87cdxZkQLXyksmhBUQ0eypoZzIs8usL/115g6AHjhe4WhEja8vdbBdqWhHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=qYLQ3JNp; arc=none smtp.client-ip=113.46.200.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="qYLQ3JNp" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=lJ6ifbD9CdTpPwXjFL/2uF+ta4RpaTrCFVLzkUmeufE=; b=qYLQ3JNp6kx3J46T2Nb7TNxDzJ6gTGSHNy4FlnlXzL/72lUbEEDrbYvdF6g6oM+7uPIHM7Oxm nBT0ApIAeBQhU4EA2CUPXrxtN7wBVHh5Y/XZwnleD6aW1sNtBUbBY1W5/K0OXwQP7prTqfRIboM YNAciNxxmEseqEXJsbQBctM= Received: from mail.maildlp.com (unknown [172.19.163.174]) by canpmsgout03.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6R01NXzpStT; Mon, 3 Nov 2025 16:41:19 +0800 (CST) Received: from dggemv712-chm.china.huawei.com (unknown [10.1.198.32]) by mail.maildlp.com (Postfix) with ESMTPS id 33EF614020C; Mon, 3 Nov 2025 16:42:46 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv712-chm.china.huawei.com (10.1.198.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:45 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:45 +0800 From: Huisong Li To: , CC: , , , , , , , , 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 Message-ID: <20251103084244.2654432-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" 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 --- 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 hand= le, lpi_state->entry_method =3D ACPI_CSTATE_INTEGER; lpi_state->address =3D obj->integer.value; } else { + pr_debug("Entry method of state-%d is illegal, disable it.\n", + state_idx); + lpi_state->flags =3D 0; continue; } =20 --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout02.his.huawei.com (canpmsgout02.his.huawei.com [113.46.200.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA2D82E3B15; Mon, 3 Nov 2025 08:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.217 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159376; cv=none; b=Vh/Z5KK3/FRBEamwRRCf24k8DDqImZX0u1cBgpTUKjKIuj6HctrBAcyK5si7WZ3umz/jiSVyf5CvV0hmvSB8e4X8smKNIRMVRVV28Qe2J8JxZfjZW8WFAgFLq46i0sQzvdY+WGxvsRmZkN1V4prnProxVt5zu1aVRZz6S7no1Dg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159376; c=relaxed/simple; bh=b0cFH/dw4TqAECJ0j0rSvmDchB/OCs3ZFetztlScKEU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fJCV+5sEaWqRcjd6YwiYFx2Cu5RjmUtSPbBkce1xo5by4xzp20xk0//lmbJSKf938NrfH+t2YnGcr1JQpFV+KKuZvnCaJ0XAwKTI03FvR8w2flMAx5/NzMIfYxjaAkykWzRVhJfOcSz2gtJW4ieL1vjii1gtowneFuDPoBJKNQ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=MPXge9kZ; arc=none smtp.client-ip=113.46.200.217 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="MPXge9kZ" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=7AEYczK+1l+A0ELZLDbSR3AR3IGjYRryW8CiZbqiNJY=; b=MPXge9kZOaoKtK9WZpJPBEHaRjKmXOUFgmOaWYnu5WJW6fA+8wCijJMntPkIbhx+ZPIhp7L2r mxYp77Gj63OcOqgG3uJCZBqAA9X3gQ12se4OIyFu56qb7AN0o/i9/0eDrCbuQZ3ZydI3+ATU8vP 6Oy+LMuhIKpywoJQvBAVFR0= Received: from mail.maildlp.com (unknown [172.19.163.174]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6K57fTzcb0C; Mon, 3 Nov 2025 16:41:13 +0800 (CST) Received: from dggemv705-chm.china.huawei.com (unknown [10.3.19.32]) by mail.maildlp.com (Postfix) with ESMTPS id A4EBF14020C; Mon, 3 Nov 2025 16:42:46 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv705-chm.china.huawei.com (10.3.19.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:46 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:45 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 2/7] ACPI: processor: idle: Mark the state as invalid when get lpi_state->arch_flags failed Date: Mon, 3 Nov 2025 16:42:39 +0800 Message-ID: <20251103084244.2654432-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" The architecture specific context loss flags is important for ARM. And this flag is used to control the execution of different code flows in acpi_processor_ffh_lpi_enter(). So mark the state as invalid when get lpi_state->arch_flags of this state failed. Fixes: a36a7fecfe60 ("ACPI / processor_idle: Add support for Low Power Idle= (LPI) states") Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 9f1040eac051..5213a545fa78 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -983,8 +983,12 @@ static int acpi_processor_evaluate_lpi(acpi_handle han= dle, if (obj_get_integer(pkg_elem + 2, &lpi_state->flags)) lpi_state->flags =3D 0; =20 - if (obj_get_integer(pkg_elem + 3, &lpi_state->arch_flags)) - lpi_state->arch_flags =3D 0; + if (obj_get_integer(pkg_elem + 3, &lpi_state->arch_flags)) { + pr_err("Get state-%d architecture specific context loss flags failed, d= isable it.\n", + state_idx); + lpi_state->flags =3D 0; + continue; + } =20 if (obj_get_integer(pkg_elem + 4, &lpi_state->res_cnt_freq)) lpi_state->res_cnt_freq =3D 1; --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD29A2E1C64; Mon, 3 Nov 2025 08:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159378; cv=none; b=lLrvpsy1vDW3FJWoVPdU+Wmf0Uvb6KHBtPolDdEElxss2k94nmq8yutmEkSUTqGZ8E/7JQqhS/839hcshMrP7Bq8dDvWw0byCUSHzlEaDKs6GdiLQX6786FaTNLs7xgbAPl8oBoxrkzJvgAM9I2MvqMHV88kgM7uOjbqTvx4tVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159378; c=relaxed/simple; bh=LYgldWbWOanLHXis0kehus6JhqHIHKJNZrxXSi7e1Jo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=THJK5LDL27Hr9b+D3bOG8aJ6JmT/YZtNxnSun3qtrvMw38lm2GNfX2FJaVaKeX4NJKNF58kEjPFbR4qvE9byJEd6duSPEseZ1io9yMcNVrbhz0ZG5m/ti9Y0XTzdzSO+C6SW3RVJoBDfJrqITrnkM8vom5JG55acqjMppMZug5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=oAFcVA2t; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="oAFcVA2t" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=079+V7X5gZkn1b6Q2N26Tvjw+scW8RqMFN0AFmVQDCs=; b=oAFcVA2tm/AfSDmY9JNBEv2q6dJzTk2PxcCXK0vn7/2XONb7tetaUY/1bFo/zOJRYILETOr6W nGF3wXBKdwAOJMIuVODhXHliwgpcPLg+CLejPr4qA2j5AFw8EDXEzLK7Z6nF5RonzIURtap9V1s 1I53SYUkFhOCZPGCd0JhUpI= Received: from mail.maildlp.com (unknown [172.19.88.105]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6J3R9zz1prLb; Mon, 3 Nov 2025 16:41:12 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id 139FA1402C1; Mon, 3 Nov 2025 16:42:47 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:46 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:46 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 3/7] ACPI: processor: idle: Relocate and verify acpi_processor_ffh_lpi_probe Date: Mon, 3 Nov 2025 16:42:40 +0800 Message-ID: <20251103084244.2654432-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" The platform used LPI need check if the LPI support and the entry method is valid by the acpi_processor_ffh_lpi_probe(). But the return of acpi_processor_ffh_lpi_probe() in acpi_processor_setup_cpuidle_dev() isn't verified by any caller. What's more, acpi_processor_get_power_info() is a more logical place for verifying the validity of FFH LPI than acpi_processor_setup_cpuidle_dev(). So move acpi_processor_ffh_lpi_probe() from the latter to the former and verify its return. Fixes: a36a7fecfe60 ("ACPI / processor_idle: Add support for Low Power Idle= (LPI) states") Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5213a545fa78..c73df5933691 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1266,7 +1266,7 @@ static int acpi_processor_setup_cpuidle_dev(struct ac= pi_processor *pr, =20 dev->cpu =3D pr->id; if (pr->flags.has_lpi) - return acpi_processor_ffh_lpi_probe(pr->id); + return 0; =20 return acpi_processor_setup_cpuidle_cx(pr, dev); } @@ -1277,7 +1277,13 @@ static int acpi_processor_get_power_info(struct acpi= _processor *pr) =20 ret =3D acpi_processor_get_lpi_info(pr); if (ret) - ret =3D acpi_processor_get_cstate_info(pr); + return acpi_processor_get_cstate_info(pr); + + if (pr->flags.has_lpi) { + ret =3D acpi_processor_ffh_lpi_probe(pr->id); + if (ret) + pr_err("Processor FFH LPI state is invalid.\n"); + } =20 return ret; } --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB9AB2E426B; Mon, 3 Nov 2025 08:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159377; cv=none; b=Xpu/7n1i3dtgKa+e1rxfyQsPzgjPyVanzcsi5MfU3NJiAxzQMEriRq2n+v3aN/L/FI2p8IS5NlkjK959VA7t9s+5oT51kKd8DqoqQdd2sUR7ufoWwTgvEqNAcHBfaEhb/pzy0Eu1mHQmfIhVhYOn24bVg8MNXQ2NZncTlGPS1Sw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159377; c=relaxed/simple; bh=SrTU/8kb4iQzJ+XiiFzJWXGiLT6UPjVKBLZwQajTtqU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PpsrCBw3ES/2MhuSecMpqj+nSSbgY/ac0Onfowrb+NYiRa9r+cbVF7IO0WUqMnFBY1Tdi7A5zD78VcJZzn4ACFZ0CLu+rAvFGyaj/Uv5NzxlxgnsuViHpavFRxp4IURV3C2ZceV25jInk+FD4lu9jSZ/VKs4nzMw19gu/PRsku0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=gAJ391/P; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="gAJ391/P" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=oFzlct61x2Y7EyyS5RO9ssZbpkuYYkewIZ1by74biZc=; b=gAJ391/PYfmFMlT/dhFaZWPPSyRXKtnX9vxVBFhkTJOOv+JuDxTxSNxpxpNGe4RnAtNaL5uUj 3GMv2R+XATGFaiGEMsDgAoE9z2Jr+CQ993obkPvG++ggM00v3dXQ8bZoLwoQ/UH6wwz0cCQQ/3D 3cUqtHhOSQszNJfWY+0xKYA= Received: from mail.maildlp.com (unknown [172.19.163.48]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6G5pvYz12LJp; Mon, 3 Nov 2025 16:41:10 +0800 (CST) Received: from dggemv712-chm.china.huawei.com (unknown [10.1.198.32]) by mail.maildlp.com (Postfix) with ESMTPS id 76BA5180080; Mon, 3 Nov 2025 16:42:47 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv712-chm.china.huawei.com (10.1.198.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:46 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 4/7] ACPI: processor: idle: Disable ACPI idle if get power information failed in power notify Date: Mon, 3 Nov 2025 16:42:41 +0800 Message-ID: <20251103084244.2654432-5-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" The old states may not be usable any more if get power information failed in power notify. The ACPI idle should be disabled entirely. Fixes: f427e5f1cf75 ("ACPI / processor: Get power info before updating the = C-states") Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index c73df5933691..4627b00257e6 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1317,6 +1317,7 @@ int acpi_processor_power_state_has_changed(struct acp= i_processor *pr) int cpu; struct acpi_processor *_pr; struct cpuidle_device *dev; + int ret =3D 0; =20 if (disabled_by_idle_boot_param()) return 0; @@ -1345,8 +1346,18 @@ int acpi_processor_power_state_has_changed(struct ac= pi_processor *pr) cpuidle_disable_device(dev); } =20 - /* Populate Updated C-state information */ - acpi_processor_get_power_info(pr); + /* + * Populate Updated C-state information + * The same idle state is used for all CPUs, cpuidle of all CPUs + * should be disabled. + */ + ret =3D acpi_processor_get_power_info(pr); + if (ret) { + pr_err("Get processor-%u power information failed, disable cpuidle of a= ll CPUs\n", + pr->id); + goto release_lock; + } + acpi_processor_setup_cpuidle_states(pr); =20 /* Enable all cpuidle devices */ @@ -1354,18 +1365,19 @@ int acpi_processor_power_state_has_changed(struct a= cpi_processor *pr) _pr =3D per_cpu(processors, cpu); if (!_pr || !_pr->flags.power_setup_done) continue; - acpi_processor_get_power_info(_pr); - if (_pr->flags.power) { + ret =3D acpi_processor_get_power_info(_pr); + if (!ret && _pr->flags.power) { dev =3D per_cpu(acpi_cpuidle_device, cpu); acpi_processor_setup_cpuidle_dev(_pr, dev); cpuidle_enable_device(dev); } } +release_lock: cpuidle_resume_and_unlock(); cpus_read_unlock(); } =20 - return 0; + return ret; } =20 void acpi_processor_register_idle_driver(void) --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout10.his.huawei.com (canpmsgout10.his.huawei.com [113.46.200.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75F222E06E6; Mon, 3 Nov 2025 08:42:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.225 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159378; cv=none; b=XhPWf+iqgtVhiNIf2w4kqdOQkMGiToRXGV8yxQUyGFiT8nY58folijGESkQ0B6Oc1ADaIhtnL9mrWpxJqcPjGVq/yapTZdrggGi9dsPbbAdWpPjuqJYNXZJULuTDpm+UdcWq9OzUTDQESCJaY9amR2x2wVSc6MCvAW35GZAH7Ig= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159378; c=relaxed/simple; bh=u3S0YqaPiukq1MO5JyFqnxDlliPYd2O+Vs6ceRh+qgg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LaRaUli8J4oobLLY/ZimaxRTVKCXzVjbo9IeG0AET82kpnuibY5/BWIWaFsGJCQsz268Panp/yJ7/Ih0/iq2VOy1QV7L44NruYuVVn61IXb4e8sAdaL/vFeke8Ad601KT0+/lLIcUiBtp4OjKNv3qZjf3a3FzGTpEAOdC54fETk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=RcEMTawm; arc=none smtp.client-ip=113.46.200.225 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="RcEMTawm" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=k6HdZuklKtItzJNpeBo5TkJT3OTYEJ2G6Mws+jU0bsU=; b=RcEMTawmurRjTFGW5IK4lRaEwSZvdGReCM7vRJMhlcokYTTt6uN28BIi6QmpeoUP0BRnD8VNY AhRALEzOgwhqipf4YlPkS2p8MU2n6m+7k4qgul2cvr7LFQ80vhcCqSrbB+cxQjCU4Yfbz2POGXP TmYVEz+1uZOdRQ31BfDuC60= Received: from mail.maildlp.com (unknown [172.19.163.44]) by canpmsgout10.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6M49krz1K9Vy; Mon, 3 Nov 2025 16:41:15 +0800 (CST) Received: from dggemv705-chm.china.huawei.com (unknown [10.3.19.32]) by mail.maildlp.com (Postfix) with ESMTPS id E7E35140277; Mon, 3 Nov 2025 16:42:47 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv705-chm.china.huawei.com (10.3.19.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 5/7] ACPI: processor: idle: Remove useless codes about the verification of cstate count Date: Mon, 3 Nov 2025 16:42:42 +0800 Message-ID: <20251103084244.2654432-6-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" The acpi_processor_setup_cstates and acpi_processor_setup_cpuidle_cx will be called after successfully obtaining the power information. These setup functions have their own main role, but also verify the validity of cstate count. Actually, the acpi_processor_get_power_info_cst will return failure if the cstate count is zero and acpi_processor_get_power_info will return failure. So the verification of cstate count in these functions are useless. No intentional functional impact. Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 4627b00257e6..1f332f02d273 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -732,8 +732,8 @@ static int __cpuidle acpi_idle_enter_s2idle(struct cpui= dle_device *dev, return 0; } =20 -static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr, - struct cpuidle_device *dev) +static void acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr, + struct cpuidle_device *dev) { int i, count =3D ACPI_IDLE_STATE_START; struct acpi_processor_cx *cx; @@ -753,14 +753,9 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi= _processor *pr, if (count =3D=3D CPUIDLE_STATE_MAX) break; } - - if (!count) - return -EINVAL; - - return 0; } =20 -static int acpi_processor_setup_cstates(struct acpi_processor *pr) +static void acpi_processor_setup_cstates(struct acpi_processor *pr) { int i, count; struct acpi_processor_cx *cx; @@ -822,11 +817,6 @@ static int acpi_processor_setup_cstates(struct acpi_pr= ocessor *pr) } =20 drv->state_count =3D count; - - if (!count) - return -EINVAL; - - return 0; } =20 static inline void acpi_processor_cstate_first_run_checks(void) @@ -1248,7 +1238,8 @@ static int acpi_processor_setup_cpuidle_states(struct= acpi_processor *pr) if (pr->flags.has_lpi) return acpi_processor_setup_lpi_states(pr); =20 - return acpi_processor_setup_cstates(pr); + acpi_processor_setup_cstates(pr); + return 0; } =20 /** @@ -1268,7 +1259,8 @@ static int acpi_processor_setup_cpuidle_dev(struct ac= pi_processor *pr, if (pr->flags.has_lpi) return 0; =20 - return acpi_processor_setup_cpuidle_cx(pr, dev); + acpi_processor_setup_cpuidle_cx(pr, dev); + return 0; } =20 static int acpi_processor_get_power_info(struct acpi_processor *pr) --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com [113.46.200.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 563A22E06E6; Mon, 3 Nov 2025 08:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.222 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159373; cv=none; b=l77JPTygvMMQVwU5fWY244Y5SWg2AIr16e+fR58MHkCLEu4JPzASNECBdvgDmsYPHrpRJWxJb0U+c1+8CsIaJfvbL1nVSwl39sPRql53vGXgwyn56kvOC4i2nCcDJubA9AugeF7C2E3JTtWJ3Xa8GfPrCV9D8YUUesM5a/ckseg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159373; c=relaxed/simple; bh=NnDVBsPc1xQWH6peSJjCz1anLjKXzvW8HHda7nVPfbM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fQUPbG4LwiZlfVEgUC3C0nKvP8yC1z/iCcg18r4ALcV0poJ6mb32oHzJDObMOM/KNMoxISbh/TdmexYpJnmaMXKZSpXR9R3MONnnd34fvbuhJjsxiHoN6o+QTPlmbdfO+XRzYnZfgywPprJXQ94jZoUdrbEyDXb5yK2NTBmP81o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=hZS/5hKm; arc=none smtp.client-ip=113.46.200.222 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="hZS/5hKm" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Di08QW/pxyKcxoJEzwov9ToRIKQZrhMMFw3faya4aJY=; b=hZS/5hKmeAVVIfHKYq7mwOTrwOPqrnnK+NNfxhHjhelLa2ve97S+u8ZXwpExYgXqKa6lkaMxM rT5lT178Un6enUSpdM5xAyO6W91GQRbeOlSwtYBHxLr2incKQ43EbC5OZPwrc4SeE+eRrvqiMoJ hj+DFIhrdtIi+tjwquO3DLQ= Received: from mail.maildlp.com (unknown [172.19.163.17]) by canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6L3WV7zLlVC; Mon, 3 Nov 2025 16:41:14 +0800 (CST) Received: from dggemv705-chm.china.huawei.com (unknown [10.3.19.32]) by mail.maildlp.com (Postfix) with ESMTPS id 233A31A0188; Mon, 3 Nov 2025 16:42:48 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv705-chm.china.huawei.com (10.3.19.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 6/7] ACPI: processor: idle: Redefine setup idle functions to void Date: Mon, 3 Nov 2025 16:42:43 +0800 Message-ID: <20251103084244.2654432-7-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" Notice that the acpi_processor_setup_cpuidle_states() don't need to return any value because their callers don't check them anyway. In addition, acpi_processor_setup_lpi_states() wouldn't execute with failure. So redefine setup idle functions to void. No intentional functional impact. Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 1f332f02d273..46614cf1ae8b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1185,7 +1185,7 @@ static int acpi_idle_lpi_enter(struct cpuidle_device = *dev, return -EINVAL; } =20 -static int acpi_processor_setup_lpi_states(struct acpi_processor *pr) +static void acpi_processor_setup_lpi_states(struct acpi_processor *pr) { int i; struct acpi_lpi_state *lpi; @@ -1193,7 +1193,7 @@ static int acpi_processor_setup_lpi_states(struct acp= i_processor *pr) struct cpuidle_driver *drv =3D &acpi_idle_driver; =20 if (!pr->flags.has_lpi) - return -EOPNOTSUPP; + return; =20 for (i =3D 0; i < pr->power.count && i < CPUIDLE_STATE_MAX; i++) { lpi =3D &pr->power.lpi_states[i]; @@ -1211,8 +1211,6 @@ static int acpi_processor_setup_lpi_states(struct acp= i_processor *pr) } =20 drv->state_count =3D i; - - return 0; } =20 /** @@ -1221,13 +1219,13 @@ static int acpi_processor_setup_lpi_states(struct a= cpi_processor *pr) * * @pr: the ACPI processor */ -static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) +static void acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) { int i; struct cpuidle_driver *drv =3D &acpi_idle_driver; =20 if (!pr->flags.power_setup_done || !pr->flags.power) - return -EINVAL; + return; =20 drv->safe_state_index =3D -1; for (i =3D ACPI_IDLE_STATE_START; i < CPUIDLE_STATE_MAX; i++) { @@ -1235,11 +1233,12 @@ static int acpi_processor_setup_cpuidle_states(stru= ct acpi_processor *pr) drv->states[i].desc[0] =3D '\0'; } =20 - if (pr->flags.has_lpi) - return acpi_processor_setup_lpi_states(pr); + if (pr->flags.has_lpi) { + acpi_processor_setup_lpi_states(pr); + return; + } =20 acpi_processor_setup_cstates(pr); - return 0; } =20 /** --=20 2.33.0 From nobody Thu Dec 18 05:20:35 2025 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 316FF2E62B9; Mon, 3 Nov 2025 08:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159379; cv=none; b=CkWXlT3zP0heZQsBXaJo1otu5l7aYZ9eFUcU8moWb/ZQlCDDVk2oIblBpMWixgIuIwBpz+RvNq/BeVP2RbfMdcMe1tNPZOeae+4JjbK20MeHjojU3VWY82Kyo+sgwbkiMTfuoq3AsywWjmENgH3ofFTpAHGUZ0tAJA36Yfmdqkc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762159379; c=relaxed/simple; bh=FpI1U6+LSrImKj5yJbC3JbtvCb9JrCxDUrMJy8x2q70=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kfB2F2pJjiu7briKjQKAyiiih/7QxqCVGuUlGAsudOVLFVXsPN2vA6eAvs8YZnan19RbiKPUWHQX0k+u6JfrJtKaf7vgSNcljTIYD/0xaWo7tG8726tfzhXuY7FdTuvaCu2Svy2eF0IGTkGDFQ+IWPlupcGgSNWfK+21pRmb0Rk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b=eQk8loMt; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=h-partners.com header.i=@h-partners.com header.b="eQk8loMt" dkim-signature: v=1; a=rsa-sha256; d=h-partners.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=lYn04A0PNhNxpV/CFYWHsfLmTyXgv8vwZHaF7oFVV/Y=; b=eQk8loMtGE3Frl7BTUJivn9kSDLvaJ4OMz48g8g54CTcIKHTA/ATZ+MCEoRWqgxYS+lRbwjBU xkndrqX+FuPRN8aGleo7BOg2Yj/8C8dHXrUw4Q9fqx+8zmfN/ZLe65cJ67VNAnFUwNsH6CoxTpO BMCJtQwrB3Y04sd4txviFHI= Received: from mail.maildlp.com (unknown [172.19.88.194]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4d0Q6H75M1z12LGF; Mon, 3 Nov 2025 16:41:11 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id A961D147B64; Mon, 3 Nov 2025 16:42:48 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:48 +0800 Received: from localhost.localdomain (10.50.163.32) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 3 Nov 2025 16:42:47 +0800 From: Huisong Li To: , CC: , , , , , , , , Subject: [PATCH v2 7/7] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_dev to void Date: Mon, 3 Nov 2025 16:42:44 +0800 Message-ID: <20251103084244.2654432-8-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20251103084244.2654432-1-lihuisong@huawei.com> References: <20251103084244.2654432-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" Notice that the acpi_processor_setup_cpuidle_dev() don't need to return any value because their callers don't check them anyway. So redefine the function to void. No intentional functional impact. Signed-off-by: Huisong Li --- drivers/acpi/processor_idle.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 46614cf1ae8b..2ae51c42f544 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1248,18 +1248,17 @@ static void acpi_processor_setup_cpuidle_states(str= uct acpi_processor *pr) * @pr: the ACPI processor * @dev : the cpuidle device */ -static int acpi_processor_setup_cpuidle_dev(struct acpi_processor *pr, - struct cpuidle_device *dev) +static void acpi_processor_setup_cpuidle_dev(struct acpi_processor *pr, + struct cpuidle_device *dev) { if (!pr->flags.power_setup_done || !pr->flags.power || !dev) - return -EINVAL; + return; =20 dev->cpu =3D pr->id; if (pr->flags.has_lpi) - return 0; + return; =20 acpi_processor_setup_cpuidle_cx(pr, dev); - return 0; } =20 static int acpi_processor_get_power_info(struct acpi_processor *pr) --=20 2.33.0