From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/2] checks: add phandle with arg property checks
Date: Wed, 22 Nov 2017 09:58:44 +1100 [thread overview]
Message-ID: <20171121225844.GA2380@umbus.fritz.box> (raw)
In-Reply-To: <CAL_JsqLEwYN9eto2PRiWG7aEzBOeNeADP0miOS_jgs5cifmvOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]
On Tue, Nov 21, 2017 at 03:06:46PM -0600, Rob Herring wrote:
> On Sat, Aug 19, 2017 at 2:33 AM, David Gibson
> <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> > On Fri, Aug 18, 2017 at 11:02:01AM -0500, Rob Herring wrote:
> >> On Thu, Aug 17, 2017 at 11:35 PM, David Gibson
> >> <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> >> > On Mon, Aug 14, 2017 at 04:48:06PM -0500, Rob Herring wrote:
> >> >
>
> [...]
>
> >> > It does mean listing everything in the check_table which is a pain. I
> >> > would really like to change things so that a single macro can both
> >> > declare the check and add it to the master list, but I haven't thought
> >> > of a portable way to do that so far.
> >>
> >> This is done in the kernel frequently using linker sections. Each
> >> check entry would get put into a specific section, then you just
> >> iterate through the entries. Would that work? I could imagine that
> >> linker magic may not be all the portable.
> >
> > Right. Linker sections are the usual way to do this, but that
> > requires lower level knowledge of how the toolchain works than I
> > really want to put into dtc. At heart dtc is really a very
> > straightforward standard C program, so I don't want to introduce
> > dependencies on a specific compiler.
>
> To follow up on this, what about using dlopen/dlsym and having
> libraries with checks? That should be fairly portable. dtc could load
> checks libs from some known or env path. Each checks library would
> provide some known entry point we can call for it to register its
> checks.
I don't immediately see how this addresses the problem. Either we'd
have to have every check in a separate library, which would be pretty
painful, or each library would need a list of checks, and we'd have
the same issue generating it as we do already.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-11-21 22:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 21:48 [PATCH 1/2] checks: add phandle with arg property checks Rob Herring
[not found] ` <20170814214807.338-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-14 21:48 ` [PATCH 2/2] checks: add interrupts property check Rob Herring
[not found] ` <20170814214807.338-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-15 13:21 ` Rob Herring
2017-08-18 4:43 ` David Gibson
[not found] ` <20170818044303.GR5509-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-18 15:53 ` Rob Herring
[not found] ` <CAL_JsqJuUu-6FpLqQZZyVdCueV18CHRZ4qQUvacSrn2XAfpiSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-19 7:42 ` David Gibson
2017-08-18 4:35 ` [PATCH 1/2] checks: add phandle with arg property checks David Gibson
[not found] ` <20170818043502.GQ5509-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-18 16:02 ` Rob Herring
[not found] ` <CAL_Jsq+yA2W=SD9zSkWxw-R16uNELeqPqJK3fVMvi0_jhEbooQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-19 7:33 ` David Gibson
[not found] ` <20170819073333.GA12356-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-22 14:38 ` Rob Herring
[not found] ` <CAL_JsqKynMDP2LBjPj2KSgJiVfmNM4e1=uHYUO6GcUjXt7oJbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-23 0:19 ` David Gibson
2017-11-21 21:06 ` Rob Herring
[not found] ` <CAL_JsqLEwYN9eto2PRiWG7aEzBOeNeADP0miOS_jgs5cifmvOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-21 22:58 ` David Gibson [this message]
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=20171121225844.GA2380@umbus.fritz.box \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.