devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v6 7/8] libfdt: Add support for disabling ordering check/fixup
Date: Wed, 12 Feb 2020 16:39:47 +1100	[thread overview]
Message-ID: <20200212053947.GX22584@umbus.fritz.box> (raw)
In-Reply-To: <CAPnjgZ2BtNuFX0TG_7G0ydJ5jbBOQxUHgf0Khrs0snOkpkb-Wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

On Tue, Feb 11, 2020 at 10:26:21PM -0700, Simon Glass wrote:
> On Tue, Feb 11, 2020, 21:58 David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
> wrote:
> 
> > On Tue, Feb 11, 2020 at 01:09:44PM -0700, Simon Glass wrote:
> > > Add a way to remove this check and the reordering code, which is
> > > unnecessary if the dtb is known to be correctly ordered.
> > >
> > > Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> >
> > Reviewed-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
> >
> > .. except for not liking the name.
> 
> NORMAL_ORDER?
> LIBFDT_ORDERING?
> EXPECTED_ORDER?

Oh, yes, I should have suggested something.  Ummm.....

let's go with LIBFDT_ORDER.

> 
> 
> > > ---
> > >
> > > Changes in v6:
> > > - Add a new patch to disable the ordering check and fixup
> > >
> > > Changes in v5: None
> > > Changes in v4: None
> > > Changes in v3: None
> > > Changes in v2: None
> > >
> > >  libfdt/fdt_rw.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c
> > > index fe13671..0d9d1b2 100644
> > > --- a/libfdt/fdt_rw.c
> > > +++ b/libfdt/fdt_rw.c
> > > @@ -435,7 +435,8 @@ int fdt_open_into(const void *fdt, void *buf, int
> > bufsize)
> > >                       return struct_size;
> > >       }
> > >
> > > -     if (!fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
> > > +     if (can_assume(CORRECT_ORDER) |
> > > +         !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) {
> > >               /* no further work necessary */
> > >               err = fdt_move(fdt, buf, bufsize);
> > >               if (err)
> >
> >

-- 
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 --]

  parent reply	other threads:[~2020-02-12  5:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 20:09 [PATCH v6 0/8] libfdt: Allow more control of code size Simon Glass
     [not found] ` <20200211200945.46606-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-11 20:09   ` [PATCH v6 1/8] libfdt: De-inline fdt_header_size() Simon Glass
     [not found]     ` <20200211200945.46606-2-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-12  4:15       ` David Gibson
2020-02-11 20:09   ` [PATCH v6 2/8] Add a way to control the level of checks in the code Simon Glass
     [not found]     ` <20200211200945.46606-3-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-12  4:35       ` David Gibson
2020-02-11 20:09   ` [PATCH v6 3/8] libfdt: Add support for disabling dtb checks Simon Glass
     [not found]     ` <20200211200945.46606-4-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-12  4:38       ` David Gibson
2020-02-11 20:09   ` [PATCH v6 4/8] libfdt: Add support for disabling sanity checks Simon Glass
     [not found]     ` <20200211200945.46606-5-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-12  4:57       ` David Gibson
2020-02-11 20:09   ` [PATCH v6 5/8] libfdt: Add support for disabling rollback handling Simon Glass
2020-02-11 20:09   ` [PATCH v6 6/8] libfdt: Add support for disabling version checks Simon Glass
2020-02-11 20:09   ` [PATCH v6 7/8] libfdt: Add support for disabling ordering check/fixup Simon Glass
     [not found]     ` <20200211200945.46606-8-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-02-12  4:57       ` David Gibson
     [not found]         ` <CAPnjgZ2BtNuFX0TG_7G0ydJ5jbBOQxUHgf0Khrs0snOkpkb-Wg@mail.gmail.com>
     [not found]           ` <CAPnjgZ2BtNuFX0TG_7G0ydJ5jbBOQxUHgf0Khrs0snOkpkb-Wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-12  5:39             ` David Gibson [this message]
2020-02-11 20:09   ` [PATCH v6 8/8] libfdt: Allow exclusion of fdt_check_full() Simon Glass

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=20200212053947.GX22584@umbus.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@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 NNTP newsgroup(s).