The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Yushan Wang <wangyushan12@huawei.com>,
	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
Date: Wed, 29 Jul 2026 11:38:12 -0700	[thread overview]
Message-ID: <20260729113812.000006fc@oss.qualcomm.com> (raw)
In-Reply-To: <18bd7977-c0d2-47c0-aaa4-a787ef935597@arm.com>

On Mon, 27 Jul 2026 13:41:59 +0100
Robin Murphy <robin.murphy@arm.com> 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 <wangyushan12@huawei.com>
> > ---
> >   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 <robin.murphy@arm.com>
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 <jonathan.cameron@oss.qualcomm.com>

  reply	other threads:[~2026-07-29 18:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  2:52 [PATCH v4 0/3] drivers/perf: hisi: Updates for HiSilicon uncore PMUs Yushan Wang
2026-07-24  2:52 ` [PATCH 1/3] drivers/perf: hisi: Consolidate uncore PMU cpuhp states Yushan Wang
2026-07-27 12:41   ` Robin Murphy
2026-07-29 18:38     ` Jonathan Cameron [this message]
2026-07-24  2:52 ` [PATCH 2/3] drivers/perf: hisi: Add support for uncore ITS PMU Yushan Wang
2026-07-24  2:52 ` [PATCH 3/3] drivers/perf: hisi: Add cycle event for HIP13 MN PMU Yushan Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260729113812.000006fc@oss.qualcomm.com \
    --to=jonathan.cameron@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=robin.murphy@arm.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=wangyushan12@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=will@kernel.org \
    --cc=wuyifan50@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox