[PATCH v2 5/8] drivers/perf: hisi: Provide a generic implementation of cpumask/identifier
Jonathan Cameron
Jonathan.Cameron at Huawei.com
Tue Oct 22 09:32:43 PDT 2024
On Tue, 22 Oct 2024 22:53:02 +0800
Yicong Yang <yangyicong at huawei.com> wrote:
> From: Yicong Yang <yangyicong at hisilicon.com>
>
> Each type of HiSilicon Uncore PMU has the following sysfs attributes:
>
> - format: bitmask in perf_event_attr::config[012] of corresponding
> attribute
> - event: events name and corresponding event code
> - cpumask: range of CPUs the events can be opened on
> - identifier: the version of this PMU
>
> Different types of PMU have different implementations of the "format"
> and "event" but all share the same implementation of the "cpumask"
> and "identifier". Thus we can move cpumask and identifier to the
> hisi_uncore_pmu framework and drivers can use the generic
> implementation.
>
> Signed-off-by: Yicong Yang <yangyicong at hisilicon.com>
One trivial unrelated white space change crept in to drop if you end up
respinning for some other reason.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
> diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
> index c47d33ccb489..742fb67d8a02 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
> +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
>
> @@ -485,6 +462,7 @@ static int hisi_hha_pmu_dev_probe(struct platform_device *pdev,
> hha_pmu->pmu_events.attr_groups = hisi_hha_pmu_v1_attr_groups;
> hha_pmu->num_counters = HHA_V1_NR_COUNTERS;
> }
> +
stray change.
> hha_pmu->ops = &hisi_uncore_hha_ops;
> hha_pmu->dev = &pdev->dev;
> hha_pmu->on_cpu = -1;
More information about the linux-arm-kernel
mailing list