All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add AXI address filter support for MMDC profiling
@ 2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
  0 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana @ 2017-02-15 12:00 UTC (permalink / raw)
  To: shawnguo, frank.li
  Cc: linux-arm-kernel, linux-kernel, peterz, mingo, acme,
	alexander.shishkin, lznuaa, mark.rutland, Tiberiu Breana

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

This patch set is aimed at the i.MX6 MMDC driver:
Patch 1 is a bug fix for the "write-accesses" event definition.
Patch 2 adds AXI address filter support for MMDC profiling.

v2: added prefix for patch subjects.

Tiberiu Breana (2):
  ARM: imx: Fix mmdc_pmu_write_accesses event definition
  ARM: imx: Add AXI address filter support for MMDC profiling

 arch/arm/mach-imx/mmdc.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 0/2] Add AXI address filter support for MMDC profiling
@ 2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
  0 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana at nxp.com @ 2017-02-15 12:00 UTC (permalink / raw)
  To: linux-arm-kernel

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

This patch set is aimed at the i.MX6 MMDC driver:
Patch 1 is a bug fix for the "write-accesses" event definition.
Patch 2 adds AXI address filter support for MMDC profiling.

v2: added prefix for patch subjects.

Tiberiu Breana (2):
  ARM: imx: Fix mmdc_pmu_write_accesses event definition
  ARM: imx: Add AXI address filter support for MMDC profiling

 arch/arm/mach-imx/mmdc.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
  2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
@ 2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
  -1 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana @ 2017-02-15 12:00 UTC (permalink / raw)
  To: shawnguo, frank.li
  Cc: linux-arm-kernel, linux-kernel, peterz, mingo, acme,
	alexander.shishkin, lznuaa, mark.rutland, Tiberiu Breana

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Fixed an error in the "write-accesses" event definition.

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
---
 arch/arm/mach-imx/mmdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index c03bf28..89a926f 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
 PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
 PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
 PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
-PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
+PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
 PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
 PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
 PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
@ 2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
  0 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana at nxp.com @ 2017-02-15 12:00 UTC (permalink / raw)
  To: linux-arm-kernel

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Fixed an error in the "write-accesses" event definition.

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
---
 arch/arm/mach-imx/mmdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index c03bf28..89a926f 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
 PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
 PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
 PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
-PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
+PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
 PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
 PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
 PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/2] ARM: imx: Add AXI address filter support for MMDC profiling
  2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
@ 2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
  -1 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana @ 2017-02-15 12:00 UTC (permalink / raw)
  To: shawnguo, frank.li
  Cc: linux-arm-kernel, linux-kernel, peterz, mingo, acme,
	alexander.shishkin, lznuaa, mark.rutland, Tiberiu Breana

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Add support for an extra config parameter for perf commands:
axi_id, which will be written in the MMDC's MADPCR1 register,
to filter memory usage profiling (see i.MX6 reference manual,
chapter 44.7 MMDC Profiling for AXI id usage).

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
---
 arch/arm/mach-imx/mmdc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index 89a926f..7826289 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 NXP
  * Copyright 2011,2016 Freescale Semiconductor, Inc.
  * Copyright 2011 Linaro Ltd.
  *
@@ -47,6 +48,7 @@
 #define PROFILE_SEL		0x10
 
 #define MMDC_MADPCR0	0x410
+#define MMDC_MADPCR1	0x414
 #define MMDC_MADPSR0	0x418
 #define MMDC_MADPSR1	0x41C
 #define MMDC_MADPSR2	0x420
@@ -57,6 +59,7 @@
 #define MMDC_NUM_COUNTERS	6
 
 #define MMDC_FLAG_PROFILE_SEL	0x1
+#define MMDC_PRF_AXI_ID_CLEAR	0x0
 
 #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu)
 
@@ -161,8 +164,11 @@ static struct attribute_group mmdc_pmu_events_attr_group = {
 };
 
 PMU_FORMAT_ATTR(event, "config:0-63");
+PMU_FORMAT_ATTR(axi_id, "config1:0-63");
+
 static struct attribute *mmdc_pmu_format_attrs[] = {
 	&format_attr_event.attr,
+	&format_attr_axi_id.attr,
 	NULL,
 };
 
@@ -345,6 +351,14 @@ static void mmdc_pmu_event_start(struct perf_event *event, int flags)
 
 	writel(DBG_RST, reg);
 
