All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Michael Clark <mjc@sifive.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Alexander Graf <agraf@suse.de>,
	Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [Qemu-devel] [PATCH] device_tree: Add qemu_fdt_totalsize function
Date: Sun, 6 May 2018 16:04:02 +0100	[thread overview]
Message-ID: <CAFEAcA-bYHDSFL07f3BE_Lj-Dou+GeZod6cdX4-LSxzpRmQaDA@mail.gmail.com> (raw)
In-Reply-To: <20180506133955.GP13229@umbus.fritz.box>

On 6 May 2018 at 14:39, David Gibson <david@gibson.dropbear.id.au> wrote:
> Well, I'm biased of course, but I think we'd be better off just
> ditching the wrapper.  In its present form it is so limited as to not
> really add any value.  If it was rewritten to do something useful
> (e.g. handling reallocations), I think it would be even better if
> done as an extension to libfdt itself so it can benefit everyone, not
> just qemu.

Well, some of it is working around infelicities in libfdt's
API (like all the getprop/setprop functions taking an offset
value rather than a node name), but yes, it would be better
to fix the libfdt API if possible.

> Although, that said, I'll re-iterate that I think qemu's fdt
> manipulation is now sufficiently complex that it would be better off
> using a "live" (dynamically allocated & pointer based) tree
> representation that we just flatten immediately before loading it into
> the guest.

This sounds to me like something that should be handled
by libfdt. I don't particularly care what libfdt's
internal representation of the data structure is, I just
want to be able to (a) hand it an fdt read in from a file
(b) call various functions to modify the data structure
and then (c) write the resulting thing out to an fdt in
guest memory. Whether libfdt prefers to do that by
modifying the flat representation or by converting into
a dynamically allocated unflattened tree and back again
is something I'd rather leave to it as an implementation
detail.

thanks
-- PMM

  reply	other threads:[~2018-05-06 15:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04  1:19 [Qemu-devel] [PATCH] device_tree: Add qemu_fdt_totalsize function Michael Clark
2018-05-05 10:44 ` Peter Maydell
2018-05-05 11:48   ` David Gibson
2018-05-05 21:59     ` Michael Clark
2018-05-05 23:03       ` Michael Clark
2018-05-06 12:23       ` Peter Maydell
2018-05-06 13:39         ` David Gibson
2018-05-06 15:04           ` Peter Maydell [this message]
2018-05-09  5:32             ` David Gibson
2018-05-09 11:23               ` Peter Maydell
2018-06-18  2:58                 ` David Gibson
2018-05-06 13:53       ` David Gibson

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=CAFEAcA-bYHDSFL07f3BE_Lj-Dou+GeZod6cdX4-LSxzpRmQaDA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=agraf@suse.de \
    --cc=alistair.francis@wdc.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mjc@sifive.com \
    --cc=qemu-devel@nongnu.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.