qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/xtensa: require libfdt
Date: Mon, 22 Jan 2024 15:01:46 +0100	[thread overview]
Message-ID: <e16dbe80-a574-41e1-977f-a7763828e779@redhat.com> (raw)
In-Reply-To: <20240122094230.283653-1-pbonzini@redhat.com>

On 22/01/2024 10.42, Paolo Bonzini wrote:
> Always allow -dtb in qemu-system-xtensa.  Basically all other targets require
> it if it can be used (including for example i386/x86_64).
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configs/targets/xtensa-softmmu.mak   | 1 +
>   configs/targets/xtensaeb-softmmu.mak | 1 +
>   hw/xtensa/xtfpga.c                   | 9 ---------
>   3 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/configs/targets/xtensa-softmmu.mak b/configs/targets/xtensa-softmmu.mak
> index f075557bfa9..c394df73034 100644
> --- a/configs/targets/xtensa-softmmu.mak
> +++ b/configs/targets/xtensa-softmmu.mak
> @@ -1,2 +1,3 @@
>   TARGET_ARCH=xtensa
>   TARGET_SUPPORTS_MTTCG=y
> +TARGET_NEED_FDT=y
> diff --git a/configs/targets/xtensaeb-softmmu.mak b/configs/targets/xtensaeb-softmmu.mak
> index b02e11b8200..517b4c3e12d 100644
> --- a/configs/targets/xtensaeb-softmmu.mak
> +++ b/configs/targets/xtensaeb-softmmu.mak
> @@ -1,3 +1,4 @@
>   TARGET_ARCH=xtensa
>   TARGET_BIG_ENDIAN=y
>   TARGET_SUPPORTS_MTTCG=y
> +TARGET_NEED_FDT=y
> diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
> index fbad1c83a3f..3c93cfffbaa 100644
> --- a/hw/xtensa/xtfpga.c
> +++ b/hw/xtensa/xtfpga.c
> @@ -357,7 +357,6 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine)
>               cur_tagptr = put_tag(cur_tagptr, BP_TAG_COMMAND_LINE,
>                                    strlen(kernel_cmdline) + 1, kernel_cmdline);
>           }
> -#ifdef CONFIG_FDT
>           if (dtb_filename) {
>               int fdt_size;
>               void *fdt = load_device_tree(dtb_filename, &fdt_size);
> @@ -374,14 +373,6 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine)
>               cur_lowmem = QEMU_ALIGN_UP(cur_lowmem + fdt_size, 4 * KiB);
>               g_free(fdt);
>           }
> -#else
> -        if (dtb_filename) {
> -            error_report("could not load DTB '%s': "
> -                         "FDT support is not configured in QEMU",
> -                         dtb_filename);
> -            exit(EXIT_FAILURE);
> -        }
> -#endif

Agreed, we should do this the same way on all architectures.

Reviewed-by: Thomas Huth <thuth@redhat.com>




      parent reply	other threads:[~2024-01-22 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22  9:42 [PATCH] hw/xtensa: require libfdt Paolo Bonzini
2024-01-22 11:09 ` Philippe Mathieu-Daudé
2024-01-22 14:18   ` Peter Maydell
2024-01-22 14:01 ` Thomas Huth [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=e16dbe80-a574-41e1-977f-a7763828e779@redhat.com \
    --to=thuth@redhat.com \
    --cc=pbonzini@redhat.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 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).