linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support
@ 2020-05-12  7:31 Joakim Zhang
  2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Joakim Zhang @ 2020-05-12  7:31 UTC (permalink / raw)
  To: john.garry, will, mark.rutland, robh+dt, shawnguo
  Cc: linux-imx, linux-arm-kernel, devicetree, linux-kernel

The patch set adds system PMU support for i.MX8 DDR Perf.

The sysfs location for userspace to get the PMU identifier under the
directory:
	/sys/bus/event_source/devices/<PMU DEVICE>/identifier

Joakim Zhang (3):
  perf/imx_ddr: Add system PMU identifier for userspace
  bindings/perf/imx-ddr: update compatible string
  arch: arm64: imx8mq/m/n: remove unused compatible string

 .../devicetree/bindings/perf/fsl-imx-ddr.txt  |  4 +-
 arch/arm64/boot/dts/freescale/imx8mm.dtsi     |  2 +-
 arch/arm64/boot/dts/freescale/imx8mn.dtsi     |  2 +-
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  2 +-
 drivers/perf/fsl_imx8_ddr_perf.c              | 45 +++++++++++++++++--
 5 files changed, 48 insertions(+), 7 deletions(-)

-- 
2.17.1


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

* [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-12  7:31 [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support Joakim Zhang
@ 2020-05-12  7:31 ` Joakim Zhang
  2020-05-19 18:51   ` Rob Herring
  2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
  2020-05-12  7:31 ` [PATCH V1 RESEND 3/3] arch: arm64: imx8mq/m/n: remove unused " Joakim Zhang
  2 siblings, 1 reply; 18+ messages in thread
From: Joakim Zhang @ 2020-05-12  7:31 UTC (permalink / raw)
  To: john.garry, will, mark.rutland, robh+dt, shawnguo
  Cc: linux-imx, linux-arm-kernel, devicetree, linux-kernel

The DDR Perf for i.MX8 is a system PMU whose axi id would different from
SoC to SoC. Need expose system PMU identifier for userspace which refer
to /sys/bus/event_source/devices/<PMU DEVICE>/identifier.

Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 drivers/perf/fsl_imx8_ddr_perf.c | 45 +++++++++++++++++++++++++++++---
 1 file changed, 42 insertions(+), 3 deletions(-)

diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c
index 95dca2cb5265..88addbffbbd0 100644
--- a/drivers/perf/fsl_imx8_ddr_perf.c
+++ b/drivers/perf/fsl_imx8_ddr_perf.c
@@ -50,21 +50,38 @@ static DEFINE_IDA(ddr_ida);
 
 struct fsl_ddr_devtype_data {
 	unsigned int quirks;    /* quirks needed for different DDR Perf core */
+	const char *identifier;	/* system PMU identifier for userspace */
 };
 
-static const struct fsl_ddr_devtype_data imx8_devtype_data;
+static const struct fsl_ddr_devtype_data imx8_devtype_data = {
+	.identifier = "i.MX8",
+};
+
+static const struct fsl_ddr_devtype_data imx8mq_devtype_data = {
+	.quirks = DDR_CAP_AXI_ID_FILTER,
+	.identifier = "i.MX8MQ",
+};
+
+static const struct fsl_ddr_devtype_data imx8mm_devtype_data = {
+	.quirks = DDR_CAP_AXI_ID_FILTER,
+	.identifier = "i.MX8MM",
+};
 
-static const struct fsl_ddr_devtype_data imx8m_devtype_data = {
+static const struct fsl_ddr_devtype_data imx8mn_devtype_data = {
 	.quirks = DDR_CAP_AXI_ID_FILTER,
+	.identifier = "i.MX8MN",
 };
 
 static const struct fsl_ddr_devtype_data imx8mp_devtype_data = {
 	.quirks = DDR_CAP_AXI_ID_FILTER_ENHANCED,
+	.identifier = "i.MX8MP",
 };
 
 static const struct of_device_id imx_ddr_pmu_dt_ids[] = {
 	{ .compatible = "fsl,imx8-ddr-pmu", .data = &imx8_devtype_data},
-	{ .compatible = "fsl,imx8m-ddr-pmu", .data = &imx8m_devtype_data},
+	{ .compatible = "fsl,imx8mq-ddr-pmu", .data = &imx8mq_devtype_data},
+	{ .compatible = "fsl,imx8mm-ddr-pmu", .data = &imx8mm_devtype_data},
+	{ .compatible = "fsl,imx8mn-ddr-pmu", .data = &imx8mn_devtype_data},
 	{ .compatible = "fsl,imx8mp-ddr-pmu", .data = &imx8mp_devtype_data},
 	{ /* sentinel */ }
 };
@@ -84,6 +101,27 @@ struct ddr_pmu {
 	int id;
 };
 
+static ssize_t ddr_perf_identifier_show(struct device *dev,
+					struct device_attribute *attr,
+					char *page)
+{
+	struct ddr_pmu *pmu = dev_get_drvdata(dev);
+
+	return sprintf(page, "%s\n", pmu->devtype_data->identifier);
+}
+
+static struct device_attribute ddr_perf_identifier_attr =
+	__ATTR(identifier, 0444, ddr_perf_identifier_show, NULL);
+
+static struct attribute *ddr_perf_identifier_attrs[] = {
+	&ddr_perf_identifier_attr.attr,
+	NULL,
+};
+
+static struct attribute_group ddr_perf_identifier_attr_group = {
+	.attrs = ddr_perf_identifier_attrs,
+};
+
 enum ddr_perf_filter_capabilities {
 	PERF_CAP_AXI_ID_FILTER = 0,
 	PERF_CAP_AXI_ID_FILTER_ENHANCED,
@@ -237,6 +275,7 @@ static const struct attribute_group *attr_groups[] = {
 	&ddr_perf_format_attr_group,
 	&ddr_perf_cpumask_attr_group,
 	&ddr_perf_filter_cap_attr_group,
+	&ddr_perf_identifier_attr_group,
 	NULL,
 };
 
-- 
2.17.1


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

* [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string
  2020-05-12  7:31 [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support Joakim Zhang
  2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
@ 2020-05-12  7:31 ` Joakim Zhang
  2020-05-19 18:47   ` Rob Herring
  2020-07-15 11:03   ` John Garry
  2020-05-12  7:31 ` [PATCH V1 RESEND 3/3] arch: arm64: imx8mq/m/n: remove unused " Joakim Zhang
  2 siblings, 2 replies; 18+ messages in thread
From: Joakim Zhang @ 2020-05-12  7:31 UTC (permalink / raw)
  To: john.garry, will, mark.rutland, robh+dt, shawnguo
  Cc: linux-imx, linux-arm-kernel, devicetree, linux-kernel

Update compatible string according to driver change.`

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
index 7822a806ea0a..b27a1d4fec78 100644
--- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
+++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
@@ -4,7 +4,9 @@ Required properties:
 
 - compatible: should be one of:
 	"fsl,imx8-ddr-pmu"
-	"fsl,imx8m-ddr-pmu"
+	"fsl,imx8mq-ddr-pmu"
+	"fsl,imx8mm-ddr-pmu"
+	"fsl,imx8mn-ddr-pmu"
 	"fsl,imx8mp-ddr-pmu"
 
 - reg: physical address and size
-- 
2.17.1


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

* [PATCH V1 RESEND 3/3] arch: arm64: imx8mq/m/n: remove unused compatible string
  2020-05-12  7:31 [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support Joakim Zhang
  2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
  2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
@ 2020-05-12  7:31 ` Joakim Zhang
  2 siblings, 0 replies; 18+ messages in thread
From: Joakim Zhang @ 2020-05-12  7:31 UTC (permalink / raw)
  To: john.garry, will, mark.rutland, robh+dt, shawnguo
  Cc: linux-imx, linux-arm-kernel, devicetree, linux-kernel

Remove the unused compatible string.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 1e5e11592f7b..136a6653252c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -894,7 +894,7 @@
 		};
 
 		ddr-pmu@3d800000 {
-			compatible = "fsl,imx8mm-ddr-pmu", "fsl,imx8m-ddr-pmu";
+			compatible = "fsl,imx8mm-ddr-pmu";
 			reg = <0x3d800000 0x400000>;
 			interrupt-parent = <&gic>;
 			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index a44b5438e842..76c8db04b4f7 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -793,7 +793,7 @@
 		};
 
 		ddr-pmu@3d800000 {
-			compatible = "fsl,imx8mn-ddr-pmu", "fsl,imx8m-ddr-pmu";
+			compatible = "fsl,imx8mn-ddr-pmu";
 			reg = <0x3d800000 0x400000>;
 			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
 		};
diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 6a1e83922c71..970ffcc664b8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -1213,7 +1213,7 @@
 		};
 
 		ddr-pmu@3d800000 {
-			compatible = "fsl,imx8mq-ddr-pmu", "fsl,imx8m-ddr-pmu";
+			compatible = "fsl,imx8mq-ddr-pmu";
 			reg = <0x3d800000 0x400000>;
 			interrupt-parent = <&gic>;
 			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.17.1


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

* Re: [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string
  2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
@ 2020-05-19 18:47   ` Rob Herring
  2020-07-15 11:03   ` John Garry
  1 sibling, 0 replies; 18+ messages in thread
From: Rob Herring @ 2020-05-19 18:47 UTC (permalink / raw)
  To: Joakim Zhang
  Cc: john.garry, will, mark.rutland, shawnguo, linux-imx,
	linux-arm-kernel, devicetree, linux-kernel

On Tue, May 12, 2020 at 03:31:14PM +0800, Joakim Zhang wrote:
> Update compatible string according to driver change.`

Why?

You are breaking compatibility.

> 
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
>  Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> index 7822a806ea0a..b27a1d4fec78 100644
> --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> @@ -4,7 +4,9 @@ Required properties:
>  
>  - compatible: should be one of:
>  	"fsl,imx8-ddr-pmu"
> -	"fsl,imx8m-ddr-pmu"
> +	"fsl,imx8mq-ddr-pmu"
> +	"fsl,imx8mm-ddr-pmu"
> +	"fsl,imx8mn-ddr-pmu"
>  	"fsl,imx8mp-ddr-pmu"
>  
>  - reg: physical address and size
> -- 
> 2.17.1
> 

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
@ 2020-05-19 18:51   ` Rob Herring
  2020-05-20  2:56     ` Joakim Zhang
  2020-05-20  7:33     ` Will Deacon
  0 siblings, 2 replies; 18+ messages in thread
From: Rob Herring @ 2020-05-19 18:51 UTC (permalink / raw)
  To: Joakim Zhang
  Cc: john.garry, will, mark.rutland, shawnguo, linux-imx,
	linux-arm-kernel, devicetree, linux-kernel

On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> The DDR Perf for i.MX8 is a system PMU whose axi id would different from
> SoC to SoC. Need expose system PMU identifier for userspace which refer
> to /sys/bus/event_source/devices/<PMU DEVICE>/identifier.

Why not just expose the AXI ID if that's what's different?

> 
> Reviewed-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
>  drivers/perf/fsl_imx8_ddr_perf.c | 45 +++++++++++++++++++++++++++++---
>  1 file changed, 42 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c
> index 95dca2cb5265..88addbffbbd0 100644
> --- a/drivers/perf/fsl_imx8_ddr_perf.c
> +++ b/drivers/perf/fsl_imx8_ddr_perf.c
> @@ -50,21 +50,38 @@ static DEFINE_IDA(ddr_ida);
>  
>  struct fsl_ddr_devtype_data {
>  	unsigned int quirks;    /* quirks needed for different DDR Perf core */
> +	const char *identifier;	/* system PMU identifier for userspace */
>  };
>  
> -static const struct fsl_ddr_devtype_data imx8_devtype_data;
> +static const struct fsl_ddr_devtype_data imx8_devtype_data = {
> +	.identifier = "i.MX8",
> +};
> +
> +static const struct fsl_ddr_devtype_data imx8mq_devtype_data = {
> +	.quirks = DDR_CAP_AXI_ID_FILTER,
> +	.identifier = "i.MX8MQ",
> +};
> +
> +static const struct fsl_ddr_devtype_data imx8mm_devtype_data = {
> +	.quirks = DDR_CAP_AXI_ID_FILTER,
> +	.identifier = "i.MX8MM",
> +};
>  
> -static const struct fsl_ddr_devtype_data imx8m_devtype_data = {
> +static const struct fsl_ddr_devtype_data imx8mn_devtype_data = {
>  	.quirks = DDR_CAP_AXI_ID_FILTER,
> +	.identifier = "i.MX8MN",
>  };
>  
>  static const struct fsl_ddr_devtype_data imx8mp_devtype_data = {
>  	.quirks = DDR_CAP_AXI_ID_FILTER_ENHANCED,
> +	.identifier = "i.MX8MP",
>  };
>  
>  static const struct of_device_id imx_ddr_pmu_dt_ids[] = {
>  	{ .compatible = "fsl,imx8-ddr-pmu", .data = &imx8_devtype_data},
> -	{ .compatible = "fsl,imx8m-ddr-pmu", .data = &imx8m_devtype_data},

You need to keep the old one for compatibility.

> +	{ .compatible = "fsl,imx8mq-ddr-pmu", .data = &imx8mq_devtype_data},
> +	{ .compatible = "fsl,imx8mm-ddr-pmu", .data = &imx8mm_devtype_data},
> +	{ .compatible = "fsl,imx8mn-ddr-pmu", .data = &imx8mn_devtype_data},
>  	{ .compatible = "fsl,imx8mp-ddr-pmu", .data = &imx8mp_devtype_data},
>  	{ /* sentinel */ }
>  };
> @@ -84,6 +101,27 @@ struct ddr_pmu {
>  	int id;
>  };
>  
> +static ssize_t ddr_perf_identifier_show(struct device *dev,
> +					struct device_attribute *attr,
> +					char *page)
> +{
> +	struct ddr_pmu *pmu = dev_get_drvdata(dev);
> +
> +	return sprintf(page, "%s\n", pmu->devtype_data->identifier);

Why do we need yet another way to identify the SoC from userspace?

> +}
> +
> +static struct device_attribute ddr_perf_identifier_attr =
> +	__ATTR(identifier, 0444, ddr_perf_identifier_show, NULL);

sysfs attributes are supposed to be documented.

> +
> +static struct attribute *ddr_perf_identifier_attrs[] = {
> +	&ddr_perf_identifier_attr.attr,
> +	NULL,
> +};
> +
> +static struct attribute_group ddr_perf_identifier_attr_group = {
> +	.attrs = ddr_perf_identifier_attrs,
> +};
> +
>  enum ddr_perf_filter_capabilities {
>  	PERF_CAP_AXI_ID_FILTER = 0,
>  	PERF_CAP_AXI_ID_FILTER_ENHANCED,
> @@ -237,6 +275,7 @@ static const struct attribute_group *attr_groups[] = {
>  	&ddr_perf_format_attr_group,
>  	&ddr_perf_cpumask_attr_group,
>  	&ddr_perf_filter_cap_attr_group,
> +	&ddr_perf_identifier_attr_group,
>  	NULL,
>  };
>  
> -- 
> 2.17.1
> 

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

* RE: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-19 18:51   ` Rob Herring
@ 2020-05-20  2:56     ` Joakim Zhang
  2020-05-20 15:10       ` Rob Herring
  2020-05-20  7:33     ` Will Deacon
  1 sibling, 1 reply; 18+ messages in thread
From: Joakim Zhang @ 2020-05-20  2:56 UTC (permalink / raw)
  To: Rob Herring
  Cc: john.garry, will, mark.rutland, shawnguo, dl-linux-imx,
	linux-arm-kernel, devicetree, linux-kernel


> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: 2020年5月20日 2:51
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: john.garry@huawei.com; will@kernel.org; mark.rutland@arm.com;
> shawnguo@kernel.org; dl-linux-imx <linux-imx@nxp.com>;
> linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier
> for userspace
> 
> On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > The DDR Perf for i.MX8 is a system PMU whose axi id would different
> > from SoC to SoC. Need expose system PMU identifier for userspace which
> > refer to /sys/bus/event_source/devices/<PMU DEVICE>/identifier.
> 
> Why not just expose the AXI ID if that's what's different?

Hi Rob,

Each master has their own AXI ID, such as USB, GPU, VPU etc, it is various from different SoCs. We want to add system PMU support in perf tool, so we want to expose something from perf driver to identify each SoC.
When we know which SoC it is, we can get each master AXI ID. If this patch can be accepted, /sys/bus/event_source/devices/<PMU DEVICE>/identifier could be a common interface for all system PMUs.

I will change to add a property to identify SoC, to see if it is better. Thanks.

Best Regards,
Joakim Zhang
> >
> > Reviewed-by: John Garry <john.garry@huawei.com>
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> > ---
> >  drivers/perf/fsl_imx8_ddr_perf.c | 45
> > +++++++++++++++++++++++++++++---
> >  1 file changed, 42 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/perf/fsl_imx8_ddr_perf.c
> > b/drivers/perf/fsl_imx8_ddr_perf.c
> > index 95dca2cb5265..88addbffbbd0 100644
> > --- a/drivers/perf/fsl_imx8_ddr_perf.c
> > +++ b/drivers/perf/fsl_imx8_ddr_perf.c
> > @@ -50,21 +50,38 @@ static DEFINE_IDA(ddr_ida);
> >
> >  struct fsl_ddr_devtype_data {
> >  	unsigned int quirks;    /* quirks needed for different DDR Perf core */
> > +	const char *identifier;	/* system PMU identifier for userspace */
> >  };
> >
> > -static const struct fsl_ddr_devtype_data imx8_devtype_data;
> > +static const struct fsl_ddr_devtype_data imx8_devtype_data = {
> > +	.identifier = "i.MX8",
> > +};
> > +
> > +static const struct fsl_ddr_devtype_data imx8mq_devtype_data = {
> > +	.quirks = DDR_CAP_AXI_ID_FILTER,
> > +	.identifier = "i.MX8MQ",
> > +};
> > +
> > +static const struct fsl_ddr_devtype_data imx8mm_devtype_data = {
> > +	.quirks = DDR_CAP_AXI_ID_FILTER,
> > +	.identifier = "i.MX8MM",
> > +};
> >
> > -static const struct fsl_ddr_devtype_data imx8m_devtype_data = {
> > +static const struct fsl_ddr_devtype_data imx8mn_devtype_data = {
> >  	.quirks = DDR_CAP_AXI_ID_FILTER,
> > +	.identifier = "i.MX8MN",
> >  };
> >
> >  static const struct fsl_ddr_devtype_data imx8mp_devtype_data = {
> >  	.quirks = DDR_CAP_AXI_ID_FILTER_ENHANCED,
> > +	.identifier = "i.MX8MP",
> >  };
> >
> >  static const struct of_device_id imx_ddr_pmu_dt_ids[] = {
> >  	{ .compatible = "fsl,imx8-ddr-pmu", .data = &imx8_devtype_data},
> > -	{ .compatible = "fsl,imx8m-ddr-pmu", .data = &imx8m_devtype_data},
> 
> You need to keep the old one for compatibility.
> 
> > +	{ .compatible = "fsl,imx8mq-ddr-pmu", .data = &imx8mq_devtype_data},
> > +	{ .compatible = "fsl,imx8mm-ddr-pmu", .data = &imx8mm_devtype_data},
> > +	{ .compatible = "fsl,imx8mn-ddr-pmu", .data = &imx8mn_devtype_data},
> >  	{ .compatible = "fsl,imx8mp-ddr-pmu", .data = &imx8mp_devtype_data},
> >  	{ /* sentinel */ }
> >  };
> > @@ -84,6 +101,27 @@ struct ddr_pmu {
> >  	int id;
> >  };
> >
> > +static ssize_t ddr_perf_identifier_show(struct device *dev,
> > +					struct device_attribute *attr,
> > +					char *page)
> > +{
> > +	struct ddr_pmu *pmu = dev_get_drvdata(dev);
> > +
> > +	return sprintf(page, "%s\n", pmu->devtype_data->identifier);
> 
> Why do we need yet another way to identify the SoC from userspace?
> 
> > +}
> > +
> > +static struct device_attribute ddr_perf_identifier_attr =
> > +	__ATTR(identifier, 0444, ddr_perf_identifier_show, NULL);
> 
> sysfs attributes are supposed to be documented.
> 
> > +
> > +static struct attribute *ddr_perf_identifier_attrs[] = {
> > +	&ddr_perf_identifier_attr.attr,
> > +	NULL,
> > +};
> > +
> > +static struct attribute_group ddr_perf_identifier_attr_group = {
> > +	.attrs = ddr_perf_identifier_attrs,
> > +};
> > +
> >  enum ddr_perf_filter_capabilities {
> >  	PERF_CAP_AXI_ID_FILTER = 0,
> >  	PERF_CAP_AXI_ID_FILTER_ENHANCED,
> > @@ -237,6 +275,7 @@ static const struct attribute_group *attr_groups[] = {
> >  	&ddr_perf_format_attr_group,
> >  	&ddr_perf_cpumask_attr_group,
> >  	&ddr_perf_filter_cap_attr_group,
> > +	&ddr_perf_identifier_attr_group,
> >  	NULL,
> >  };
> >
> > --
> > 2.17.1
> >

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-19 18:51   ` Rob Herring
  2020-05-20  2:56     ` Joakim Zhang
@ 2020-05-20  7:33     ` Will Deacon
  2020-05-20 15:23       ` Rob Herring
  2020-05-21 13:26       ` Mark Rutland
  1 sibling, 2 replies; 18+ messages in thread
From: Will Deacon @ 2020-05-20  7:33 UTC (permalink / raw)
  To: Rob Herring
  Cc: Joakim Zhang, john.garry, mark.rutland, shawnguo, linux-imx,
	linux-arm-kernel, devicetree, linux-kernel

On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
> On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > +static ssize_t ddr_perf_identifier_show(struct device *dev,
> > +					struct device_attribute *attr,
> > +					char *page)
> > +{
> > +	struct ddr_pmu *pmu = dev_get_drvdata(dev);
> > +
> > +	return sprintf(page, "%s\n", pmu->devtype_data->identifier);
> 
> Why do we need yet another way to identify the SoC from userspace?

I also really dislike this. What's the preferred way to identify the SoC
from userspace? It's needed so that the perf userspace tool can describe
perf events that are supported for the PMU, as this isn't probe-able
directly from the hardware. We have the same issue with the SMMUv3 PMCG [1],
and so we need to solve the problem for both DT and ACPI.

Will

[1] https://lore.kernel.org/r/1587120634-19666-1-git-send-email-john.garry@huawei.com

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-20  2:56     ` Joakim Zhang
@ 2020-05-20 15:10       ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2020-05-20 15:10 UTC (permalink / raw)
  To: Joakim Zhang
  Cc: john.garry, will, mark.rutland, shawnguo, dl-linux-imx,
	linux-arm-kernel, devicetree, linux-kernel

On Tue, May 19, 2020 at 8:56 PM Joakim Zhang <qiangqing.zhang@nxp.com> wrote:
>
>
> > -----Original Message-----
> > From: Rob Herring <robh@kernel.org>
> > Sent: 2020年5月20日 2:51
> > To: Joakim Zhang <qiangqing.zhang@nxp.com>
> > Cc: john.garry@huawei.com; will@kernel.org; mark.rutland@arm.com;
> > shawnguo@kernel.org; dl-linux-imx <linux-imx@nxp.com>;
> > linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org;
> > linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier
> > for userspace
> >
> > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > > The DDR Perf for i.MX8 is a system PMU whose axi id would different
> > > from SoC to SoC. Need expose system PMU identifier for userspace which
> > > refer to /sys/bus/event_source/devices/<PMU DEVICE>/identifier.
> >
> > Why not just expose the AXI ID if that's what's different?
>
> Hi Rob,
>
> Each master has their own AXI ID, such as USB, GPU, VPU etc, it is various from different SoCs. We want to add system PMU support in perf tool, so we want to expose something from perf driver to identify each SoC.
> When we know which SoC it is, we can get each master AXI ID. If this patch can be accepted, /sys/bus/event_source/devices/<PMU DEVICE>/identifier could be a common interface for all system PMUs.
>
> I will change to add a property to identify SoC, to see if it is better. Thanks.

Isn't that what you have already with this patch? My point is you can
already read /proc/device-tree/compatible, read the PMU compatible, or
have an SoC device which exposes SoC info.

Rob

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-20  7:33     ` Will Deacon
@ 2020-05-20 15:23       ` Rob Herring
  2020-05-21 13:04         ` Will Deacon
  2020-05-21 13:26       ` Mark Rutland
  1 sibling, 1 reply; 18+ messages in thread
From: Rob Herring @ 2020-05-20 15:23 UTC (permalink / raw)
  To: Will Deacon
  Cc: Joakim Zhang, John Garry, Mark Rutland, Shawn Guo,
	NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

On Wed, May 20, 2020 at 1:33 AM Will Deacon <will@kernel.org> wrote:
>
> On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
> > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > > +static ssize_t ddr_perf_identifier_show(struct device *dev,
> > > +                                   struct device_attribute *attr,
> > > +                                   char *page)
> > > +{
> > > +   struct ddr_pmu *pmu = dev_get_drvdata(dev);
> > > +
> > > +   return sprintf(page, "%s\n", pmu->devtype_data->identifier);
> >
> > Why do we need yet another way to identify the SoC from userspace?
>
> I also really dislike this. What's the preferred way to identify the SoC
> from userspace?

/proc/cpuinfo? ;)

For an non-firmware specific case, I'd say soc_device should be. I'd
guess ACPI systems don't use it and for them it's dmidecode typically.
The other problem I have with soc_device is it is optional.

> It's needed so that the perf userspace tool can describe
> perf events that are supported for the PMU, as this isn't probe-able
> directly from the hardware. We have the same issue with the SMMUv3 PMCG [1],
> and so we need to solve the problem for both DT and ACPI.
>
> Will
>
> [1] https://lore.kernel.org/r/1587120634-19666-1-git-send-email-john.garry@huawei.com

At a minimum, it seems like 'identifier' should be moved into the perf
core if that's an attr we want to keep.

Rob

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-20 15:23       ` Rob Herring
@ 2020-05-21 13:04         ` Will Deacon
  2020-05-21 14:00           ` John Garry
  0 siblings, 1 reply; 18+ messages in thread
From: Will Deacon @ 2020-05-21 13:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Joakim Zhang, John Garry, Mark Rutland, Shawn Guo,
	NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

On Wed, May 20, 2020 at 09:23:41AM -0600, Rob Herring wrote:
> On Wed, May 20, 2020 at 1:33 AM Will Deacon <will@kernel.org> wrote:
> >
> > On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
> > > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > > > +static ssize_t ddr_perf_identifier_show(struct device *dev,
> > > > +                                   struct device_attribute *attr,
> > > > +                                   char *page)
> > > > +{
> > > > +   struct ddr_pmu *pmu = dev_get_drvdata(dev);
> > > > +
> > > > +   return sprintf(page, "%s\n", pmu->devtype_data->identifier);
> > >
> > > Why do we need yet another way to identify the SoC from userspace?
> >
> > I also really dislike this. What's the preferred way to identify the SoC
> > from userspace?
> 
> /proc/cpuinfo? ;)

The *SoC*!

> For an non-firmware specific case, I'd say soc_device should be. I'd
> guess ACPI systems don't use it and for them it's dmidecode typically.
> The other problem I have with soc_device is it is optional.

John -- what do you think about using soc_device to expose this information,
with ACPI systems using DMI data instead?

Will

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-20  7:33     ` Will Deacon
  2020-05-20 15:23       ` Rob Herring
@ 2020-05-21 13:26       ` Mark Rutland
  2020-05-21 14:16         ` John Garry
  1 sibling, 1 reply; 18+ messages in thread
From: Mark Rutland @ 2020-05-21 13:26 UTC (permalink / raw)
  To: Will Deacon
  Cc: Rob Herring, Joakim Zhang, john.garry, shawnguo, linux-imx,
	linux-arm-kernel, devicetree, linux-kernel

On Wed, May 20, 2020 at 08:33:04AM +0100, Will Deacon wrote:
> On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
> > On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
> > > +static ssize_t ddr_perf_identifier_show(struct device *dev,
> > > +					struct device_attribute *attr,
> > > +					char *page)
> > > +{
> > > +	struct ddr_pmu *pmu = dev_get_drvdata(dev);
> > > +
> > > +	return sprintf(page, "%s\n", pmu->devtype_data->identifier);
> > 
> > Why do we need yet another way to identify the SoC from userspace?
> 
> I also really dislike this. What's the preferred way to identify the SoC
> from userspace? It's needed so that the perf userspace tool can describe
> perf events that are supported for the PMU, as this isn't probe-able
> directly from the hardware. We have the same issue with the SMMUv3 PMCG [1],
> and so we need to solve the problem for both DT and ACPI.

Worth noting that while in this case it happens to identify the SoC,
in general you can have distinct instances of system IP in a single
system, so I do think that we need *something* instance-specific, even
if that's combined with SoC info.

Where IP gets reused across SoCs, it makes sense for that to not depend
on top-level SoC info.

Thanks,
Mark.

> 
> Will
> 
> [1] https://lore.kernel.org/r/1587120634-19666-1-git-send-email-john.garry@huawei.com

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-21 13:04         ` Will Deacon
@ 2020-05-21 14:00           ` John Garry
  2020-05-27 14:34             ` John Garry
  0 siblings, 1 reply; 18+ messages in thread
From: John Garry @ 2020-05-21 14:00 UTC (permalink / raw)
  To: Will Deacon, Rob Herring
  Cc: Joakim Zhang, Mark Rutland, Shawn Guo, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

On 21/05/2020 14:04, Will Deacon wrote:
> On Wed, May 20, 2020 at 09:23:41AM -0600, Rob Herring wrote:
>> On Wed, May 20, 2020 at 1:33 AM Will Deacon <will@kernel.org> wrote:
>>>
>>> On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
>>>> On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
>>>>> +static ssize_t ddr_perf_identifier_show(struct device *dev,
>>>>> +                                   struct device_attribute *attr,
>>>>> +                                   char *page)
>>>>> +{
>>>>> +   struct ddr_pmu *pmu = dev_get_drvdata(dev);
>>>>> +
>>>>> +   return sprintf(page, "%s\n", pmu->devtype_data->identifier);
>>>>
>>>> Why do we need yet another way to identify the SoC from userspace?
>>>
>>> I also really dislike this. What's the preferred way to identify the SoC
>>> from userspace?
>>
>> /proc/cpuinfo? ;)
> 
> The *SoC*!
> 
>> For an non-firmware specific case, I'd say soc_device should be. I'd
>> guess ACPI systems don't use it and for them it's dmidecode typically.
>> The other problem I have with soc_device is it is optional.
> 

Hi Will,

> John -- what do you think about using soc_device to expose this information,
> with ACPI systems using DMI data instead?

Generally I don't think that DMI is reliable, and I saw this as the 
least preferred choice. I'm looking at the sysfs DMI info for my dev 
board, and I don't even see anything like a SoC identifier.

As for the event_source device sysfs identifier file, it would not 
always contain effectively the same as the SoC ID.

Certain PMUs which I'm interested in plan to have probe-able 
identification info available in future.

Thanks,
John




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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-21 13:26       ` Mark Rutland
@ 2020-05-21 14:16         ` John Garry
  0 siblings, 0 replies; 18+ messages in thread
From: John Garry @ 2020-05-21 14:16 UTC (permalink / raw)
  To: Mark Rutland, Will Deacon
  Cc: Rob Herring, Joakim Zhang, shawnguo, linux-imx, linux-arm-kernel,
	devicetree, linux-kernel

On 21/05/2020 14:26, Mark Rutland wrote:
> On Wed, May 20, 2020 at 08:33:04AM +0100, Will Deacon wrote:
>> On Tue, May 19, 2020 at 12:51:25PM -0600, Rob Herring wrote:
>>> On Tue, May 12, 2020 at 03:31:13PM +0800, Joakim Zhang wrote:
>>>> +static ssize_t ddr_perf_identifier_show(struct device *dev,
>>>> +					struct device_attribute *attr,
>>>> +					char *page)
>>>> +{
>>>> +	struct ddr_pmu *pmu = dev_get_drvdata(dev);
>>>> +
>>>> +	return sprintf(page, "%s\n", pmu->devtype_data->identifier);
>>>
>>> Why do we need yet another way to identify the SoC from userspace?
>>
>> I also really dislike this. What's the preferred way to identify the SoC
>> from userspace? It's needed so that the perf userspace tool can describe
>> perf events that are supported for the PMU, as this isn't probe-able
>> directly from the hardware. We have the same issue with the SMMUv3 PMCG [1],
>> and so we need to solve the problem for both DT and ACPI.
> 
> Worth noting that while in this case it happens to identify the SoC,
> in general you can have distinct instances of system IP in a single
> system, so I do think that we need *something* instance-specific, even
> if that's combined with SoC info.
> 

Hi Mark,

> Where IP gets reused across SoCs, it makes sense for that to not depend
> on top-level SoC info.

This would be quite an uncommon case. Generally most instances of a 
given PMU in a SoC would be identical implementations.

And anyway, we should be able to solve that problem in perf tool, as 
long as the PMU device name is fixed. Like what we have for the SMMUv3 
PMU, where the device name contains the device bus address, i.e don't 
use idr for perf drivers device naming....

Thanks,
John

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-21 14:00           ` John Garry
@ 2020-05-27 14:34             ` John Garry
  2020-05-28  1:35               ` Shaokun Zhang
  0 siblings, 1 reply; 18+ messages in thread
From: John Garry @ 2020-05-27 14:34 UTC (permalink / raw)
  To: Will Deacon, Rob Herring
  Cc: Mark Rutland, devicetree, Joakim Zhang, linux-kernel,
	NXP Linux Team, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhangshaokun

>>>>
>>>> I also really dislike this. What's the preferred way to identify the 
>>>> SoC
>>>> from userspace?
>>>
>>> /proc/cpuinfo? ;)
>>
>> The *SoC*!
>>
>>> For an non-firmware specific case, I'd say soc_device should be. I'd
>>> guess ACPI systems don't use it and for them it's dmidecode typically.
>>> The other problem I have with soc_device is it is optional.
>>
> 
> Hi Will,
> 
>> John -- what do you think about using soc_device to expose this 
>> information,
>> with ACPI systems using DMI data instead?
> 
> Generally I don't think that DMI is reliable, and I saw this as the 
> least preferred choice. I'm looking at the sysfs DMI info for my dev 
> board, and I don't even see anything like a SoC identifier.
> 
> As for the event_source device sysfs identifier file, it would not 
> always contain effectively the same as the SoC ID.
> 
> Certain PMUs which I'm interested in plan to have probe-able 
> identification info available in future.
> 

BTW, Shaokun now tells me that the HiSi uncore PMU HW have such 
registers to identify the implementation. I didn't know.

So we could add that identifier file for those PMUs as proof-of-concept, 
exposing that register.

As for other PMUs which I'm interested in, again, future versions should 
have such registers to self-identify.

So using something derived from the DT compat string would hopefully be 
the uncommon case.

Cheers,
John

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

* Re: [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace
  2020-05-27 14:34             ` John Garry
@ 2020-05-28  1:35               ` Shaokun Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Shaokun Zhang @ 2020-05-28  1:35 UTC (permalink / raw)
  To: John Garry, Will Deacon, Rob Herring
  Cc: Mark Rutland, devicetree, Joakim Zhang, linux-kernel,
	NXP Linux Team, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi,

On 2020/5/27 22:34, John Garry wrote:
>>>>>
>>>>> I also really dislike this. What's the preferred way to identify the SoC
>>>>> from userspace?
>>>>
>>>> /proc/cpuinfo? ;)
>>>
>>> The *SoC*!
>>>
>>>> For an non-firmware specific case, I'd say soc_device should be. I'd
>>>> guess ACPI systems don't use it and for them it's dmidecode typically.
>>>> The other problem I have with soc_device is it is optional.
>>>
>>
>> Hi Will,
>>
>>> John -- what do you think about using soc_device to expose this information,
>>> with ACPI systems using DMI data instead?
>>
>> Generally I don't think that DMI is reliable, and I saw this as the least preferred choice. I'm looking at the sysfs DMI info for my dev board, and I don't even see anything like a SoC identifier.
>>
>> As for the event_source device sysfs identifier file, it would not always contain effectively the same as the SoC ID.
>>
>> Certain PMUs which I'm interested in plan to have probe-able identification info available in future.
>>
> 
> BTW, Shaokun now tells me that the HiSi uncore PMU HW have such registers to identify the implementation. I didn't know.
> 

Right, we have this register which shows the PMU version.

Thanks,
Shaokun


> So we could add that identifier file for those PMUs as proof-of-concept, exposing that register.
> 
> As for other PMUs which I'm interested in, again, future versions should have such registers to self-identify.
> 
> So using something derived from the DT compat string would hopefully be the uncommon case.
> 
> Cheers,
> John
> 
> .
> 


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

* Re: [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string
  2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
  2020-05-19 18:47   ` Rob Herring
@ 2020-07-15 11:03   ` John Garry
  2020-07-20  8:57     ` Joakim Zhang
  1 sibling, 1 reply; 18+ messages in thread
From: John Garry @ 2020-07-15 11:03 UTC (permalink / raw)
  To: Joakim Zhang, will, mark.rutland, robh+dt, shawnguo
  Cc: linux-imx, linux-arm-kernel, devicetree, linux-kernel

On 12/05/2020 08:31, Joakim Zhang wrote:
> Update compatible string according to driver change.`
> 
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
>   Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> index 7822a806ea0a..b27a1d4fec78 100644
> --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> @@ -4,7 +4,9 @@ Required properties:
>   

Hi Joakim,

>   - compatible: should be one of:
>   	"fsl,imx8-ddr-pmu"
> -	"fsl,imx8m-ddr-pmu"
> +	"fsl,imx8mq-ddr-pmu"
> +	"fsl,imx8mm-ddr-pmu"

I noticed that some of the compat strings being added are used in imx 
dtsi files today:

john@localhost:~/linux> git grep "fsl,imx8mm-ddr-pmu"
arch/arm64/boot/dts/freescale/imx8mm.dtsi:  compatible = 
"fsl,imx8mm-ddr-pmu", "fsl,imx8m-ddr-pmu";

Any specific reason why they are not described in the dt bindings already?

I don't follow dt so much anymore, so don't know the policies.

> +	"fsl,imx8mn-ddr-pmu"

Thanks,
John


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

* RE: [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string
  2020-07-15 11:03   ` John Garry
@ 2020-07-20  8:57     ` Joakim Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Joakim Zhang @ 2020-07-20  8:57 UTC (permalink / raw)
  To: John Garry, will, mark.rutland, robh+dt, shawnguo
  Cc: dl-linux-imx, linux-arm-kernel, devicetree, linux-kernel


> -----Original Message-----
> From: John Garry <john.garry@huawei.com>
> Sent: 2020年7月15日 19:04
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; will@kernel.org;
> mark.rutland@arm.com; robh+dt@kernel.org; shawnguo@kernel.org
> Cc: dl-linux-imx <linux-imx@nxp.com>; linux-arm-kernel@lists.infradead.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible
> string
> 
> On 12/05/2020 08:31, Joakim Zhang wrote:
> > Update compatible string according to driver change.`
> >
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> > ---
> >   Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> > b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> > index 7822a806ea0a..b27a1d4fec78 100644
> > --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> > +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt
> > @@ -4,7 +4,9 @@ Required properties:
> >
> 
> Hi Joakim,
> 
> >   - compatible: should be one of:
> >   	"fsl,imx8-ddr-pmu"
> > -	"fsl,imx8m-ddr-pmu"
> > +	"fsl,imx8mq-ddr-pmu"
> > +	"fsl,imx8mm-ddr-pmu"
> 
> I noticed that some of the compat strings being added are used in imx dtsi files
> today:
> 
> john@localhost:~/linux> git grep "fsl,imx8mm-ddr-pmu"
> arch/arm64/boot/dts/freescale/imx8mm.dtsi:  compatible =
> "fsl,imx8mm-ddr-pmu", "fsl,imx8m-ddr-pmu";
> 
> Any specific reason why they are not described in the dt bindings already?
> 
> I don't follow dt so much anymore, so don't know the policies.

Hi John,

What I did is not standard, any compat string in dts file should be described in the dt bindings. I will keep in mind.

Best Regards,
Joakim Zhang
> > +	"fsl,imx8mn-ddr-pmu"
> 
> Thanks,
> John


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

end of thread, other threads:[~2020-07-20  8:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  7:31 [PATCH V1 RESEND 0/3] perf/imx_ddr: Add system PMU support Joakim Zhang
2020-05-12  7:31 ` [PATCH V1 RESEND 1/3] perf/imx_ddr: Add system PMU identifier for userspace Joakim Zhang
2020-05-19 18:51   ` Rob Herring
2020-05-20  2:56     ` Joakim Zhang
2020-05-20 15:10       ` Rob Herring
2020-05-20  7:33     ` Will Deacon
2020-05-20 15:23       ` Rob Herring
2020-05-21 13:04         ` Will Deacon
2020-05-21 14:00           ` John Garry
2020-05-27 14:34             ` John Garry
2020-05-28  1:35               ` Shaokun Zhang
2020-05-21 13:26       ` Mark Rutland
2020-05-21 14:16         ` John Garry
2020-05-12  7:31 ` [PATCH V1 RESEND 2/3] bindings/perf/imx-ddr: update compatible string Joakim Zhang
2020-05-19 18:47   ` Rob Herring
2020-07-15 11:03   ` John Garry
2020-07-20  8:57     ` Joakim Zhang
2020-05-12  7:31 ` [PATCH V1 RESEND 3/3] arch: arm64: imx8mq/m/n: remove unused " Joakim Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).