2023-04-04 18:05:30

by Conor Dooley

[permalink] [raw]
Subject: [PATCH v1] dt-bindings: perf: riscv,pmu: fix property dependencies

From: Conor Dooley <[email protected]>

Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
point out that the "riscv,event-to-mhpmcounters property is mandatory if
riscv,event-to-mhpmevent is present". It never claims that
riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.

Drop the dependency of riscv,event-to-mhpmcounters on
riscv,event-to-mhpmevent.

Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings")
Signed-off-by: Conor Dooley <[email protected]>
---

Atish, I'm not 100% on this one but I noticed it while doing dt-validate
on a dump of the qemu virt machine which doesn't use the
event-to-mhpmevent property.

CC: Rob Herring <[email protected]>
CC: Krzysztof Kozlowski <[email protected]>
CC: Paul Walmsley <[email protected]>
CC: Palmer Dabbelt <[email protected]>
CC: Atish Patra <[email protected]>
CC: Andrew Jones <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
---
Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
index a55a4d047d3f..c8448de2f2a0 100644
--- a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
+++ b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
@@ -91,7 +91,6 @@ properties:

dependencies:
"riscv,event-to-mhpmevent": [ "riscv,event-to-mhpmcounters" ]
- "riscv,event-to-mhpmcounters": [ "riscv,event-to-mhpmevent" ]

required:
- compatible
--
2.39.2


2023-05-04 20:47:01

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1] dt-bindings: perf: riscv,pmu: fix property dependencies

On Tue, Apr 04, 2023 at 07:03:22PM +0100, Conor Dooley wrote:
> From: Conor Dooley <[email protected]>
>
> Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
> point out that the "riscv,event-to-mhpmcounters property is mandatory if
> riscv,event-to-mhpmevent is present". It never claims that
> riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.
>
> Drop the dependency of riscv,event-to-mhpmcounters on
> riscv,event-to-mhpmevent.
>
> Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings")
> Signed-off-by: Conor Dooley <[email protected]>
> ---
>
> Atish, I'm not 100% on this one but I noticed it while doing dt-validate
> on a dump of the qemu virt machine which doesn't use the
> event-to-mhpmevent property.

Waiting for comments before I apply this...

>
> CC: Rob Herring <[email protected]>
> CC: Krzysztof Kozlowski <[email protected]>
> CC: Paul Walmsley <[email protected]>
> CC: Palmer Dabbelt <[email protected]>
> CC: Atish Patra <[email protected]>
> CC: Andrew Jones <[email protected]>
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> ---
> Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> index a55a4d047d3f..c8448de2f2a0 100644
> --- a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> +++ b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> @@ -91,7 +91,6 @@ properties:
>
> dependencies:
> "riscv,event-to-mhpmevent": [ "riscv,event-to-mhpmcounters" ]
> - "riscv,event-to-mhpmcounters": [ "riscv,event-to-mhpmevent" ]
>
> required:
> - compatible
> --
> 2.39.2
>

2023-05-04 21:03:41

by Atish Patra

[permalink] [raw]
Subject: Re: [PATCH v1] dt-bindings: perf: riscv,pmu: fix property dependencies

On Fri, May 5, 2023 at 1:51 AM Rob Herring <[email protected]> wrote:
>
> On Tue, Apr 04, 2023 at 07:03:22PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <[email protected]>
> >
> > Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
> > point out that the "riscv,event-to-mhpmcounters property is mandatory if
> > riscv,event-to-mhpmevent is present". It never claims that
> > riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.
> >
> > Drop the dependency of riscv,event-to-mhpmcounters on
> > riscv,event-to-mhpmevent.
> >
> > Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings")
> > Signed-off-by: Conor Dooley <[email protected]>
> > ---
> >
> > Atish, I'm not 100% on this one but I noticed it while doing dt-validate
> > on a dump of the qemu virt machine which doesn't use the
> > event-to-mhpmevent property.

Yes. That's correct. virt machine uses default encoding specified by
the SBI PMU spec.
Hence, event-to-mhpmevent is not used.

>
> Waiting for comments before I apply this...
>

Sorry for the delay. Not sure why this did not show up in my gmail.
Probably due to all the bouncing issues going on.


Reviewed-by: Atish Patra <[email protected]>

> >
> > CC: Rob Herring <[email protected]>
> > CC: Krzysztof Kozlowski <[email protected]>
> > CC: Paul Walmsley <[email protected]>
> > CC: Palmer Dabbelt <[email protected]>
> > CC: Atish Patra <[email protected]>
> > CC: Andrew Jones <[email protected]>
> > CC: [email protected]
> > CC: [email protected]
> > CC: [email protected]
> > ---
> > Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> > index a55a4d047d3f..c8448de2f2a0 100644
> > --- a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> > +++ b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> > @@ -91,7 +91,6 @@ properties:
> >
> > dependencies:
> > "riscv,event-to-mhpmevent": [ "riscv,event-to-mhpmcounters" ]
> > - "riscv,event-to-mhpmcounters": [ "riscv,event-to-mhpmevent" ]
> >
> > required:
> > - compatible
> > --
> > 2.39.2
> >

2023-05-04 22:12:37

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1] dt-bindings: perf: riscv,pmu: fix property dependencies


On Tue, 04 Apr 2023 19:03:22 +0100, Conor Dooley wrote:
> From: Conor Dooley <[email protected]>
>
> Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
> point out that the "riscv,event-to-mhpmcounters property is mandatory if
> riscv,event-to-mhpmevent is present". It never claims that
> riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.
>
> Drop the dependency of riscv,event-to-mhpmcounters on
> riscv,event-to-mhpmevent.
>
> Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings")
> Signed-off-by: Conor Dooley <[email protected]>
> ---
>
> Atish, I'm not 100% on this one but I noticed it while doing dt-validate
> on a dump of the qemu virt machine which doesn't use the
> event-to-mhpmevent property.
>
> CC: Rob Herring <[email protected]>
> CC: Krzysztof Kozlowski <[email protected]>
> CC: Paul Walmsley <[email protected]>
> CC: Palmer Dabbelt <[email protected]>
> CC: Atish Patra <[email protected]>
> CC: Andrew Jones <[email protected]>
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> ---
> Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
> 1 file changed, 1 deletion(-)
>

Applied, thanks!

Subject: Re: [PATCH v1] dt-bindings: perf: riscv,pmu: fix property dependencies

Hello:

This patch was applied to riscv/linux.git (fixes)
by Rob Herring <[email protected]>:

On Tue, 4 Apr 2023 19:03:22 +0100 you wrote:
> From: Conor Dooley <[email protected]>
>
> Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
> point out that the "riscv,event-to-mhpmcounters property is mandatory if
> riscv,event-to-mhpmevent is present". It never claims that
> riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.
>
> [...]

Here is the summary with links:
- [v1] dt-bindings: perf: riscv,pmu: fix property dependencies
https://git.kernel.org/riscv/c/4d276e4d3bb4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html