From nobody Mon Feb 9 01:42:51 2026 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 47E33421F0A; Tue, 20 Jan 2026 11:33:24 +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=1768908808; cv=none; b=R9jar1O7pkLiEECfRlpY8hANrREcqBhqDFZBIbpZ/pgOhzeohjYXu/wU1+T+edbiCwb7VMGBWiidQyCcLuHu4LGelfjAdi5NvKwzAephG/Ymts6QhbGtuXZOyuD7/rKTq8pal0j5dojM2Gwk+XgtuTZiREesCewMr1v/29gWs1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908808; c=relaxed/simple; bh=y0W0n0Lw3gczIXlTj8dAoL/B1n8sTL641ifUA7CJEEs=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Oh8u0uzzGSkBiNKb23hdqtEWqiNYCFQ8nNhfoA+kxnh0FwA3wF8au1TF2F2gFZu0jaLN/YxTLGHibRnqSkSkgv8nIiu1GaHbyltYwAJA5EdVBu/uWUlXRwTUOXSp2AS/WHSVbmRTb2BYJSNSBSLUj/CZbV9ea6vtwm0soQLHir8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=E5P9yd56; arc=none smtp.client-ip=113.46.200.225 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="E5P9yd56" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=DyOLv7w7OXgCFtESbOrDmyGVRZ50go1fYG4fT1pS1Ys=; b=E5P9yd56brvp5ibX3ywidpWKWOJRASJWxp/wqbQ63sjHvYsNAlLJ+kDOAGb2MFRtnpBMg6Uu5 m62NMrSMWosXybiZ6QfWJWD1zDCEYdmasmGpPhwB8PX35caTtChVbjpKekphcmVmqxq9sFoD6I3 s5Uyw3YA6IsvZhslYQzzS3A= Received: from mail.maildlp.com (unknown [172.19.163.214]) by canpmsgout10.his.huawei.com (SkyGuard) with ESMTPS id 4dwQ8z2X3vz1K96j; Tue, 20 Jan 2026 19:29:55 +0800 (CST) Received: from kwepemf200001.china.huawei.com (unknown [7.202.181.227]) by mail.maildlp.com (Postfix) with ESMTPS id 838F240539; Tue, 20 Jan 2026 19:33:16 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by kwepemf200001.china.huawei.com (7.202.181.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 20 Jan 2026 19:33:15 +0800 From: Lifeng Zheng To: , , , CC: , , , , , , , , , , , , Subject: [PATCH] ACPI: processor: Add acpi_processor_start() back to parse _CPC tables before CPU online Date: Tue, 20 Jan 2026 19:32:42 +0800 Message-ID: <20260120113242.3843463-1-zhenglifeng1@huawei.com> X-Mailer: git-send-email 2.33.0 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: kwepems500002.china.huawei.com (7.221.188.17) To kwepemf200001.china.huawei.com (7.202.181.227) Content-Type: text/plain; charset="utf-8" Currently, if boot with maxcpus less than NR_CPUS, the cppc_cpufreq driver will fail to register. Because it requires the domain information of all possible CPUs to construct shared_cpu_map, which shows the CPUs that share the same domain. Commit c1385c1f0ba3 ("ACPI: processor: Simplify initial onlining to use same path for cold and hotplug") removes probe() of acpi_processor_driver and makes acpi_cppc_processor_probe() only being called the first time CPU goes online. This means that CPUs that haven't yet gone online will not have pre-parsed _CPC objects and causes cppc_cpufreq driver register fail. Add acpi_processor_start() back as the probe() callback of acpi_processor_driver and call acpi_cppc_processor_probe() in it to make sure all _CPC tables will be parsed when acpi_processor_driver registered. Fixes: c1385c1f0ba3 ("ACPI: processor: Simplify initial onlining to use sam= e path for cold and hotplug") Signed-off-by: Lifeng Zheng --- drivers/acpi/processor_driver.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_drive= r.c index 65e779be64ff..c8b4daf580b0 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -33,6 +33,7 @@ MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_DESCRIPTION("ACPI Processor Driver"); MODULE_LICENSE("GPL"); =20 +static int acpi_processor_start(struct device *dev); static int acpi_processor_stop(struct device *dev); =20 static const struct acpi_device_id processor_device_ids[] =3D { @@ -46,6 +47,7 @@ static struct device_driver acpi_processor_driver =3D { .name =3D "processor", .bus =3D &cpu_subsys, .acpi_match_table =3D processor_device_ids, + .probe =3D acpi_processor_start, .remove =3D acpi_processor_stop, }; =20 @@ -162,10 +164,6 @@ static int __acpi_processor_start(struct acpi_device *= device) if (!pr) return -ENODEV; =20 - result =3D acpi_cppc_processor_probe(pr); - if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS)) - dev_dbg(&device->dev, "CPPC data invalid or not present\n"); - if (!cpuidle_get_driver() || cpuidle_get_driver() =3D=3D &acpi_idle_drive= r) acpi_processor_power_init(pr); =20 @@ -192,6 +190,30 @@ static int __acpi_processor_start(struct acpi_device *= device) return result; } =20 +static int acpi_processor_start(struct device *dev) +{ + struct acpi_device *device =3D ACPI_COMPANION(dev); + struct acpi_processor *pr; + int result; + + if (!device) + return -ENODEV; + + pr =3D acpi_driver_data(device); + if (!pr) + return -ENODEV; + + /* Protect against concurrent CPU hotplug operations */ + cpu_hotplug_disable(); + result =3D acpi_cppc_processor_probe(pr); + cpu_hotplug_enable(); + + if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS)) + dev_dbg(&device->dev, "CPPC data invalid or not present\n"); + + return 0; +} + static int acpi_processor_stop(struct device *dev) { struct acpi_device *device =3D ACPI_COMPANION(dev); --=20 2.33.0