linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver
       [not found] <CGME20200712165509epcas5p29e66777a4e0115420b9104ba5aa83f57@epcas5p2.samsung.com>
@ 2020-07-12 16:33 ` Ajay Kumar
       [not found]   ` <CGME20200712165515epcas5p40c387cdd22a336cfb3ae3b2d011fbb6f@epcas5p4.samsung.com>
                     ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Ajay Kumar @ 2020-07-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, Ajay Kumar,
	alim.akhtar, robin.murphy, joro

Currently, only those platforms using ACPI can enable
arm_smmuv3_pmu driver. This patchset adds support for
enabling arm_smmuv3_pmu driver on platforms which do not
enable ACPI and instead rely on DT.

Ajay Kumar (4):
  perf/smmuv3: Remove dependency on CONFIG_ACPI
  Documentation: perf: Add documentation for arm-smmu-v3-pmcg
  perf/smmuv3: add device tree support
  perf/smmuv3: fix crash when platdata not specified

 .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
 drivers/perf/Kconfig                          |  2 +-
 drivers/perf/arm_smmuv3_pmu.c                 | 11 ++++++++--
 3 files changed, 31 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/4] perf/smmuv3: Remove dependency on CONFIG_ACPI
       [not found]   ` <CGME20200712165515epcas5p40c387cdd22a336cfb3ae3b2d011fbb6f@epcas5p4.samsung.com>
@ 2020-07-12 16:33     ` Ajay Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Ajay Kumar @ 2020-07-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, Ajay Kumar,
	alim.akhtar, robin.murphy, joro

This patch removes CONFIG_ACPI dependency for arm_smmuv3_pmu
driver so that we can build it on platforms which don't enable ACPI.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/perf/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
index a9261cf48293..8c99445a3de0 100644
--- a/drivers/perf/Kconfig
+++ b/drivers/perf/Kconfig
@@ -55,7 +55,7 @@ config ARM_PMU_ACPI
 
 config ARM_SMMU_V3_PMU
 	 tristate "ARM SMMUv3 Performance Monitors Extension"
-	 depends on ARM64 && ACPI && ARM_SMMU_V3
+	 depends on ARM64 && ARM_SMMU_V3
 	   help
 	   Provides support for the ARM SMMUv3 Performance Monitor Counter
 	   Groups (PMCG), which provide monitoring of transactions passing
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/4] Documentation: perf: Add documentation for arm-smmu-v3-pmcg
       [not found]   ` <CGME20200712165520epcas5p33f911bb43c6ce7e223bac5f11781c713@epcas5p3.samsung.com>
@ 2020-07-12 16:33     ` Ajay Kumar
  2020-07-13  8:41       ` Jonathan Cameron
  0 siblings, 1 reply; 12+ messages in thread
From: Ajay Kumar @ 2020-07-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, Ajay Kumar,
	alim.akhtar, robin.murphy, joro

This patch adds devicetree binding for perf/arm_smmuv3_pmu driver.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt

diff --git a/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt b/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
new file mode 100644
index 000000000000..a20fe68ce149
--- /dev/null
+++ b/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
@@ -0,0 +1,21 @@
+* ARM SMMU V3 PMCG
+
+Required properties:
+
+- compatible: should be "arm-smmu-v3-pmu"
+
+- reg: (standard registers property) physical address and size
+	of the performance counters registers block.
+	If Page 1 is present, specify the same.
+
+- interrupts: (standard interrupt property) single interrupt
+	generated by the SMMU PMU control block
+
+Example:
+
+	pmcg@20002000 {
+		compatible = "arm-smmu-v3-pmu";
+		reg = <0x0 0x20002000 0x0 0x1000>,
+			<0x0 0x20022000 0x0 0xE00>; /* Page 1 */
+		interrupts = <0 181 4>;
+	};
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/4] perf/smmuv3: add device tree support
       [not found]   ` <CGME20200712165524epcas5p1a57d969a3e48a67731530437d559d560@epcas5p1.samsung.com>
