From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 84634451983 for ; Wed, 29 Jul 2026 18:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785350313; cv=none; b=KQioNV2eN8Opmj+AkckywuV7RjPxDUY0leCtb7cxZUFa1D0nxfVLMcMrphjM+rnPQkXOmDHWDMxnL3YFKSvuZhOqFJ32cI1DESTn6CoV4TWfPVpK/hFRH2pb4MUh1med1lSqYbnOaTBkLYW4D8fawABUeCcdQW7cPRGKq+erDbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785350313; c=relaxed/simple; bh=oae6mjXQS9eZoxkQZeevas+w9kZRbva8OM+GviORwT8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i2ZdLhVyWvzkp/1GNlohQwnmYDnWPBk5hI7VZBpwQNIgnJrozPmjfFgMMdramdaqyuM32NcJ2bCTQ/U0cgjyguU1whh+zv1yaMrERHKonXWyXqwX4KYKTCH1laTCBhxd5g/gFyWDJ9bPZWCBzF4/0qNV4hsn3X90jeY4YKbhd+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=IUdFm++d; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LVRX7OmR; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="IUdFm++d"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LVRX7OmR" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66TIRUlV2651100 for ; Wed, 29 Jul 2026 18:38:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= IB5IgmdZ2AgFFTI+wd22TsO3SWHmh33/Yh0U0TdgPnw=; b=IUdFm++d4NUmQswu 39S7YtjshS+upAZ8BGHmVcIt9JmaSvqcltUOuPSJ/8VnTeMad1ELdRxv30H6IWq2 agbehCo+HidY7wqwbMVSkooTVdFSO2zVrO7akVmHyY02Q1lM5wQirR0Tugs5HHp1 O7hTQ7zHtB6QKOQefZonxsL8w5V4XAwCCHDIfcW56j2eG1oCGDgiNpIj5IxBi33D W0wKANkZm0CGPJrxe5Nk+88mL7RRNOqq4fhGWQQbJ/IttypCZf56twIqzYy6TcjB vfZsFS1vy74z/t6//WOY77yytC3T/Ok0yXsIA+Cbr0SrPyKTu5vBREDBf+V68kIz Pc32QQ== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fqpsg81xn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Jul 2026 18:38:31 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-cb74d5db64eso1279437a12.2 for ; Wed, 29 Jul 2026 11:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785350310; x=1785955110; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=IB5IgmdZ2AgFFTI+wd22TsO3SWHmh33/Yh0U0TdgPnw=; b=LVRX7OmRlFShkzEGnZXwKI4uRymBy4Vfgtlvy7Zu2RGeeLY7gzOJwCER+qaufdcco1 1jBw634PtA65f0OxuUEXUEAq/P928Rihl4expVDf9IBIoN06IwRbUit/+GmrG05l02D4 0dXT7O2oyIBnOLz3xZYqTHGauVMySMSDhRvTIq8wjJnTrs9Uumt/mEbEOY6davFA6IKD 3y4yzTLqBsKVaG2PJPUY5oAkFug+nNVyP+OIDny3YDAHzsC5wOVqQ3fencG6LIpgEiSn 9hGJ829et8Xtc4e0UVkj1aI0vuxQNjjdUAe/pbP1jzfzx6h7d+llQL/et2thrwA7NdE7 q/fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785350310; x=1785955110; h=content-transfer-encoding:content-type:mime-version:organization :references:in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IB5IgmdZ2AgFFTI+wd22TsO3SWHmh33/Yh0U0TdgPnw=; b=BqKcjDE6FhYkQhU8b6y8cokVa0ODm88HHtzuRVr8jnC5pLsAlA+2NEkO6KiamMJJ3d OxBXOpjz6JPgblXuD9B3tyVElJIumQIUQxABajieFRM47OqjScfnxd+GZZQncPPW6bd2 o9F0xdD/1zRKHXqtPS2MC5U4/vHiaiD8t5CjM9dbeKMQEZNYCPzx33NtMIQfzZedpc7Z LZsz3Ab18A7tyYcbp5oLv+AB4SuCTxw9JRoc+6KbaUVTXD4O0h8PliPsW585jup2BsFN FgFN+V0ufvp9Mbv/x9WAMN5BXIwNUPkzuRbudUv0XCz69LwbaE/poXXx1lTPkBHOavCa rBXw== X-Forwarded-Encrypted: i=1; AHgh+RrdxtNGGjoHHMfX19bVHYoIApgqpPudT/dYTqZi6GanHRFjLMcNrUIGVcGBKFlUzG04XAZwrxIOKiUaS8E=@vger.kernel.org X-Gm-Message-State: AOJu0YxMnmA/4jH2bblDy6B1XlGZLORta4he57e3lHL+3V9Qq3nwW2Jj BIQTubjyOq6m7GjBuzFLPcKbUio/6ZNvfC44x8VwftRtmO7qRxM9YUOl1tkCMCSjG+tKNStd6Yz hqHAsOj0hL5S7nDmPu0Iwu6eoaRd884SZKs+hscJFty37gHhPpiB1381ao4CD+uQBbbc= X-Gm-Gg: AR+sD100zKEy+oDkWfetDNmUxgLdJJJ8/qdSh36a9FB/fk62cthxMmBoGOKbLxAxyit 1KS9t1vKoDUnbuvae1Ea7BdGfbMOmAmWki8VEW+ci0sRxYyHUjmgdUSAjpb+LKIcRmB78YeJl8x zQGPMgSBFX5bbB8phwDZ+r1kqSLUOQtL7fw3lgUNys8bIvTuxN0mHA74ImARQwmgy+uigpPQGQX t/IixrVuhchxks52jL9cuTIDL0BlJPNMEhZ0KS+NvI1748qCCidlFVLrvLquQqU+SwQ7gNY1dYj 4cCdNlN0AftK0ldUwZWL6SMyocjzgZMY7m7Gq0i7b5ArTLwbBnEwtSXFgO0u/oix1AuInD0Zmbq SQBGGg46LNxvi53KvzlTnhCZncA== X-Received: by 2002:a05:6a21:1f83:b0:3c4:3454:38a1 with SMTP id adf61e73a8af0-3c8ba5f7878mr8739585637.58.1785350310535; Wed, 29 Jul 2026 11:38:30 -0700 (PDT) X-Received: by 2002:a05:6a21:1f83:b0:3c4:3454:38a1 with SMTP id adf61e73a8af0-3c8ba5f7878mr8739565637.58.1785350310099; Wed, 29 Jul 2026 11:38:30 -0700 (PDT) Received: from localhost ([50.35.46.84]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31504d3250asm11010600eec.20.2026.07.29.11.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2026 11:38:29 -0700 (PDT) Date: Wed, 29 Jul 2026 11:38:12 -0700 From: Jonathan Cameron To: Robin Murphy Cc: Yushan Wang , will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u.kleine-koenig@baylibre.com, linuxarm@huawei.com, liuyonglong@huawei.com, prime.zeng@hisilicon.com, wangzhou1@hisilicon.com, wuyifan50@huawei.com Subject: Re: [PATCH 1/3] drivers/perf: hisi: Consolidate uncore PMU cpuhp states Message-ID: <20260729113812.000006fc@oss.qualcomm.com> In-Reply-To: <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com> References: <20260724025238.3411328-1-wangyushan12@huawei.com> <20260724025238.3411328-2-wangyushan12@huawei.com> <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com> Organization: Qualcomm X-Mailer: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI5MDE0MiBTYWx0ZWRfX7x5ikAT+agqN BQMsuIWpVr1Xs4DWduBQRMEl+cVkjCnQJXQFbxVVQdQ6B5GBK3wCuxsjBAg0iXIpsmptnMmwUcs 2OmC/BeWYp/BrDjIVqfPaCDtAx44IeQ= X-Proofpoint-ORIG-GUID: i4F2aRMVRMN9HDzl6zbttCwgyzL5LPlh X-Proofpoint-GUID: i4F2aRMVRMN9HDzl6zbttCwgyzL5LPlh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI5MDE0MiBTYWx0ZWRfXyfcAUlGYcU2s JDbQZS/1p899qWzb6gViNWGmGZ4pdYTq9p9AzPl81Xd0Y/s/SSJgc/cqFw2Zm028TtpwsPJp381 ReJDRHKsWwNrVzVwwK2O8ZVwlkiRm02NkQtbcUwXq8I1JixdGMPAvtG4G3An7aL0YtdWLcYXuOD bTrOja/v47V0bsmEulcAy/PKSzx2P8jCYnIHGMvNtAGsfiWesGKeuBSslDShzuipGX+ob0SY+HN J+r9vaim57R6kE0+1oHA/ImLsyCIa5sYXWsIlDr0zPcwF80qO52Z3327Jq1cg2tnoQLxifITmgk RRykSMBBRxYXgj4pHR0PEk8MRq/ScKzqDHDd9/FO9Lo04JlpazNFEdZtnOislhC40JkEjeFigxa KqJSSEpWQbh5EU1IV8kRoKwg3HrcuTanYCZ8AgaxpzHm6Z6CpOS8EMZ2e7W3eByFI41/LNigYiv W0VBtQgrMxsY3lWA2qA== X-Authority-Analysis: v=2.4 cv=dI6WXuZb c=1 sm=1 tr=0 ts=6a6a48a7 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=qC1CW/w66vtJz1P9yTJxNA==:17 a=kj9zAlcOel0A:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=7CQSdrXTAAAA:8 a=i0EeH86SAAAA:8 a=EUspDBNiAAAA:8 a=YgQoG-XJdNmCr4bRT3EA:9 a=CjuIK1q_8ugA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-29_07,2026-07-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 phishscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607290142 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