devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara-5wv7dgnIgG8@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [RFC PATCH 0/2] dtc: checks: Validate interrupt-map properties
Date: Wed, 13 May 2020 17:33:37 +0100	[thread overview]
Message-ID: <20200513163339.29607-1-andre.przywara@arm.com> (raw)

The interrupt-map properties can be quite tricky, as they are already
hard to read in their source form, and depend on at least two nodes.

The first patch is the actual check routine, to verify some features
of the map. In particular it should be able to spot missing fields or
fields using the wrong number of cells. Most of the fields cannot easily
be verified, but at the least the phandle to the interrupt controller and
the total number of cells in the property should be valid.
It actually find problems in the Linux kernel tree's .dts files.

While the first patch is quite clean, I am not so confident about the
second one, hence the RFC tags. It adds more output in case a map is
considered broken, so the issue can be found much easier. But it will
increase the amount of warnings, beyond the usual one-problem-per-line,
and lacks the usual prefixes.

Please let me know what you think.

Cheers,
Andre

Andre Przywara (2):
  checks: Validate interrupt-map properties
  checks: interrupt-map: Dump entries on error

 checks.c                    | 165 ++++++++++++++++++++++++++++++++++++++++++++
 tests/bad-interrupt-map.dts |  21 ++++++
 tests/run_tests.sh          |   2 +
 3 files changed, 188 insertions(+)
 create mode 100644 tests/bad-interrupt-map.dts

-- 
2.14.1


             reply	other threads:[~2020-05-13 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 16:33 Andre Przywara [this message]
     [not found] ` <20200513163339.29607-1-andre.przywara-5wv7dgnIgG8@public.gmane.org>
2020-05-13 16:33   ` [RFC PATCH 1/2] checks: Validate interrupt-map properties Andre Przywara
     [not found]     ` <20200513163339.29607-2-andre.przywara-5wv7dgnIgG8@public.gmane.org>
2020-05-14  3:03       ` Rob Herring
     [not found]         ` <CAL_JsqKPTzb=0h4fCpHh+p=SanTDuVj8W-H8pj7EQ7LJxFySAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-05-14  7:06           ` David Gibson
     [not found]             ` <20200514070647.GD2183-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2020-05-15 10:42               ` André Przywara
2020-05-15 10:17           ` André Przywara
2020-05-13 16:33   ` [RFC PATCH 2/2] checks: interrupt-map: Dump entries on error Andre Przywara
     [not found]     ` <20200513163339.29607-3-andre.przywara-5wv7dgnIgG8@public.gmane.org>
2020-05-14  3:08       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200513163339.29607-1-andre.przywara@arm.com \
    --to=andre.przywara-5wv7dgnigg8@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).