Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread John Garry
On 18/09/2018 13:16, Robin Murphy wrote: On 18/09/18 12:47, Will Deacon wrote: On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: + +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr =

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread John Garry
On 18/09/2018 13:16, Robin Murphy wrote: On 18/09/18 12:47, Will Deacon wrote: On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: + +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr =

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread Robin Murphy
On 18/09/18 12:47, Will Deacon wrote: On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: + +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ +

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread Robin Murphy
On 18/09/18 12:47, Will Deacon wrote: On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: + +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ +

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread Will Deacon
On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: > > >>+ > >>+#define SMMU_EVENT_ATTR(_name, _id) \ > >>+(&((struct perf_pmu_events_attr[]) { \ > >>+{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ > >>+ .id = _id, }

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-18 Thread Will Deacon
On Mon, Sep 17, 2018 at 06:10:05PM +0100, John Garry wrote: > > >>+ > >>+#define SMMU_EVENT_ATTR(_name, _id) \ > >>+(&((struct perf_pmu_events_attr[]) { \ > >>+{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ > >>+ .id = _id, }

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-17 Thread John Garry
+ +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ + .id = _id, } \ +})[0].attr.attr) + +static struct attribute

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-17 Thread John Garry
+ +#define SMMU_EVENT_ATTR(_name, _id) \ +(&((struct perf_pmu_events_attr[]) { \ +{ .attr = __ATTR(_name, 0444, smmu_pmu_event_show, NULL), \ + .id = _id, } \ +})[0].attr.attr) + +static struct attribute

RE: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-12 Thread Shameerali Kolothum Thodi
...@codeaurora.org; vkil...@codeaurora.org; rruig...@codeaurora.org; > linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Linuxarm ; > neil.m.lee...@gmail.com > Subject: Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver > > On 10/09

RE: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-12 Thread Shameerali Kolothum Thodi
...@codeaurora.org; vkil...@codeaurora.org; rruig...@codeaurora.org; > linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Linuxarm ; > neil.m.lee...@gmail.com > Subject: Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver > > On 10/09

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-11 Thread Robin Murphy
On 10/09/18 17:37, Shameerali Kolothum Thodi wrote: [...] @@ -0,0 +1,838 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2017 The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or +modify + * it under the terms of the GNU

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-11 Thread Robin Murphy
On 10/09/18 17:37, Shameerali Kolothum Thodi wrote: [...] @@ -0,0 +1,838 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (c) 2017 The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or +modify + * it under the terms of the GNU

RE: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-10 Thread Shameerali Kolothum Thodi
gt; pa...@codeaurora.org; vkil...@codeaurora.org; rruig...@codeaurora.org; > linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Linuxarm ; > neil.m.lee...@gmail.com > Subject: Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver > > [

RE: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-10 Thread Shameerali Kolothum Thodi
gt; pa...@codeaurora.org; vkil...@codeaurora.org; rruig...@codeaurora.org; > linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Linuxarm ; > neil.m.lee...@gmail.com > Subject: Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver > > [

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-10 Thread Robin Murphy
[ note: for some reason I decided to review this from the bottom up, so it probably makes no sense unless you read it backwards ] On 2018-07-24 12:45 PM, Shameer Kolothum wrote: From: Neil Leeder Adds a new driver to support the SMMU v3 PMU and add it into the perf events framework. Each

Re: [PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-09-10 Thread Robin Murphy
[ note: for some reason I decided to review this from the bottom up, so it probably makes no sense unless you read it backwards ] On 2018-07-24 12:45 PM, Shameer Kolothum wrote: From: Neil Leeder Adds a new driver to support the SMMU v3 PMU and add it into the perf events framework. Each

[PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-07-24 Thread Shameer Kolothum
From: Neil Leeder Adds a new driver to support the SMMU v3 PMU and add it into the perf events framework. Each SMMU node may have multiple PMUs associated with it, each of which may support different events. SMMUv3 PMCG devices are named as arm_smmu_v3_x_pmcg_y where x denotes the associated

[PATCH v2 3/4] perf: add arm64 smmuv3 pmu driver

2018-07-24 Thread Shameer Kolothum
From: Neil Leeder Adds a new driver to support the SMMU v3 PMU and add it into the perf events framework. Each SMMU node may have multiple PMUs associated with it, each of which may support different events. SMMUv3 PMCG devices are named as arm_smmu_v3_x_pmcg_y where x denotes the associated