+	/*
+	 * Write the AXI id parameter to MADPCR1.
+	 */
+	val = event->attr.config1;
+	reg = mmdc_base + MMDC_MADPCR1;
+	writel(val, reg);
+
+	reg = mmdc_base + MMDC_MADPCR0;
 	val = DBG_EN;
 	if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL)
 		val |= PROFILE_SEL;
@@ -382,6 +396,10 @@ static void mmdc_pmu_event_stop(struct perf_event *event, int flags)
 	reg = mmdc_base + MMDC_MADPCR0;
 
 	writel(PRF_FRZ, reg);
+
+	reg = mmdc_base + MMDC_MADPCR1;
+	writel(MMDC_PRF_AXI_ID_CLEAR, reg);
+
 	mmdc_pmu_event_update(event);
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/2] ARM: imx: Add AXI address filter support for MMDC profiling
@ 2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
  0 siblings, 0 replies; 16+ messages in thread
From: andrei-tiberiu.breana at nxp.com @ 2017-02-15 12:00 UTC (permalink / raw)
  To: linux-arm-kernel

From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Add support for an extra config parameter for perf commands:
axi_id, which will be written in the MMDC's MADPCR1 register,
to filter memory usage profiling (see i.MX6 reference manual,
chapter 44.7 MMDC Profiling for AXI id usage).

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
---
 arch/arm/mach-imx/mmdc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index 89a926f..7826289 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -1,4 +1,5 @@
 /*
+ * Copyright 2017 NXP
  * Copyright 2011,2016 Freescale Semiconductor, Inc.
  * Copyright 2011 Linaro Ltd.
  *
@@ -47,6 +48,7 @@
 #define PROFILE_SEL		0x10
 
 #define MMDC_MADPCR0	0x410
+#define MMDC_MADPCR1	0x414
 #define MMDC_MADPSR0	0x418
 #define MMDC_MADPSR1	0x41C
 #define MMDC_MADPSR2	0x420
@@ -57,6 +59,7 @@
 #define MMDC_NUM_COUNTERS	6
 
 #define MMDC_FLAG_PROFILE_SEL	0x1
+#define MMDC_PRF_AXI_ID_CLEAR	0x0
 
 #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu)
 
@@ -161,8 +164,11 @@ static struct attribute_group mmdc_pmu_events_attr_group = {
 };
 
 PMU_FORMAT_ATTR(event, "config:0-63");
+PMU_FORMAT_ATTR(axi_id, "config1:0-63");
+
 static struct attribute *mmdc_pmu_format_attrs[] = {
 	&format_attr_event.attr,
+	&format_attr_axi_id.attr,
 	NULL,
 };
 
@@ -345,6 +351,14 @@ static void mmdc_pmu_event_start(struct perf_event *event, int flags)
 
 	writel(DBG_RST, reg);
 
+	/*
+	 * Write the AXI id parameter to MADPCR1.
+	 */
+	val = event->attr.config1;
+	reg = mmdc_base + MMDC_MADPCR1;
+	writel(val, reg);
+
+	reg = mmdc_base + MMDC_MADPCR0;
 	val = DBG_EN;
 	if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL)
 		val |= PROFILE_SEL;
@@ -382,6 +396,10 @@ static void mmdc_pmu_event_stop(struct perf_event *event, int flags)
 	reg = mmdc_base + MMDC_MADPCR0;
 
 	writel(PRF_FRZ, reg);
+
+	reg = mmdc_base + MMDC_MADPCR1;
+	writel(MMDC_PRF_AXI_ID_CLEAR, reg);
+
 	mmdc_pmu_event_update(event);
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
  2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
@ 2017-02-15 14:28     ` Zhi Li
  -1 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-15 14:28 UTC (permalink / raw)
  To: Tiberiu Breana
  Cc: Shawn Guo, Frank Li, linux-arm-kernel, kernel list,
	Peter Zijlstra, Ingo Molnar, acme, alexander.shishkin,
	Mark Rutland

On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Fixed an error in the "write-accesses" event definition.
>
> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Acked-by: Frank Li <Frank.li@nxp.com>

> ---
>  arch/arm/mach-imx/mmdc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
> index c03bf28..89a926f 100644
> --- a/arch/arm/mach-imx/mmdc.c
> +++ b/arch/arm/mach-imx/mmdc.c
> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
@ 2017-02-15 14:28     ` Zhi Li
  0 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-15 14:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Fixed an error in the "write-accesses" event definition.
>
> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Acked-by: Frank Li <Frank.li@nxp.com>

