Re: [PATCH 0/2] schemas: add "cpus" schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Jun 25, 2019 at 5:51 PM Paul Walmsley <paul.walmsley@xxxxxxxxxx> wrote:
>
> On Tue, 25 Jun 2019, Rob Herring wrote:
>
> > On Mon, Jun 24, 2019 at 8:37 PM Paul Walmsley <paul.walmsley@xxxxxxxxxx> wrote:
> > >
> > > These two patches add a common "cpus" schema.  They pass
> > > dt-doc-validate as of commit 2550ac333f6ed4ceb1e785262c54ec8619df077a
> > > ("meta-schemas: Allow additional keys under node properties").
> >
> > Now we get a bunch of warnings because the examples are now validated
> > (in next) against the schemas.
>
> ...
>
> > The main problem is the Arm cpu schema is applied on RiscV nodes and
> > vice-versa. I think since we have the common cpus schema now, we'll
> > need to remove the 'cpus' node from the riscv and arm schemas so we
> > only apply the schema on matching compatibles. The last one here is
> > probably from cache-controller.yaml.
> >
> > And then these are just from dtc which you should have seen already:
>
> ...
>
> It's been a bit unclear to me what sort of validation steps are
> appropriate before submitting these patches, and how resulting changes are
> driven.  I usually don't develop against -next, which may be part of the
> issue.  Let me know what you want me to do.

Minimally, for anyone submitting and applying schema patches,
'dt_binding_check' should pass and not have warnings. Just like
compiling C code. I'd like to make it part of the default target, but
things are a bit immature still and once we have all 3500 bindings
converted, it will be too slow.

Then there is 'dtbs_check' for dts files (in riscv specifically for
you). 'dtbs_check' will probably have warnings already, but you should
be aware of what each schema adds to that. That can be tested by
setting 'DT_SCHEMA_FILES' to a single schema file. While the schema
checks of examples are new, testing your dts files against the schema
would have also caught this problem as examples tend to be copied from
dts files. Then for new warnings either we have to adjust the schema
to fix the warnings or fix the dts files. At this point, we're adding
warnings and are nowhere close to be warning free. Ideally, if you add
new dts files, they should pass schema checks.

BTW, much of this applies to just building dtbs with W=1 or W=12 which
turns on a bunch of dtc checks. Hopefully, riscv can be warning free
from the start (before you have a 1000 boards).

For this case specifically, I'll look at how to restructure the cpu
schemas. You need to fix the dtc warnings.

Rob



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux