qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	qemu-devel@nongnu.org, "Greg Kurz" <groug@kaod.org>,
	qemu-ppc@nongnu.org,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [RFC PATCH 4/5] hw/ppc/fdt: Drop dependency on libfdt
Date: Thu, 13 May 2021 13:46:02 +1000	[thread overview]
Message-ID: <YJyg+h7NC2ktmHSx@yekko> (raw)
In-Reply-To: <ead2acca-d3da-89e5-52f6-e8ae14f6e85f@redhat.com>

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

On Wed, May 12, 2021 at 09:59:00AM +0200, Paolo Bonzini wrote:
> On 12/05/21 04:30, David Gibson wrote:
> > On Tue, May 11, 2021 at 05:53:53PM +0200, Philippe Mathieu-Daudé wrote:
> > > hw/ppc/fdt.c defines the ppc_create_page_sizes_prop() function,
> > > which is unrelated to the libfdt. Remove the incorrect library
> > > dependency on the file.
> > > 
> > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > 
> > This is definitely wrong as it stands.  AFAICT this doesn't add a
> > build of hw/ppc/fdt.c anywhere, but it is definitely needed by both
> > pseries and powernv machine types, who select FDT_PPC for this exact
> > reason.
> > 
> > I will grant you that it is badly named.  It is in fact related to
> > libfdt, just rather indirectly.
> 
> The patch makes sense in general.  The file is only needed for pseries and
> powernv, not for e.g. e500 which does need fdt.

Yes, agreed.

> I would get rid of FDT_PPC completely.  First, before patch 3, you can move
> fdt.c to PSERIES and POWERNV (it's too small to need its own Kconfig symbol)
> and only leave
> 
>    ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: fdt)

Uh... why do we need even this?

> Since you are at it, remove the silly #ifdef TARGET_PPC64 in the
> hw/ppc/fdt.c file.
> 
> Then in patch 3:
> 
> - add to Kconfig.host
> 
>     config FDT
>        bool
> 
>     config LIBFDT
>        bool
>        depends on FDT

Um.. I'm not sure what semantic difference you're envisaging between
FDT and LIBFDT.

> - for all the boards I listed in my review, add "select LIBFDT" in addition
> to "depends on FDT".
> 
> - add to meson.build
> 
>     softmmu_ss.add(when: 'CONFIG_LIBFDT', if_true: fdt)
> 
> Paolo
> 
> > > ---
> > >   hw/ppc/meson.build | 4 ++--
> > >   1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
> > > index e82a6b4105b..580e6e42c8a 100644
> > > --- a/hw/ppc/meson.build
> > > +++ b/hw/ppc/meson.build
> > > @@ -3,9 +3,9 @@
> > >     'ppc.c',
> > >     'ppc_booke.c',
> > >   ))
> > > -ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: [files(
> > > +ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: files(
> > >     'fdt.c',
> > > -), fdt])
> > > +))
> > >   ppc_ss.add(when: 'CONFIG_FW_CFG_PPC', if_true: files('fw_cfg.c'))
> > >   # IBM pSeries (sPAPR)
> > 
> 

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

  reply	other threads:[~2021-05-13  4:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 15:53 [RFC PATCH 0/5] buildsys: Do not use internal fdt library when asked for the system one Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 1/5] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on' Philippe Mathieu-Daudé
2021-05-12  2:24   ` David Gibson
2021-05-12  3:57     ` Philippe Mathieu-Daudé
2021-05-12  4:53       ` Thomas Huth
2021-05-12  5:08         ` Philippe Mathieu-Daudé
2021-05-12  5:30           ` Thomas Huth
2021-05-12  7:02         ` David Gibson
2021-05-13 15:20           ` Paolo Bonzini
2021-05-13 23:33             ` David Gibson
2021-05-12  8:02   ` Paolo Bonzini
2021-05-11 15:53 ` [RFC PATCH 2/5] Kconfig: Declare 'FDT' host symbol Philippe Mathieu-Daudé
2021-05-12  7:37   ` Paolo Bonzini
2021-05-11 15:53 ` [RFC PATCH 3/5] hw/ppc: Have pSeries depends on libfdt (via host Kconfig FDT symbol) Philippe Mathieu-Daudé
2021-05-12  2:27   ` David Gibson
2021-05-12  8:01     ` Paolo Bonzini
2021-05-13  3:46       ` David Gibson
2021-05-12  7:45   ` Paolo Bonzini
2021-05-12  8:27     ` Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 4/5] hw/ppc/fdt: Drop dependency on libfdt Philippe Mathieu-Daudé
2021-05-12  2:30   ` David Gibson
2021-05-12  7:59     ` Paolo Bonzini
2021-05-13  3:46       ` David Gibson [this message]
2021-05-13 15:26         ` Paolo Bonzini
2021-05-13 23:35           ` David Gibson
2021-05-14  5:29             ` Paolo Bonzini
2021-05-14  8:22               ` Philippe Mathieu-Daudé
2021-05-11 15:53 ` [RFC PATCH 5/5] meson: Do not use internal fdt library if user asked for the system one Philippe Mathieu-Daudé
2021-05-12  7:32   ` Paolo Bonzini
2021-05-11 15:57 ` [RFC PATCH 0/5] buildsys: Do not use internal fdt library when " Philippe Mathieu-Daudé
2021-05-12  3:56   ` Philippe Mathieu-Daudé
2021-05-12  7:34     ` Paolo Bonzini

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=YJyg+h7NC2ktmHSx@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=groug@kaod.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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).