> ---
>  arch/arm/mach-imx/mmdc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
> index c03bf28..89a926f 100644
> --- a/arch/arm/mach-imx/mmdc.c
> +++ b/arch/arm/mach-imx/mmdc.c
> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] ARM: imx: Add AXI address filter support for MMDC profiling
  2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
@ 2017-02-15 14:29     ` Zhi Li
  -1 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-15 14:29 UTC (permalink / raw)
  To: Tiberiu Breana
  Cc: Shawn Guo, Frank Li, linux-arm-kernel, kernel list,
	Peter Zijlstra, Ingo Molnar, acme, alexander.shishkin,
	Mark Rutland

On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Add support for an extra config parameter for perf commands:
> axi_id, which will be written in the MMDC's MADPCR1 register,
> to filter memory usage profiling (see i.MX6 reference manual,
> chapter 44.7 MMDC Profiling for AXI id usage).
>
> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Acked-by: Frank Li <Frank.li@nxp.com>

> ---
>  arch/arm/mach-imx/mmdc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
> index 89a926f..7826289 100644
> --- a/arch/arm/mach-imx/mmdc.c
> +++ b/arch/arm/mach-imx/mmdc.c
> @@ -1,4 +1,5 @@
>  /*
> + * Copyright 2017 NXP
>   * Copyright 2011,2016 Freescale Semiconductor, Inc.
>   * Copyright 2011 Linaro Ltd.
>   *
> @@ -47,6 +48,7 @@
>  #define PROFILE_SEL            0x10
>
>  #define MMDC_MADPCR0   0x410
> +#define MMDC_MADPCR1   0x414
>  #define MMDC_MADPSR0   0x418
>  #define MMDC_MADPSR1   0x41C
>  #define MMDC_MADPSR2   0x420
> @@ -57,6 +59,7 @@
>  #define MMDC_NUM_COUNTERS      6
>
>  #define MMDC_FLAG_PROFILE_SEL  0x1
> +#define MMDC_PRF_AXI_ID_CLEAR  0x0
>
>  #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu)
>
> @@ -161,8 +164,11 @@ static struct attribute_group mmdc_pmu_events_attr_group = {
>  };
>
>  PMU_FORMAT_ATTR(event, "config:0-63");
> +PMU_FORMAT_ATTR(axi_id, "config1:0-63");
> +
>  static struct attribute *mmdc_pmu_format_attrs[] = {
>         &format_attr_event.attr,
> +       &format_attr_axi_id.attr,
>         NULL,
>  };
>
> @@ -345,6 +351,14 @@ static void mmdc_pmu_event_start(struct perf_event *event, int flags)
>
>         writel(DBG_RST, reg);
>
> +       /*
> +        * Write the AXI id parameter to MADPCR1.
> +        */
> +       val = event->attr.config1;
> +       reg = mmdc_base + MMDC_MADPCR1;
> +       writel(val, reg);
> +
> +       reg = mmdc_base + MMDC_MADPCR0;
>         val = DBG_EN;
>         if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL)
>                 val |= PROFILE_SEL;
> @@ -382,6 +396,10 @@ static void mmdc_pmu_event_stop(struct perf_event *event, int flags)
>         reg = mmdc_base + MMDC_MADPCR0;
>
>         writel(PRF_FRZ, reg);
> +
> +       reg = mmdc_base + MMDC_MADPCR1;
> +       writel(MMDC_PRF_AXI_ID_CLEAR, reg);
> +
>         mmdc_pmu_event_update(event);
>  }
>
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 2/2] ARM: imx: Add AXI address filter support for MMDC profiling
@ 2017-02-15 14:29     ` Zhi Li
  0 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-15 14:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Add support for an extra config parameter for perf commands:
> axi_id, which will be written in the MMDC's MADPCR1 register,
> to filter memory usage profiling (see i.MX6 reference manual,
> chapter 44.7 MMDC Profiling for AXI id usage).
>
> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>

Acked-by: Frank Li <Frank.li@nxp.com>

