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 CEB0C282F16 for ; Fri, 31 Jul 2026 02:54:36 +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=1785466480; cv=none; b=hBoJAHjE9izXg64bIv1HyLQNihzBzHDcMEE54OEHNc1+odS35goD/wpXSA5NLjFTV4mHvNiR5LSLJacs+wLUgano1zPGlPlOnEbTt+CuA8hlkZKMm0fRqrb50/TZ6ZaPK0fIBnSm9TJ7yAT9LI2lLhxHJhOYTlJQb4rCCVnSmoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785466480; c=relaxed/simple; bh=fAPBCp9FR778ZTuSpihUmMNNr9+4b13ll3YQNWIHQmU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=b6kIRsX3BTf51j5ZwsvnvmJptVpA2uJsviFHDV7p31STgheRqy1jErib7G0FwYaFWFL5by5BYdaexnvtko6a+4CWJQS2PBugDDJo2nw/S90ip1Urd2PFEdbWSmr4IffFZ63EnOS76yo9dGxNn1bg4xz2UnSwV+UDOcqPI8mYSxA= 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=mJ7JrHNL; 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="mJ7JrHNL" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=fAPBCp9FR778ZTuSpihUmMNNr9+4b13ll3YQNWIHQmU=; b=mJ7JrHNLj1X0pIlbHgb1iKInwiz6CXFUCdv/Rs46fwijRaWEx769YicaFiEfg6PLFITGJLcV3 ZR3SvTNZE0haDj93xmUbZcgNs3+wUmqzl4aUGhUvnxyUwbotes3mPXk3eBQZtJCixS7NKArwT/N n5+xlnBz+2D/NUfVXJ5XU0Y= Received: from mail.maildlp.com (unknown [172.19.162.197]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4hB9QT3WHSzcb0T; Fri, 31 Jul 2026 10:44:49 +0800 (CST) Received: from whupemo500002.china.huawei.com (unknown [7.152.185.250]) by mail.maildlp.com (Postfix) with ESMTPS id 367124057D; Fri, 31 Jul 2026 10:54:34 +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:54:32 +0800 Message-ID: <76a26d68-436c-4fe1-a29c-287e35bb504f@huawei.com> Date: Fri, 31 Jul 2026 10:54:32 +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: Robin Murphy CC: , , , , , , , , , References: <20260724025238.3411328-1-wangyushan12@huawei.com> <20260724025238.3411328-2-wangyushan12@huawei.com> <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com> Content-Language: en-US From: Yushan Wang In-Reply-To: <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To whupemo500002.china.huawei.com (7.152.185.250) On 7/27/2026 8:41 PM, 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   > Thanks for review, hisi pmu drivers can be the first users for it ;)