From mboxrd@z Thu Jan 1 00:00:00 1970 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 78889307492 for ; Fri, 31 Jul 2026 02:49:31 +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=1785466175; cv=none; b=B2w1tiU4THidRXVgxm7iLegNUYnxL9Mu7lxD0Kx3IYJsGILwl9JKH7CVyF026syYo+UAXffnmRTXrw0hfigGmN+JDVTJ2Sx4fH/3ZKxAVc4O+y9VEDkvYO3Jc/No3W+Uc+Iipr0z+DRKOOQSAto5BojV1h42jBuxGMtkASLh9t4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785466175; c=relaxed/simple; bh=c68kMRsFXTT9nzV1iqfqhhunu6Fadxxy7YnsM2SJ0z4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=cnvuTenZQqZZLOUTHhLdyZqBe5QPp6rqi9ShSVxQeWXzYBCULJL3EdJ1lQ9mO5h1Sf1Dp7aILYKGEEI1dprd8p6DVyLieUpN1m5Zmt25zBd2mkbBOW0U++mJiFZO8ylbeeA5+suWn1gjBtp6scqcZJ0sWxCOn9YWUBe5+JnrTNY= 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=fDrt77GC; arc=none smtp.client-ip=113.46.200.217 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="fDrt77GC" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=02QOUXjVaBhWbVLdk+an2VFumTXpeJzGSjH06nZw8TM=; b=fDrt77GCafAAPHPtBpNLZ8hheabHMnR58o217g913JtTTjuy48O9nCEx75OdMUPGGViz0gMYP 7Hv+RnAgfvjOdhcOB0rO56hcP2/DQbQtoW1gL8zL3vP+S9p/iKZyUimo1fRcUPrYm/uXvp39UVR QbPIOWBRx7SaQBa42JtIOrk= Received: from mail.maildlp.com (unknown [172.19.162.144]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4hB9Jb5JGnzcb0f; Fri, 31 Jul 2026 10:39:43 +0800 (CST) Received: from whupemo500002.china.huawei.com (unknown [7.152.185.250]) by mail.maildlp.com (Postfix) with ESMTPS id 728634056E; Fri, 31 Jul 2026 10:49:28 +0800 (CST) Received: from [10.67.120.139] (10.67.120.139) by whupemo500002.china.huawei.com (7.152.185.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 31 Jul 2026 10:49:26 +0800 Message-ID: Date: Fri, 31 Jul 2026 10:49:23 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] drivers/perf: hisi: Consolidate uncore PMU cpuhp states To: Jonathan Cameron CC: , Robin Murphy , , , , , , , , , References: <20260724025238.3411328-1-wangyushan12@huawei.com> <20260724025238.3411328-2-wangyushan12@huawei.com> <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com> <20260729113812.000006fc@oss.qualcomm.com> Content-Language: en-US From: Yushan Wang In-Reply-To: <20260729113812.000006fc@oss.qualcomm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To whupemo500002.china.huawei.com (7.152.185.250) On 7/30/2026 2:38 AM, Jonathan Cameron wrote: > On Mon, 27 Jul 2026 13:41:59 +0100 > Robin Murphy wrote: > >> On 24/07/2026 3:52 am, Yushan Wang wrote: >>> Every HiSilicon uncore PMU driver allocates its own static cpuhp state >>> even though they all register identical online/offline callbacks. This >>> wastes slots in the cpuhp state enum and needlessly fragments the >>> hotplug state space. >>> >>> Move the cpuhp state setup into the shared hisi_uncore_pmu framework: >>> register a single dynamic state (CPUHP_AP_ONLINE_DYN) at framework >>> module init and export it for all HiSilicon uncore PMU drivers to use. >>> Drop the now-unused static CPUHP_AP_PERF_ARM_HISI_* entries from >>> include/linux/cpuhotplug.h. >>> >>> The L3C PMU driver keeps a private dynamic state because it has its own >>> hotplug callbacks for migrating multiple per-CPU interrupt affinities, >>> but switches from its former static slot to CPUHP_AP_ONLINE_DYN for >>> consistency. >>> >>> No intended functional changes. >>> >>> Signed-off-by: Yushan Wang >>> --- >>> drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 34 +++--------------- >>> drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 34 +++--------------- >>> drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 34 +++--------------- >>> drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 21 +++++------ >>> drivers/perf/hisilicon/hisi_uncore_mn_pmu.c | 35 ++---------------- >>> drivers/perf/hisilicon/hisi_uncore_noc_pmu.c | 35 ++---------------- >>> drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 34 +++--------------- >>> drivers/perf/hisilicon/hisi_uncore_pmu.c | 25 +++++++++++++ >>> drivers/perf/hisilicon/hisi_uncore_pmu.h | 2 ++ >>> drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 34 +++--------------- >>> drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 36 ++----------------- >>> include/linux/cpuhotplug.h | 6 ---- >>> 12 files changed, 67 insertions(+), 263 deletions(-) >> Neat! Seems like a pretty nice win already, plus it only makes a >> conversion easier if my generic hotplug idea takes off :) >> >> Reviewed-by: Robin Murphy > Hi Yushan, > > Nice indeed. It always irritated me to see that block of code cut > and paste so often + that it stopped use of module_platform_driver() > > Reviewed-by: Jonathan Cameron Hi Jonathan, Thanks for reviewing, happy to help to make this a bit clearer!