Re: [PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2018-04-02 Thread Neil Leeder
Hi Hanjun, On 4/2/2018 10:24 AM, Hanjun Guo wrote: I think we need to wait for the new version of IORT spec, which includes the fix for the two base address for SMMUv3 PMCG (now just represent one). Thanks Hanjun It's in rev D which is available now:

Re: [PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2018-04-02 Thread Neil Leeder
Hi Hanjun, On 4/2/2018 10:24 AM, Hanjun Guo wrote: I think we need to wait for the new version of IORT spec, which includes the fix for the two base address for SMMUv3 PMCG (now just represent one). Thanks Hanjun It's in rev D which is available now:

Re: [PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2018-03-31 Thread Neil Leeder
Hi Yisheng Xie, On 3/29/2018 03:03 AM, Yisheng Xie wrote: Hi Neil, On 2017/8/5 3:59, Neil Leeder wrote: +    mem_resource_0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); +    mem_map_0 = devm_ioremap_resource(>dev, mem_resource_0); + Can we use devm_ioremap instead? for the reg_b

Re: [PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2018-03-31 Thread Neil Leeder
Hi Yisheng Xie, On 3/29/2018 03:03 AM, Yisheng Xie wrote: Hi Neil, On 2017/8/5 3:59, Neil Leeder wrote: +    mem_resource_0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); +    mem_map_0 = devm_ioremap_resource(>dev, mem_resource_0); + Can we use devm_ioremap instead? for the reg_b

[PATCH] perf: qcom_l2_pmu: don't allow guest access

2017-12-06 Thread Neil Leeder
Guests cannot access IMPDEF system registers, which are used by this driver. Disable the driver if it's running in a guest VM. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/perf/qcom_l2_pmu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/perf/qcom_l2_p

[PATCH] perf: qcom_l2_pmu: don't allow guest access

2017-12-06 Thread Neil Leeder
Guests cannot access IMPDEF system registers, which are used by this driver. Disable the driver if it's running in a guest VM. Signed-off-by: Neil Leeder --- drivers/perf/qcom_l2_pmu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf

[PATCH] perf: qcom_l2_pmu: add event names

2017-09-14 Thread Neil Leeder
Add event names so that common events can be specified symbolically, for example: l2cache_0/total-reads/,l2cache_0/cycles/ Event names are displayed in 'perf list'. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/perf/qcom_l2_pmu.

[PATCH] perf: qcom_l2_pmu: add event names

2017-09-14 Thread Neil Leeder
Add event names so that common events can be specified symbolically, for example: l2cache_0/total-reads/,l2cache_0/cycles/ Event names are displayed in 'perf list'. Signed-off-by: Neil Leeder --- drivers/perf/qcom_l2_pmu.c | 54 ++ 1 file changed

[PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2017-08-04 Thread Neil Leeder
to transaction events. SMMU events are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c

[PATCH 2/2] perf: add arm64 smmuv3 pmu driver

2017-08-04 Thread Neil Leeder
to transaction events. SMMU events are not attributable to a CPU, so task mode and sampling are not supported. Signed-off-by: Neil Leeder --- drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 813

[PATCH 1/2] acpi: arm64: add iort support for PMCG

2017-08-04 Thread Neil Leeder
Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMU v3 PMU driver. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/acpi/arm64/iort.c | 54 +++ includ

[PATCH 1/2] acpi: arm64: add iort support for PMCG

2017-08-04 Thread Neil Leeder
Add support for the SMMU Performance Monitor Counter Group information from ACPI. This is in preparation for its use in the SMMU v3 PMU driver. Signed-off-by: Neil Leeder --- drivers/acpi/arm64/iort.c | 54 +++ include/acpi/actbl2.h | 9

[PATCH 0/2] arm64 SMMUv3 PMU driver with IORT support

2017-08-04 Thread Neil Leeder
. Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver drivers/acpi/arm64/iort.c | 54 +++ drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 823

[PATCH 0/2] arm64 SMMUv3 PMU driver with IORT support

2017-08-04 Thread Neil Leeder
. Neil Leeder (2): acpi: arm64: add iort support for PMCG perf: add arm64 smmuv3 pmu driver drivers/acpi/arm64/iort.c | 54 +++ drivers/perf/Kconfig | 9 + drivers/perf/Makefile | 1 + drivers/perf/arm_smmuv3_pmu.c | 823

[PATCH v2] perf: qcom_l2: fix column exclusion check

2017-07-25 Thread Neil Leeder
exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Fixes: 21bdbb7102ed ("perf: add qcom l2 cache perf events driver") Signed-off-by: Neil Leeder <nlee...@codeaurora.org> Acked-by: Mark Rutland <mark.rutl...@arm.com> --- Same code as v

[PATCH v2] perf: qcom_l2: fix column exclusion check

2017-07-25 Thread Neil Leeder
exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Fixes: 21bdbb7102ed ("perf: add qcom l2 cache perf events driver") Signed-off-by: Neil Leeder Acked-by: Mark Rutland --- Same code as v1, just added the tags to the commit text. dr

[PATCH] perf: qcom_l2: fix column exclusion check

2017-07-24 Thread Neil Leeder
exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/perf/qcom_l2_pmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index c

[PATCH] perf: qcom_l2: fix column exclusion check

2017-07-24 Thread Neil Leeder
exclusion and not counting it. Add a check for PMU type before applying column exclusion logic. Signed-off-by: Neil Leeder --- drivers/perf/qcom_l2_pmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/perf/qcom_l2_pmu.c b/drivers/perf/qcom_l2_pmu.c index c259848..b242cce 100644

[PATCH/RFC] arm64: pmu: add Qualcomm Technologies extensions

2017-03-01 Thread Neil Leeder
into a group field. The PMNx event then points to that region/group combo. Restrictions that limit only one concurrent region/group combination are also enforced. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- The Qualcomm Technologies CPU PMU extensions have an additional set of registers

[PATCH/RFC] arm64: pmu: add Qualcomm Technologies extensions

2017-03-01 Thread Neil Leeder
into a group field. The PMNx event then points to that region/group combo. Restrictions that limit only one concurrent region/group combination are also enforced. Signed-off-by: Neil Leeder --- The Qualcomm Technologies CPU PMU extensions have an additional set of registers which need to be programmed when

[PATCH v10] perf: add qcom l2 cache perf events driver

2017-02-07 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v10: Remove unnecessary

[PATCH v10] perf: add qcom l2 cache perf events driver

2017-02-07 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v10: Remove unnecessary cross-call for reset Remove

[PATCH v9] perf: add qcom l2 cache perf events driver

2017-02-03 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v9: Add support for m

[PATCH v9] perf: add qcom l2 cache perf events driver

2017-02-03 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v9: Add support for maxcpus < all cpus: Move s

[PATCH v8] perf: add qcom l2 cache perf events driver

2017-01-16 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v8: Various style c

[PATCH v8] perf: add qcom l2 cache perf events driver

2017-01-16 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v8: Various style changes for function names &

[PATCH v7] soc: qcom: add l2 cache perf events driver

2016-10-28 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v7: Move to driver

[PATCH v7] soc: qcom: add l2 cache perf events driver

2016-10-28 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v7: Move to drivers/perf Rebased on 4.9-rc1

Re: [PATCH v6] soc: qcom: add l2 cache perf events driver

2016-10-04 Thread Neil Leeder
On 10/4/2016 11:53 AM, Mark Rutland wrote: > Hi Neil, > > On Wed, Sep 21, 2016 at 05:12:54PM -0400, Neil Leeder wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache_0' and can be used >> with perf events to pro

Re: [PATCH v6] soc: qcom: add l2 cache perf events driver

2016-10-04 Thread Neil Leeder
On 10/4/2016 11:53 AM, Mark Rutland wrote: > Hi Neil, > > On Wed, Sep 21, 2016 at 05:12:54PM -0400, Neil Leeder wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache_0' and can be used >> with perf events to pro

Re: [PATCH v6] soc: qcom: add l2 cache perf events driver

2016-10-04 Thread Neil Leeder
On 9/21/2016 05:12 PM, Neil Leeder wrote: > Adds perf events support for L2 cache PMU. > > The L2 cache PMU driver is named 'l2cache_0' and can be used > with perf events to profile L2 events such as cache hits > and misses. > > Signed-off-by: Neil Leeder <nlee...@co

Re: [PATCH v6] soc: qcom: add l2 cache perf events driver

2016-10-04 Thread Neil Leeder
On 9/21/2016 05:12 PM, Neil Leeder wrote: > Adds perf events support for L2 cache PMU. > > The L2 cache PMU driver is named 'l2cache_0' and can be used > with perf events to profile L2 events such as cache hits > and misses. > > Signed-off-by: Neil Leeder > --- &g

[PATCH v6] soc: qcom: add l2 cache perf events driver

2016-09-21 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v6: restore accidentally dropped Kconfig dependencies v5

[PATCH v6] soc: qcom: add l2 cache perf events driver

2016-09-21 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- v6: restore accidentally dropped Kconfig dependencies v5: Fold the header and l2-accessors

[PATCH v5] soc: qcom: add l2 cache perf events driver

2016-09-21 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- v5: Fold the header and l2-accessors into .c file Use

[PATCH v5] soc: qcom: add l2 cache perf events driver

2016-09-21 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- v5: Fold the header and l2-accessors into .c file Use multi-instance framework for hotplug

Re: [PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-09-16 Thread Neil Leeder
On 9/16/2016 12:40 PM, Mark Rutland wrote: > On Fri, Sep 16, 2016 at 11:33:39AM -0400, Neil Leeder wrote: [...] >> On 9/1/2016 12:30 PM, Mark Rutland wrote: >>> On Tue, Aug 30, 2016 at 01:01:33PM -0400, Neil Leeder wrote: >>>> + /* Don't allow groups with mix

Re: [PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-09-16 Thread Neil Leeder
On 9/16/2016 12:40 PM, Mark Rutland wrote: > On Fri, Sep 16, 2016 at 11:33:39AM -0400, Neil Leeder wrote: [...] >> On 9/1/2016 12:30 PM, Mark Rutland wrote: >>> On Tue, Aug 30, 2016 at 01:01:33PM -0400, Neil Leeder wrote: >>>> + /* Don't allow groups with mix

Re: [PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-09-16 Thread Neil Leeder
Hi Mark, Thank you for the thorough review. I will post an updated patchset which addresses all of your comments. There is just one outstanding comment which I have a question about: On 9/1/2016 12:30 PM, Mark Rutland wrote: > On Tue, Aug 30, 2016 at 01:01:33PM -0400, Neil Leeder wr

Re: [PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-09-16 Thread Neil Leeder
Hi Mark, Thank you for the thorough review. I will post an updated patchset which addresses all of your comments. There is just one outstanding comment which I have a question about: On 9/1/2016 12:30 PM, Mark Rutland wrote: > On Tue, Aug 30, 2016 at 01:01:33PM -0400, Neil Leeder wr

[PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-08-30 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 10 + drivers/so

[PATCH v4 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-30 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 6 drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-acces

[PATCH v4 0/2] qcom: add l2 cache perf events driver

2016-08-30 Thread Neil Leeder
per slice. Replace manual event filtering with filter_match callback. Use a separate used_mask for event groups. Add hotplug notifier for CPU and irq migration. Remove extraneous synchronisation instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers

[PATCH v4 2/2] soc: qcom: add l2 cache perf events driver

2016-08-30 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile

[PATCH v4 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-30 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 6 drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-accessors.c | 63

[PATCH v4 0/2] qcom: add l2 cache perf events driver

2016-08-30 Thread Neil Leeder
per slice. Replace manual event filtering with filter_match callback. Use a separate used_mask for event groups. Add hotplug notifier for CPU and irq migration. Remove extraneous synchronisation instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers

[PATCH v3 2/2] soc: qcom: add l2 cache perf events driver

2016-08-16 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 10 + drivers/so

[PATCH v3 2/2] soc: qcom: add l2 cache perf events driver

2016-08-16 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile

[PATCH v3 0/2] qcom: add l2 cache perf events driver

2016-08-16 Thread Neil Leeder
. Use a separate used_mask for event groups. Add hotplug notifier for CPU and irq migration. Remove extraneous synchronisation instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers to access L2 registers soc: qcom: add l2 cache perf events driver

[PATCH v3 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-16 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 6 drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-acces

[PATCH v3 0/2] qcom: add l2 cache perf events driver

2016-08-16 Thread Neil Leeder
. Use a separate used_mask for event groups. Add hotplug notifier for CPU and irq migration. Remove extraneous synchronisation instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers to access L2 registers soc: qcom: add l2 cache perf events driver

[PATCH v3 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-16 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 6 drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-accessors.c | 63

Re: [PATCH v2 2/2] soc: qcom: add l2 cache perf events driver

2016-08-08 Thread Neil Leeder
On 8/5/2016 07:15 PM, Paul Gortmaker wrote: > On Thu, Aug 4, 2016 at 5:11 PM, Neil Leeder <nlee...@codeaurora.org> wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache_0' and can be used >> with perf events to pro

Re: [PATCH v2 2/2] soc: qcom: add l2 cache perf events driver

2016-08-08 Thread Neil Leeder
On 8/5/2016 07:15 PM, Paul Gortmaker wrote: > On Thu, Aug 4, 2016 at 5:11 PM, Neil Leeder wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache_0' and can be used >> with perf events to profile L2 events such

Re: [PATCH v2 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-05 Thread Neil Leeder
On 8/5/2016 06:00 AM, Mark Rutland wrote: > On Thu, Aug 04, 2016 at 05:11:10PM -0400, Neil Leeder wrote: >> L2 registers are accessed using a select register and data >> register pair. To prevent multiple concurrent writes to the >> select register by independe

Re: [PATCH v2 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-05 Thread Neil Leeder
On 8/5/2016 06:00 AM, Mark Rutland wrote: > On Thu, Aug 04, 2016 at 05:11:10PM -0400, Neil Leeder wrote: >> L2 registers are accessed using a select register and data >> register pair. To prevent multiple concurrent writes to the >> select register by independe

[PATCH v2 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-04 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-acces

[PATCH v2 1/2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-08-04 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-accessors.c | 66

[PATCH v2 2/2] soc: qcom: add l2 cache perf events driver

2016-08-04 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 10 + drivers/so

[PATCH v2 2/2] soc: qcom: add l2 cache perf events driver

2016-08-04 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile

[PATCH v2 0/2] qcom: add l2 cache perf events driver

2016-08-04 Thread Neil Leeder
instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers to access L2 registers soc: qcom: add l2 cache perf events driver drivers/soc/qcom/Kconfig | 19 + drivers/soc/qcom/Makefile | 2 + drivers/soc/qcom/l2-accessors.c

[PATCH v2 0/2] qcom: add l2 cache perf events driver

2016-08-04 Thread Neil Leeder
instructions. Other miscellaneous cleanup. Neil Leeder (2): soc: qcom: provide mechanism for drivers to access L2 registers soc: qcom: add l2 cache perf events driver drivers/soc/qcom/Kconfig | 19 + drivers/soc/qcom/Makefile | 2 + drivers/soc/qcom/l2-accessors.c

Re: [PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-10 Thread Neil Leeder
On 6/9/2016 03:41 PM, Peter Zijlstra wrote: > On Thu, Jun 09, 2016 at 04:56:16PM +0100, Mark Rutland wrote: > +static irqreturn_t l2_cache__handle_irq(int irq_num, void *data) > +{ > + struct hml2_pmu *slice = data; > + u32 ovsr; > + int idx; > + struct pt_regs *regs;

Re: [PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-10 Thread Neil Leeder
On 6/9/2016 03:41 PM, Peter Zijlstra wrote: > On Thu, Jun 09, 2016 at 04:56:16PM +0100, Mark Rutland wrote: > +static irqreturn_t l2_cache__handle_irq(int irq_num, void *data) > +{ > + struct hml2_pmu *slice = data; > + u32 ovsr; > + int idx; > + struct pt_regs *regs;

Re: [PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
On 6/8/2016 12:12 PM, Mark Rutland wrote: > On Wed, Jun 08, 2016 at 11:21:16AM -0400, Neil Leeder wrote: >> >> >> On 6/6/2016 05:04 AM, Mark Rutland wrote: >>> On Fri, Jun 03, 2016 at 05:03:30PM -0400, Neil Leeder wrote: >>>> This adds a new dynamic P

Re: [PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
On 6/8/2016 12:12 PM, Mark Rutland wrote: > On Wed, Jun 08, 2016 at 11:21:16AM -0400, Neil Leeder wrote: >> >> >> On 6/6/2016 05:04 AM, Mark Rutland wrote: >>> On Fri, Jun 03, 2016 at 05:03:30PM -0400, Neil Leeder wrote: >>>> This adds a new dynamic P

Re: [PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
On 6/6/2016 05:04 AM, Mark Rutland wrote: > On Fri, Jun 03, 2016 at 05:03:30PM -0400, Neil Leeder wrote: >> This adds a new dynamic PMU to the Perf Events framework to program >> and control the L2 cache PMUs in some Qualcomm Technologies SOCs. >> >> The driver e

Re: [PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
On 6/6/2016 05:04 AM, Mark Rutland wrote: > On Fri, Jun 03, 2016 at 05:03:30PM -0400, Neil Leeder wrote: >> This adds a new dynamic PMU to the Perf Events framework to program >> and control the L2 cache PMUs in some Qualcomm Technologies SOCs. >> >> The driver e

Re: [PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
Mark, Thank you for the detailed review. On 6/6/2016 05:51 AM, Mark Rutland wrote: > On Fri, Jun 03, 2016 at 05:03:32PM -0400, Neil Leeder wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache' and can be used >> with perf

Re: [PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-08 Thread Neil Leeder
Mark, Thank you for the detailed review. On 6/6/2016 05:51 AM, Mark Rutland wrote: > On Fri, Jun 03, 2016 at 05:03:32PM -0400, Neil Leeder wrote: >> Adds perf events support for L2 cache PMU. >> >> The L2 cache PMU driver is named 'l2cache' and can be used >> with perf

[PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-03 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 10 + drivers/so

[PATCH 1/2] perf: allow add to change event state

2016-06-03 Thread Neil Leeder
When the platform-specific pmu->add function returns an error, it may have also changed the event's state. If so, do not override that new state. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[PATCH 2/2] soc: qcom: add l2 cache perf events driver

2016-06-03 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache' and can be used with perf events to profile L2 events such as cache hits and misses. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 10 + drivers/soc/qcom/Makefile | 1

[PATCH 1/2] perf: allow add to change event state

2016-06-03 Thread Neil Leeder
When the platform-specific pmu->add function returns an error, it may have also changed the event's state. If so, do not override that new state. Signed-off-by: Neil Leeder --- kernel/events/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/events/core.

[PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-03 Thread Neil Leeder
that event_add() changed the state, and not override it and force it to Inactive. This patchset requires: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers Neil Leeder (2): perf: allow add to change event state soc: qcom: add l2 cache perf events driver drivers/soc/qcom/Kconfig

[PATCH 0/2] qcom: add l2 cache perf events driver

2016-06-03 Thread Neil Leeder
that event_add() changed the state, and not override it and force it to Inactive. This patchset requires: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers Neil Leeder (2): perf: allow add to change event state soc: qcom: add l2 cache perf events driver drivers/soc/qcom/Kconfig

[PATCH v2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-06-03 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- Changes since v1: Add ARM64 dependency Replace module.h with export.h Remove unused dummy fnunctions and

[PATCH v2] soc: qcom: provide mechanism for drivers to access L2 registers

2016-06-03 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder --- Changes since v1: Add ARM64 dependency Replace module.h with export.h Remove unused dummy fnunctions and ifdef in header drivers/soc/qcom

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-26 Thread Neil Leeder
On 5/26/2016 12:48 AM, Bjorn Andersson wrote: > On Tue 24 May 12:54 PDT 2016, Neil Leeder wrote: > >> >> >> On 5/24/2016 07:23 AM, Mark Rutland wrote: >>> On Mon, May 23, 2016 at 02:22:59PM -0400, Neil Leeder wrote: >>>> >>>> On 5/23/2016

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-26 Thread Neil Leeder
On 5/26/2016 12:48 AM, Bjorn Andersson wrote: > On Tue 24 May 12:54 PDT 2016, Neil Leeder wrote: > >> >> >> On 5/24/2016 07:23 AM, Mark Rutland wrote: >>> On Mon, May 23, 2016 at 02:22:59PM -0400, Neil Leeder wrote: >>>> >>>> On 5/23/2016

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-24 Thread Neil Leeder
On 5/24/2016 07:23 AM, Mark Rutland wrote: > On Mon, May 23, 2016 at 02:22:59PM -0400, Neil Leeder wrote: >> >> On 5/23/2016 01:25 PM, Mark Rutland wrote: >>> On Fri, May 20, 2016 at 03:13:07PM -0400, Neil Leeder wrote: >>>> Signed-off-by:

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-24 Thread Neil Leeder
On 5/24/2016 07:23 AM, Mark Rutland wrote: > On Mon, May 23, 2016 at 02:22:59PM -0400, Neil Leeder wrote: >> >> On 5/23/2016 01:25 PM, Mark Rutland wrote: >>> On Fri, May 20, 2016 at 03:13:07PM -0400, Neil Leeder wrote: >>>> Signed-off-by: Neil Leeder >

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/23/2016 01:25 PM, Mark Rutland wrote: > On Fri, May 20, 2016 at 03:13:07PM -0400, Neil Leeder wrote: >> L2 registers are accessed using a select register and data >> register pair. To prevent multiple concurrent writes to the >> select register by independe

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/23/2016 01:25 PM, Mark Rutland wrote: > On Fri, May 20, 2016 at 03:13:07PM -0400, Neil Leeder wrote: >> L2 registers are accessed using a select register and data >> register pair. To prevent multiple concurrent writes to the >> select register by independe

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/23/2016 01:04 PM, Stephen Boyd wrote: > On 05/23/2016 08:43 AM, Neil Leeder wrote: >> >> On 5/20/2016 05:19 PM, Stephen Boyd wrote: >> >>> >>> Is there a patch to add sysreg.h to arch/arm? It would be nice to use >>> one l2 accessor API o

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/23/2016 01:04 PM, Stephen Boyd wrote: > On 05/23/2016 08:43 AM, Neil Leeder wrote: >> >> On 5/20/2016 05:19 PM, Stephen Boyd wrote: >> >>> >>> Is there a patch to add sysreg.h to arch/arm? It would be nice to use >>> one l2 accessor API o

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/20/2016 05:19 PM, Stephen Boyd wrote: > On 05/20/2016 12:13 PM, Neil Leeder wrote: >> diff --git a/drivers/soc/qcom/l2-accessors.c >> b/drivers/soc/qcom/l2-accessors.c >> new file mode 100644 >> index 000..fbb69bd >> --- /dev/null >> +++ b/dri

Re: [PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-23 Thread Neil Leeder
On 5/20/2016 05:19 PM, Stephen Boyd wrote: > On 05/20/2016 12:13 PM, Neil Leeder wrote: >> diff --git a/drivers/soc/qcom/l2-accessors.c >> b/drivers/soc/qcom/l2-accessors.c >> new file mode 100644 >> index 000..fbb69bd >> --- /dev/null >> +++ b/dri

[PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-20 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder <nlee...@codeaurora.org> --- drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-acces

[PATCH] soc: qcom: provide mechanism for drivers to access L2 registers

2016-05-20 Thread Neil Leeder
registers use the set and get functions provided by l2-accessors to ensure correct reads and writes to L2 registers. Signed-off-by: Neil Leeder --- drivers/soc/qcom/Kconfig | 9 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/l2-accessors.c | 66