> ---
>  arch/arm/mach-imx/mmdc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
> index 89a926f..7826289 100644
> --- a/arch/arm/mach-imx/mmdc.c
> +++ b/arch/arm/mach-imx/mmdc.c
> @@ -1,4 +1,5 @@
>  /*
> + * Copyright 2017 NXP
>   * Copyright 2011,2016 Freescale Semiconductor, Inc.
>   * Copyright 2011 Linaro Ltd.
>   *
> @@ -47,6 +48,7 @@
>  #define PROFILE_SEL            0x10
>
>  #define MMDC_MADPCR0   0x410
> +#define MMDC_MADPCR1   0x414
>  #define MMDC_MADPSR0   0x418
>  #define MMDC_MADPSR1   0x41C
>  #define MMDC_MADPSR2   0x420
> @@ -57,6 +59,7 @@
>  #define MMDC_NUM_COUNTERS      6
>
>  #define MMDC_FLAG_PROFILE_SEL  0x1
> +#define MMDC_PRF_AXI_ID_CLEAR  0x0
>
>  #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu)
>
> @@ -161,8 +164,11 @@ static struct attribute_group mmdc_pmu_events_attr_group = {
>  };
>
>  PMU_FORMAT_ATTR(event, "config:0-63");
> +PMU_FORMAT_ATTR(axi_id, "config1:0-63");
> +
>  static struct attribute *mmdc_pmu_format_attrs[] = {
>         &format_attr_event.attr,
> +       &format_attr_axi_id.attr,
>         NULL,
>  };
>
> @@ -345,6 +351,14 @@ static void mmdc_pmu_event_start(struct perf_event *event, int flags)
>
>         writel(DBG_RST, reg);
>
> +       /*
> +        * Write the AXI id parameter to MADPCR1.
> +        */
> +       val = event->attr.config1;
> +       reg = mmdc_base + MMDC_MADPCR1;
> +       writel(val, reg);
> +
> +       reg = mmdc_base + MMDC_MADPCR0;
>         val = DBG_EN;
>         if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL)
>                 val |= PROFILE_SEL;
> @@ -382,6 +396,10 @@ static void mmdc_pmu_event_stop(struct perf_event *event, int flags)
>         reg = mmdc_base + MMDC_MADPCR0;
>
>         writel(PRF_FRZ, reg);
> +
> +       reg = mmdc_base + MMDC_MADPCR1;
> +       writel(MMDC_PRF_AXI_ID_CLEAR, reg);
> +
>         mmdc_pmu_event_update(event);
>  }
>
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
  2017-02-15 14:28     ` Zhi Li
@ 2017-02-24 15:47       ` Zhi Li
  -1 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-24 15:47 UTC (permalink / raw)
  To: Tiberiu Breana
  Cc: Shawn Guo, Frank Li, linux-arm-kernel, kernel list,
	Peter Zijlstra, Ingo Molnar, acme, alexander.shishkin,
	Mark Rutland

On Wed, Feb 15, 2017 at 8:28 AM, Zhi Li <lznuaa@gmail.com> wrote:
> On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
>> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>
>> Fixed an error in the "write-accesses" event definition.
>>
>> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Acked-by: Frank Li <Frank.li@nxp.com>

Shawn:

Ping

best regards
Frank Li

>
>> ---
>>  arch/arm/mach-imx/mmdc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
>> index c03bf28..89a926f 100644
>> --- a/arch/arm/mach-imx/mmdc.c
>> +++ b/arch/arm/mach-imx/mmdc.c
>> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
>> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
>> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
@ 2017-02-24 15:47       ` Zhi Li
  0 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-02-24 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 15, 2017 at 8:28 AM, Zhi Li <lznuaa@gmail.com> wrote:
> On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
>> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>
>> Fixed an error in the "write-accesses" event definition.
>>
>> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>
> Acked-by: Frank Li <Frank.li@nxp.com>

Shawn:

Ping

best regards
Frank Li

>
>> ---
>>  arch/arm/mach-imx/mmdc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
>> index c03bf28..89a926f 100644
>> --- a/arch/arm/mach-imx/mmdc.c
>> +++ b/arch/arm/mach-imx/mmdc.c
>> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
>> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
>> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
>> --
>> 2.7.4
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
  2017-02-24 15:47       ` Zhi Li
