[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250731131559.00005001@huawei.com>
Date: Thu, 31 Jul 2025 13:15:59 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Yushan Wang <wangyushan12@...wei.com>
CC: <will@...nel.org>, <mark.rutland@....com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<prime.zeng@...ilicon.com>, <fanghao11@...wei.com>, <linuxarm@...wei.com>,
<yangyicong@...ilicon.com>
Subject: Re: [PATCH 2/8] drivers/perf: hisi: Export hisi_uncore_pmu_isr()
On Tue, 29 Jul 2025 23:38:17 +0800
Yushan Wang <wangyushan12@...wei.com> wrote:
> From: Yicong Yang <yangyicong@...ilicon.com>
>
> Currently Uncore PMU framework assume one PMU device only have one
> interrupt and will help register the interrupt handler. It cannot
> support a PMU with multiple interrupt resources. An uncore PMU may
> have multiple interrupts that can share the same handler. Export
> hisi_uncore_pmu_isr() to allow drivers register the irq handler by
> their own routine.
>
> Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
> Signed-off-by: Yushan Wang <wangyushan12@...wei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
> ---
> drivers/perf/hisilicon/hisi_uncore_pmu.c | 3 ++-
> drivers/perf/hisilicon/hisi_uncore_pmu.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c
> index 3050899ddf17..ff20ad54f51b 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c
> +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c
> @@ -149,7 +149,7 @@ static void hisi_uncore_pmu_clear_event_idx(struct hisi_pmu *hisi_pmu, int idx)
> clear_bit(idx, hisi_pmu->pmu_events.used_mask);
> }
>
> -static irqreturn_t hisi_uncore_pmu_isr(int irq, void *data)
> +irqreturn_t hisi_uncore_pmu_isr(int irq, void *data)
> {
> struct hisi_pmu *hisi_pmu = data;
> struct perf_event *event;
> @@ -178,6 +178,7 @@ static irqreturn_t hisi_uncore_pmu_isr(int irq, void *data)
>
> return IRQ_HANDLED;
> }
> +EXPORT_SYMBOL_NS_GPL(hisi_uncore_pmu_isr, "HISI_PMU");
>
> int hisi_uncore_pmu_init_irq(struct hisi_pmu *hisi_pmu,
> struct platform_device *pdev)
> diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.h b/drivers/perf/hisilicon/hisi_uncore_pmu.h
> index 50a97e79076a..40aac70352e9 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_pmu.h
> +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.h
> @@ -163,6 +163,7 @@ int hisi_uncore_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node);
> ssize_t hisi_uncore_pmu_identifier_attr_show(struct device *dev,
> struct device_attribute *attr,
> char *page);
> +irqreturn_t hisi_uncore_pmu_isr(int irq, void *data);
> int hisi_uncore_pmu_init_irq(struct hisi_pmu *hisi_pmu,
> struct platform_device *pdev);
> void hisi_uncore_pmu_init_topology(struct hisi_pmu *hisi_pmu, struct device *dev);
Powered by blists - more mailing lists