lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJs6MtvmuyAknsUxQymbmoV=G+=JfS1PQj9kNHV7fjC9g@mail.gmail.com>
Date:   Wed, 26 Jun 2019 11:52:15 -0600
From:   Rob Herring <robh@...nel.org>
To:     Paul Walmsley <paul.walmsley@...ive.com>
Cc:     linux-riscv@...ts.infradead.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: riscv: resolve 'make dt_binding_check' warnings

On Wed, Jun 26, 2019 at 9:30 AM Paul Walmsley <paul.walmsley@...ive.com> wrote:
>
>
> Rob pointed out that one of the examples in the RISC-V 'cpus' YAML schema
> results in warnings from 'make dt_binding_check'.  Fix these.
>
> While here, make the whitespace in the second example consistent with the
> first example.
>
> Signed-off-by: Paul Walmsley <paul.walmsley@...ive.com>
> Cc: Rob Herring <robh@...nel.org>
> ---
>  .../devicetree/bindings/riscv/cpus.yaml       | 26 ++++++++++---------
>  1 file changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> index 27f02ec4bb45..f97a4ecd7b91 100644
> --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> @@ -152,17 +152,19 @@ examples:
>    - |
>      // Example 2: Spike ISA Simulator with 1 Hart
>      cpus {
> -            cpu@0 {
> -                    device_type = "cpu";
> -                    reg = <0>;
> -                    compatible = "riscv";
> -                    riscv,isa = "rv64imafdc";
> -                    mmu-type = "riscv,sv48";
> -                    interrupt-controller {
> -                            #interrupt-cells = <1>;
> -                            interrupt-controller;
> -                            compatible = "riscv,cpu-intc";
> -                    };
> -            };
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        cpu@0 {

This only works because you removed 'cpus' and therefore none of this
schema is applied.

> +                device_type = "cpu";
> +                reg = <0>;
> +                compatible = "riscv";

According to the schema, this is wrong. It should have 2 strings. Or
the schema needs to allow this case, but 'riscv' is too vague to be
very useful.

Also, I noticed that there's still a riscv/cpus.txt. That should be
removed and replaced with this file. Looks like the hart description
at least should be copied over (into top-level 'description').

> +                riscv,isa = "rv64imafdc";
> +                mmu-type = "riscv,sv48";
> +                interrupt-controller {
> +                        #interrupt-cells = <1>;
> +                        interrupt-controller;
> +                        compatible = "riscv,cpu-intc";
> +                };
> +        };
>      };
>  ...
> --
> 2.20.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