@ 2017-03-07 17:24         ` Zhi Li
  -1 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-03-07 17:24 UTC (permalink / raw)
  To: Tiberiu Breana
  Cc: Shawn Guo, Frank Li, linux-arm-kernel, kernel list,
	Peter Zijlstra, Ingo Molnar, acme, alexander.shishkin,
	Mark Rutland

On Fri, Feb 24, 2017 at 9:47 AM, Zhi Li <lznuaa@gmail.com> wrote:
> On Wed, Feb 15, 2017 at 8:28 AM, Zhi Li <lznuaa@gmail.com> wrote:
>> On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
>>> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>>
>>> Fixed an error in the "write-accesses" event definition.
>>>
>>> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>
>> Acked-by: Frank Li <Frank.li@nxp.com>
>
> Shawn:

Shawn:

Ping.

best regards
Frank Li

>
> Ping
>
> best regards
> Frank Li
>
>>
>>> ---
>>>  arch/arm/mach-imx/mmdc.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
>>> index c03bf28..89a926f 100644
>>> --- a/arch/arm/mach-imx/mmdc.c
>>> +++ b/arch/arm/mach-imx/mmdc.c
>>> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>>>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>>>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>>>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
>>> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
>>> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>>>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>>>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>>>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
>>> --
>>> 2.7.4
>>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition
@ 2017-03-07 17:24         ` Zhi Li
  0 siblings, 0 replies; 16+ messages in thread
From: Zhi Li @ 2017-03-07 17:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 24, 2017 at 9:47 AM, Zhi Li <lznuaa@gmail.com> wrote:
> On Wed, Feb 15, 2017 at 8:28 AM, Zhi Li <lznuaa@gmail.com> wrote:
>> On Wed, Feb 15, 2017 at 6:00 AM,  <andrei-tiberiu.breana@nxp.com> wrote:
>>> From: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>>
>>> Fixed an error in the "write-accesses" event definition.
>>>
>>> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
>>
>> Acked-by: Frank Li <Frank.li@nxp.com>
>
> Shawn:

Shawn:

Ping.

best regards
Frank Li

>
> Ping
>
> best regards
> Frank Li
>
>>
>>> ---
>>>  arch/arm/mach-imx/mmdc.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
>>> index c03bf28..89a926f 100644
>>> --- a/arch/arm/mach-imx/mmdc.c
>>> +++ b/arch/arm/mach-imx/mmdc.c
>>> @@ -87,7 +87,7 @@ static DEFINE_IDA(mmdc_ida);
>>>  PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00")
>>>  PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01")
>>>  PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02")
>>> -PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03")
>>> +PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03")
>>>  PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04")
>>>  PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB");
>>>  PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001");
>>> --
>>> 2.7.4
>>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 0/2] Add AXI address filter support for MMDC profiling
  2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
@ 2017-03-09 17:21   ` Shawn Guo
  -1 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2017-03-09 17:21 UTC (permalink / raw)
  To: andrei-tiberiu.breana
  Cc: frank.li, mark.rutland, peterz, linux-kernel, acme,
	alexander.shishkin, mingo, lznuaa, linux-arm-kernel

On Wed, Feb 15, 2017 at 02:00:24PM +0200, andrei-tiberiu.breana@nxp.com wrote:
> Tiberiu Breana (2):
>   ARM: imx: Fix mmdc_pmu_write_accesses event definition
>   ARM: imx: Add AXI address filter support for MMDC profiling

Applied both, thanks.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 0/2] Add AXI address filter support for MMDC profiling
@ 2017-03-09 17:21   ` Shawn Guo
  0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2017-03-09 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 15, 2017 at 02:00:24PM +0200, andrei-tiberiu.breana at nxp.com wrote:
> Tiberiu Breana (2):
>   ARM: imx: Fix mmdc_pmu_write_accesses event definition
>   ARM: imx: Add AXI address filter support for MMDC profiling

Applied both, thanks.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-03-09 17:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 12:00 [PATCH v2 0/2] Add AXI address filter support for MMDC profiling andrei-tiberiu.breana
2017-02-15 12:00 ` andrei-tiberiu.breana at nxp.com
2017-02-15 12:00 ` [PATCH v2 1/2] ARM: imx: Fix mmdc_pmu_write_accesses event definition andrei-tiberiu.breana
2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
2017-02-15 14:28   ` Zhi Li
2017-02-15 14:28     ` Zhi Li
2017-02-24 15:47     ` Zhi Li
2017-02-24 15:47       ` Zhi Li
2017-03-07 17:24       ` Zhi Li
2017-03-07 17:24         ` Zhi Li
2017-02-15 12:00 ` [PATCH v2 2/2] ARM: imx: Add AXI address filter support for MMDC profiling andrei-tiberiu.breana
2017-02-15 12:00   ` andrei-tiberiu.breana at nxp.com
2017-02-15 14:29   ` Zhi Li
2017-02-15 14:29     ` Zhi Li
2017-03-09 17:21 ` [PATCH v2 0/2] " Shawn Guo
2017-03-09 17:21   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.