@ 2020-07-12 16:33     ` Ajay Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Ajay Kumar @ 2020-07-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, Ajay Kumar,
	alim.akhtar, robin.murphy, joro

Add a OF match table with compatible string to add device tree
support onto arm_smmuv3_pmu driver.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/perf/arm_smmuv3_pmu.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 48e28ef93a70..25feab718c20 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -856,9 +856,15 @@ static void smmu_pmu_shutdown(struct platform_device *pdev)
 	smmu_pmu_disable(&smmu_pmu->pmu);
 }
 
+static const struct of_device_id arm_smmu_pmu_match[] = {
+	{ .compatible = "arm-smmu-v3-pmu", },
+	{},
+};
+
 static struct platform_driver smmu_pmu_driver = {
 	.driver = {
 		.name = "arm-smmu-v3-pmcg",
+		.of_match_table = arm_smmu_pmu_match,
 	},
 	.probe = smmu_pmu_probe,
 	.remove = smmu_pmu_remove,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified
       [not found]   ` <CGME20200712165527epcas5p4638d8f652d8d4d0ed1baba3962511681@epcas5p4.samsung.com>
@ 2020-07-12 16:33     ` Ajay Kumar
  2020-07-13  8:46       ` Jonathan Cameron
  2020-07-13  9:46       ` Robin Murphy
  0 siblings, 2 replies; 12+ messages in thread
From: Ajay Kumar @ 2020-07-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, Ajay Kumar,
	alim.akhtar, robin.murphy, joro

The arm_smmuv3_pmu driver assumes platform data is always
available and exposes a possible NULL pointer deferencing
at the below line.

model = *(u32 *)dev_get_platdata(smmu_pmu->dev);

This patch fixes the bug by adding a check prior to the
deferencing of the platform data pointer.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 drivers/perf/arm_smmuv3_pmu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 25feab718c20..f7a27ae2f8d8 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -710,9 +710,10 @@ static void smmu_pmu_reset(struct smmu_pmu *smmu_pmu)
 
 static void smmu_pmu_get_acpi_options(struct smmu_pmu *smmu_pmu)
 {
-	u32 model;
+	u32 model = 0;
 
-	model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
+	if (dev_get_platdata(smmu_pmu->dev))
+		model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
 
 	switch (model) {
 	case IORT_SMMU_V3_PMCG_HISI_HIP08:
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/4] Documentation: perf: Add documentation for arm-smmu-v3-pmcg
  2020-07-12 16:33     ` [PATCH 2/4] Documentation: perf: Add documentation for arm-smmu-v3-pmcg Ajay Kumar
