From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Marek Vasut <marex@denx.de>,
Peter Maydell <peter.maydell@linaro.org>,
Andrew Jenner <andrew@codesourcery.com>,
qemu-trivial@nongnu.org, Chris Wulff <crwulff@gmail.com>,
Julian Brown <julian@codesourcery.com>,
Sandra Loosemore <sandra@codesourcery.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH] hw/nios2/boot: Remove dead code (big endian check)
Date: Tue, 3 Mar 2020 11:02:51 +0100 [thread overview]
Message-ID: <7671cb2b-965c-ead3-92f0-9ecfa0500f6a@vivier.eu> (raw)
In-Reply-To: <20200225115140.10023-1-philmd@redhat.com>
Le 25/02/2020 à 12:51, Philippe Mathieu-Daudé a écrit :
> We only build the little-endian softmmu configuration (all
> Nios II processors are only little endian). Checking for
> big endian is pointless, remove the unused code.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/nios2/boot.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
> index 88224aa84c..000f8205d6 100644
> --- a/hw/nios2/boot.c
> +++ b/hw/nios2/boot.c
> @@ -140,16 +140,11 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base,
> if (kernel_filename) {
> int kernel_size, fdt_size;
> uint64_t entry, low, high;
> - int big_endian = 0;
> -
> -#ifdef TARGET_WORDS_BIGENDIAN
> - big_endian = 1;
> -#endif
>
> /* Boots a kernel elf binary. */
> kernel_size = load_elf(kernel_filename, NULL, NULL, NULL,
> &entry, &low, &high, NULL,
> - big_endian, EM_ALTERA_NIOS2, 0, 0);
> + 0, EM_ALTERA_NIOS2, 0, 0);
> if ((uint32_t)entry == 0xc0000000) {
> /*
> * The Nios II processor reference guide documents that the
> @@ -160,7 +155,7 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base,
> kernel_size = load_elf(kernel_filename, NULL,
> translate_kernel_address, NULL,
> &entry, NULL, NULL, NULL,
> - big_endian, EM_ALTERA_NIOS2, 0, 0);
> + 0, EM_ALTERA_NIOS2, 0, 0);
> boot_info.bootstrap_pc = ddr_base + 0xc0000000 +
> (entry & 0x07ffffff);
> } else {
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
prev parent reply other threads:[~2020-03-03 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 11:51 [PATCH] hw/nios2/boot: Remove dead code (big endian check) Philippe Mathieu-Daudé
2020-03-03 10:02 ` Laurent Vivier [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=7671cb2b-965c-ead3-92f0-9ecfa0500f6a@vivier.eu \
--to=laurent@vivier.eu \
--cc=andrew@codesourcery.com \
--cc=crwulff@gmail.com \
--cc=julian@codesourcery.com \
--cc=marex@denx.de \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--cc=sandra@codesourcery.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).