diff mbox series

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

Message ID 20230404-tractor-confusing-8852e552539a@spud (mailing list archive)
State Accepted
Commit 4d276e4d3bb4a503e75086faab54f92c0a8fd368
Headers show
Series [v1] dt-bindings: perf: riscv,pmu: fix property dependencies | expand

Checks

Context Check Description
conchuod/cover_letter success Single patches do not need cover letters
conchuod/tree_selection success Guessed tree name to be fixes at HEAD 4622f159098e
conchuod/fixes_present success Fixes tag present in non-next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 1 and now 1
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 18 this patch: 18
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig success Errors and warnings before: 18 this patch: 18
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 3 this patch: 3
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
conchuod/source_inline success Was 0 now: 0
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success Fixes tag looks correct
conchuod/build_rv64_nommu_virt_defconfig success Build OK

Commit Message

Conor Dooley April 4, 2023, 6:03 p.m. UTC
From: Conor Dooley <conor.dooley@microchip.com>

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 <conor.dooley@microchip.com>
---

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 <robh+dt@kernel.org>
CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
CC: Paul Walmsley <paul.walmsley@sifive.com>
CC: Palmer Dabbelt <palmer@dabbelt.com>
CC: Atish Patra <atishp@rivosinc.com>
CC: Andrew Jones <ajones@ventanamicro.com>
CC: devicetree@vger.kernel.org
CC: linux-riscv@lists.infradead.org
CC: linux-kernel@vger.kernel.org
---
 Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
 1 file changed, 1 deletion(-)

Comments

Rob Herring (Arm) May 4, 2023, 8:21 p.m. UTC | #1
On Tue, Apr 04, 2023 at 07:03:22PM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> 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 <conor.dooley@microchip.com>
> ---
> 
> 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 <robh+dt@kernel.org>
> CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> CC: Paul Walmsley <paul.walmsley@sifive.com>
> CC: Palmer Dabbelt <palmer@dabbelt.com>
> CC: Atish Patra <atishp@rivosinc.com>
> CC: Andrew Jones <ajones@ventanamicro.com>
> CC: devicetree@vger.kernel.org
> CC: linux-riscv@lists.infradead.org
> CC: linux-kernel@vger.kernel.org
> ---
>  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
>
Atish Kumar Patra May 4, 2023, 8:42 p.m. UTC | #2
On Fri, May 5, 2023 at 1:51 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Apr 04, 2023 at 07:03:22PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> >
> > 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 <conor.dooley@microchip.com>
> > ---
> >
> > 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 <atishp@rivosinc.com>

> >
> > CC: Rob Herring <robh+dt@kernel.org>
> > CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> > CC: Paul Walmsley <paul.walmsley@sifive.com>
> > CC: Palmer Dabbelt <palmer@dabbelt.com>
> > CC: Atish Patra <atishp@rivosinc.com>
> > CC: Andrew Jones <ajones@ventanamicro.com>
> > CC: devicetree@vger.kernel.org
> > CC: linux-riscv@lists.infradead.org
> > CC: linux-kernel@vger.kernel.org
> > ---
> >  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
> >
Rob Herring (Arm) May 4, 2023, 9:54 p.m. UTC | #3
On Tue, 04 Apr 2023 19:03:22 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> 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 <conor.dooley@microchip.com>
> ---
> 
> 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 <robh+dt@kernel.org>
> CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> CC: Paul Walmsley <paul.walmsley@sifive.com>
> CC: Palmer Dabbelt <palmer@dabbelt.com>
> CC: Atish Patra <atishp@rivosinc.com>
> CC: Andrew Jones <ajones@ventanamicro.com>
> CC: devicetree@vger.kernel.org
> CC: linux-riscv@lists.infradead.org
> CC: linux-kernel@vger.kernel.org
> ---
>  Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 

Applied, thanks!
patchwork-bot+linux-riscv@kernel.org May 8, 2023, 2:41 p.m. UTC | #4
Hello:

This patch was applied to riscv/linux.git (fixes)
by Rob Herring <robh@kernel.org>:

On Tue,  4 Apr 2023 19:03:22 +0100 you wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> 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!
diff mbox series

Patch

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