All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Michael Clark <mjc@sifive.com>
Cc: David Gibson <david@gibson.dropbear.id.au>,
	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 13:23:30 +0100	[thread overview]
Message-ID: <CAFEAcA_fC6AmZBv4ovKunEm+2YPMdQJ0OWVVZXCuiLxGxAG=SA@mail.gmail.com> (raw)
In-Reply-To: <CAHNT7Ns98LZzRK9AguCqrG+GQrSEm1+ZiPVLYnFKob8LgDdMKg@mail.gmail.com>

On 5 May 2018 at 22:59, Michael Clark <mjc@sifive.com> wrote:
> Okay, so an alternative is to call fdt_pack() and then fdt_totalsize().
> Thanks!
>
> QEMU has its own wrapper around libfdt and neither the fdt_pack() nor
> fdt_totalsize() functions are exposed.
>
> Some architecture use only the wrapper functions provided by
> qemu/include/include/sysemu/device_tree.h
>
> It seems that target/ppc has #include <libfdt.h> and calls fdt_pack() and
> fdt_totalsize() directly.

Yeah, I find this combination of libfdt direct access and a
QEMU wrapper layer a bit confusing. I think it's grown more
than it's been actively designed. Your approach of doing
direct calls to pack/totalsize is fine. Maybe the wrapper
layer could be improved some day too.

thanks
-- PMM

  parent reply	other threads:[~2018-05-06 12:23 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 [this message]
2018-05-06 13:39         ` David Gibson
2018-05-06 15:04           ` Peter Maydell
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_fC6AmZBv4ovKunEm+2YPMdQJ0OWVVZXCuiLxGxAG=SA@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.