@ 2020-07-13  8:41       ` Jonathan Cameron
  0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2020-07-13  8:41 UTC (permalink / raw)
  To: Ajay Kumar
  Cc: mark.rutland, shaik.ameer, robin.murphy, nleeder,
	shameerali.kolothum.thodi, robh+dt, alim.akhtar, will, joro,
	linux-arm-kernel

On Sun, 12 Jul 2020 22:03:39 +0530
Ajay Kumar <ajaykumar.rs@samsung.com> wrote:

> This patch adds devicetree binding for perf/arm_smmuv3_pmu driver.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>

New bindings want to be in yaml format.

> ---
>  .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
> 
> diff --git a/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt b/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
> new file mode 100644
> index 000000000000..a20fe68ce149
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
> @@ -0,0 +1,21 @@
> +* ARM SMMU V3 PMCG
> +
> +Required properties:
> +
> +- compatible: should be "arm-smmu-v3-pmu"
> +
> +- reg: (standard registers property) physical address and size
> +	of the performance counters registers block.
> +	If Page 1 is present, specify the same.
> +
> +- interrupts: (standard interrupt property) single interrupt
> +	generated by the SMMU PMU control block
> +
> +Example:
> +
> +	pmcg@20002000 {
> +		compatible = "arm-smmu-v3-pmu";
> +		reg = <0x0 0x20002000 0x0 0x1000>,
> +			<0x0 0x20022000 0x0 0xE00>; /* Page 1 */
> +		interrupts = <0 181 4>;
> +	};



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified
  2020-07-12 16:33     ` [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified Ajay Kumar
@ 2020-07-13  8:46       ` Jonathan Cameron
  2020-07-13  9:46       ` Robin Murphy
  1 sibling, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2020-07-13  8:46 UTC (permalink / raw)
  To: Ajay Kumar
  Cc: mark.rutland, shaik.ameer, robin.murphy, nleeder,
	shameerali.kolothum.thodi, robh+dt, alim.akhtar, will, joro,
	linux-arm-kernel

On Sun, 12 Jul 2020 22:03:41 +0530
Ajay Kumar <ajaykumar.rs@samsung.com> wrote:

> The arm_smmuv3_pmu driver assumes platform data is always
> available and exposes a possible NULL pointer deferencing
> at the below line.
> 
> model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
> 
> This patch fixes the bug by adding a check prior to the
> deferencing of the platform data pointer.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  drivers/perf/arm_smmuv3_pmu.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
> index 25feab718c20..f7a27ae2f8d8 100644
> --- a/drivers/perf/arm_smmuv3_pmu.c
> +++ b/drivers/perf/arm_smmuv3_pmu.c
> @@ -710,9 +710,10 @@ static void smmu_pmu_reset(struct smmu_pmu *smmu_pmu)
>  
>  static void smmu_pmu_get_acpi_options(struct smmu_pmu *smmu_pmu)
>  {
> -	u32 model;
> +	u32 model = 0;

Use the generic model define.  Sure it's 0, but good to make it clear what
the meaning of this default is.

It also seems likely you hit this because of you were using dt.
If so, it seems 'odd' to be running a function explicitly mentioning acpi in
it's name.

Also, should do this before introducing support that might lead to this path
so as not to cause bisection problems.

Jonathan


>  
> -	model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
> +	if (dev_get_platdata(smmu_pmu->dev))
> +		model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
>  
>  	switch (model) {
>  	case IORT_SMMU_V3_PMCG_HISI_HIP08:



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver
  2020-07-12 16:33 ` [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver Ajay Kumar
                     ` (3 preceding siblings ...)
       [not found]   ` <CGME20200712165527epcas5p4638d8f652d8d4d0ed1baba3962511681@epcas5p4.samsung.com>
@ 2020-07-13  9:42   ` Robin Murphy
  2020-07-13  9:57     ` John Garry
  4 siblings, 1 reply; 12+ messages in thread
From: Robin Murphy @ 2020-07-13  9:42 UTC (permalink / raw)
  To: Ajay Kumar, linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, alim.akhtar,
	Jay Chen, joro

On 2020-07-12 17:33, Ajay Kumar wrote:
> Currently, only those platforms using ACPI can enable
> arm_smmuv3_pmu driver. This patchset adds support for
> enabling arm_smmuv3_pmu driver on platforms which do not
> enable ACPI and instead rely on DT.

This must be a popular topic all of a sudden, since it's barely a week 
since the last one!

https://lore.kernel.org/linux-arm-kernel/20200706112246.92220-1-jkchen@linux.alibaba.com/

I'm not sure whether Jay has seen my review since Alibaba's mail server 
apparently decided to reject the direct reply as spam, but some of what 
I said there applies here too. Could we please try to coordinate where 
we go from here so we're not all wasting time developing and reviewing 
multiple versions of the exact same thing?

Robin.

> 
> Ajay Kumar (4):
>    perf/smmuv3: Remove dependency on CONFIG_ACPI
>    Documentation: perf: Add documentation for arm-smmu-v3-pmcg
>    perf/smmuv3: add device tree support
>    perf/smmuv3: fix crash when platdata not specified
> 
>   .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
>   drivers/perf/Kconfig                          |  2 +-
>   drivers/perf/arm_smmuv3_pmu.c                 | 11 ++++++++--
>   3 files changed, 31 insertions(+), 3 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified
  2020-07-12 16:33     ` [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified Ajay Kumar
  2020-07-13  8:46       ` Jonathan Cameron
@ 2020-07-13  9:46       ` Robin Murphy
  1 sibling, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2020-07-13  9:46 UTC (permalink / raw)
  To: Ajay Kumar, linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, shameerali.kolothum.thodi, alim.akhtar,
	Jay Chen, joro

On 2020-07-12 17:33, Ajay Kumar wrote:
> The arm_smmuv3_pmu driver assumes platform data is always
> available and exposes a possible NULL pointer deferencing
> at the below line.
> 
> model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
> 
> This patch fixes the bug by adding a check prior to the
> deferencing of the platform data pointer.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>   drivers/perf/arm_smmuv3_pmu.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
> index 25feab718c20..f7a27ae2f8d8 100644
> --- a/drivers/perf/arm_smmuv3_pmu.c
> +++ b/drivers/perf/arm_smmuv3_pmu.c
> @@ -710,9 +710,10 @@ static void smmu_pmu_reset(struct smmu_pmu *smmu_pmu)
>   
>   static void smmu_pmu_get_acpi_options(struct smmu_pmu *smmu_pmu)
>   {
> -	u32 model;
> +	u32 model = 0;
>   
> -	model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
> +	if (dev_get_platdata(smmu_pmu->dev))
> +		model = *(u32 *)dev_get_platdata(smmu_pmu->dev);

As I commented on the other series, ideally this could be something like:

	if (dev->of_node)
		model = of_device_get_match_data(dev->of_node);
	else
		model = *(u32 *)dev_get_platdata(dev); /* from IORT */

(and lose the "acpi_" from the function name, obviously)

Robin.

>   
>   	switch (model) {
>   	case IORT_SMMU_V3_PMCG_HISI_HIP08:
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver
  2020-07-13  9:42   ` [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver Robin Murphy
@ 2020-07-13  9:57     ` John Garry
  2020-07-13 10:17       ` Ajay kumar
  2020-07-13 10:28       ` Robin Murphy
  0 siblings, 2 replies; 12+ messages in thread
From: John Garry @ 2020-07-13  9:57 UTC (permalink / raw)
  To: Robin Murphy, Ajay Kumar, linux-arm-kernel, robh+dt, mark.rutland, will
  Cc: shaik.ameer, nleeder, Linuxarm, shameerali.kolothum.thodi,
	alim.akhtar, Jay Chen, joro

On 13/07/2020 10:42, Robin Murphy wrote:
> On 2020-07-12 17:33, Ajay Kumar wrote:
>> Currently, only those platforms using ACPI can enable
>> arm_smmuv3_pmu driver. This patchset adds support for
>> enabling arm_smmuv3_pmu driver on platforms which do not
>> enable ACPI and instead rely on DT.
> 
> This must be a popular topic all of a sudden, since it's barely a week 
> since the last one!
> 
> https://lore.kernel.org/linux-arm-kernel/20200706112246.92220-1-jkchen@linux.alibaba.com/ 
> 

JFYI, I don't have that mail (so can't reply directly), but hisi 
platforms which have SMMUv3 PMCG don't support DT intentionally, and 
there is a desire to avoid headache of HW-specific DT support there in 
future.

thanks

> 
> I'm not sure whether Jay has seen my review since Alibaba's mail server 
> apparently decided to reject the direct reply as spam, but some of what 
> I said there applies here too. Could we please try to coordinate where 
> we go from here so we're not all wasting time developing and reviewing 
> multiple versions of the exact same thing?



> 
> Robin.
> 
>>
>> Ajay Kumar (4):
>>    perf/smmuv3: Remove dependency on CONFIG_ACPI
>>    Documentation: perf: Add documentation for arm-smmu-v3-pmcg
>>    perf/smmuv3: add device tree support
>>    perf/smmuv3: fix crash when platdata not specified
>>
>>   .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
>>   drivers/perf/Kconfig                          |  2 +-
>>   drivers/perf/arm_smmuv3_pmu.c                 | 11 ++++++++--
>>   3 files changed, 31 insertions(+), 3 deletions(-)
>>   create mode 100644 
>> Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
>>
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> .


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver
  2020-07-13  9:57     ` John Garry
@ 2020-07-13 10:17       ` Ajay kumar
  2020-07-13 10:28       ` Robin Murphy
  1 sibling, 0 replies; 12+ messages in thread
From: Ajay kumar @ 2020-07-13 10:17 UTC (permalink / raw)
  To: John Garry
  Cc: mark.rutland, shaik.ameer, Robin Murphy, nleeder, Linuxarm,
	shameerali.kolothum.thodi, robh+dt, Jay Chen, alim.akhtar, will,
	Ajay Kumar, linux-arm-kernel, joro

Hi Robin and Garry,

On 7/13/20, John Garry <john.garry@huawei.com> wrote:
> On 13/07/2020 10:42, Robin Murphy wrote:
>> On 2020-07-12 17:33, Ajay Kumar wrote:
>>> Currently, only those platforms using ACPI can enable
>>> arm_smmuv3_pmu driver. This patchset adds support for
>>> enabling arm_smmuv3_pmu driver on platforms which do not
>>> enable ACPI and instead rely on DT.
>>
>> This must be a popular topic all of a sudden, since it's barely a week
>> since the last one!
>>
>> https://lore.kernel.org/linux-arm-kernel/20200706112246.92220-1-jkchen@linux.alibaba.com/
>>
>>
>
> JFYI, I don't have that mail (so can't reply directly), but hisi
> platforms which have SMMUv3 PMCG don't support DT intentionally, and
> there is a desire to avoid headache of HW-specific DT support there in
> future.
The patchset allows support for both DT and ACPI to co-exist.

>>
>> I'm not sure whether Jay has seen my review since Alibaba's mail server
>> apparently decided to reject the direct reply as spam, but some of what
>> I said there applies here too. Could we please try to coordinate where
>> we go from here so we're not all wasting time developing and reviewing
>> multiple versions of the exact same thing?
Agreed. I checked Jay's patchset:
https://lore.kernel.org/linux-arm-kernel/20200706112246.92220-1-jkchen@linux.alibaba.com/

Pretty much tries to achieve the same thing. Its Jay's call now.

>
>
>
>>
>> Robin.
>>
>>>
>>> Ajay Kumar (4):
>>>    perf/smmuv3: Remove dependency on CONFIG_ACPI
>>>    Documentation: perf: Add documentation for arm-smmu-v3-pmcg
>>>    perf/smmuv3: add device tree support
>>>    perf/smmuv3: fix crash when platdata not specified
>>>
>>>   .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
>>>   drivers/perf/Kconfig                          |  2 +-
>>>   drivers/perf/arm_smmuv3_pmu.c                 | 11 ++++++++--
>>>   3 files changed, 31 insertions(+), 3 deletions(-)
>>>   create mode 100644
>>> Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
>>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>> .
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver
  2020-07-13  9:57     ` John Garry
  2020-07-13 10:17       ` Ajay kumar
@ 2020-07-13 10:28       ` Robin Murphy
  1 sibling, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2020-07-13 10:28 UTC (permalink / raw)
  To: John Garry
  Cc: mark.rutland, shaik.ameer, Jay Chen, joro, Linuxarm,
	shameerali.kolothum.thodi, robh+dt, alim.akhtar, will,
	Ajay Kumar, linux-arm-kernel

On 2020-07-13 10:57, John Garry wrote:
> On 13/07/2020 10:42, Robin Murphy wrote:
>> On 2020-07-12 17:33, Ajay Kumar wrote:
>>> Currently, only those platforms using ACPI can enable
>>> arm_smmuv3_pmu driver. This patchset adds support for
>>> enabling arm_smmuv3_pmu driver on platforms which do not
>>> enable ACPI and instead rely on DT.
>>
>> This must be a popular topic all of a sudden, since it's barely a week 
>> since the last one!
>>
>> https://lore.kernel.org/linux-arm-kernel/20200706112246.92220-1-jkchen@linux.alibaba.com/ 
>>
> 
> JFYI, I don't have that mail (so can't reply directly), but hisi 
> platforms which have SMMUv3 PMCG don't support DT intentionally, and 
> there is a desire to avoid headache of HW-specific DT support there in 
> future.

Thanks John, I was wondering about that, since I do have a vague memory 
of a promise that you guys would never ask for DT support yourselves :)

Perhaps someone at Huawei can follow up directly with Alibaba about 
their use-case and whether there's a better way to support it upstream 
(if at all).

Bonus tip: If you download a "raw" link from lore and save it with a 
.eml extension, Thunderbird can then be convinced to open it in a manner 
which can be replied to.

Robin.

> 
> thanks
> 
>>
>> I'm not sure whether Jay has seen my review since Alibaba's mail 
>> server apparently decided to reject the direct reply as spam, but some 
>> of what I said there applies here too. Could we please try to 
>> coordinate where we go from here so we're not all wasting time 
>> developing and reviewing multiple versions of the exact same thing?
> 
> 
> 
>>
>> Robin.
>>
>>>
>>> Ajay Kumar (4):
>>>    perf/smmuv3: Remove dependency on CONFIG_ACPI
>>>    Documentation: perf: Add documentation for arm-smmu-v3-pmcg
>>>    perf/smmuv3: add device tree support
>>>    perf/smmuv3: fix crash when platdata not specified
>>>
>>>   .../bindings/perf/arm-smmu-v3-pmcg.txt        | 21 +++++++++++++++++++
>>>   drivers/perf/Kconfig                          |  2 +-
>>>   drivers/perf/arm_smmuv3_pmu.c                 | 11 ++++++++--
>>>   3 files changed, 31 insertions(+), 3 deletions(-)
>>>   create mode 100644 
>>> Documentation/devicetree/bindings/perf/arm-smmu-v3-pmcg.txt
>>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-07-13 10:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200712165509epcas5p29e66777a4e0115420b9104ba5aa83f57@epcas5p2.samsung.com>
2020-07-12 16:33 ` [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver Ajay Kumar
     [not found]   ` <CGME20200712165515epcas5p40c387cdd22a336cfb3ae3b2d011fbb6f@epcas5p4.samsung.com>
2020-07-12 16:33     ` [PATCH 1/4] perf/smmuv3: Remove dependency on CONFIG_ACPI Ajay Kumar
     [not found]   ` <CGME20200712165520epcas5p33f911bb43c6ce7e223bac5f11781c713@epcas5p3.samsung.com>
2020-07-12 16:33     ` [PATCH 2/4] Documentation: perf: Add documentation for arm-smmu-v3-pmcg Ajay Kumar
2020-07-13  8:41       ` Jonathan Cameron
     [not found]   ` <CGME20200712165524epcas5p1a57d969a3e48a67731530437d559d560@epcas5p1.samsung.com>
2020-07-12 16:33     ` [PATCH 3/4] perf/smmuv3: add device tree support Ajay Kumar
     [not found]   ` <CGME20200712165527epcas5p4638d8f652d8d4d0ed1baba3962511681@epcas5p4.samsung.com>
2020-07-12 16:33     ` [PATCH 4/4] perf/smmuv3: fix crash when platdata not specified Ajay Kumar
2020-07-13  8:46       ` Jonathan Cameron
2020-07-13  9:46       ` Robin Murphy
2020-07-13  9:42   ` [PATCH 0/4] Add DT support for arm_smmuv3_pmu driver Robin Murphy
2020-07-13  9:57     ` John Garry
2020-07-13 10:17       ` Ajay kumar
2020-07-13 10:28       ` Robin Murphy

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).