From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: 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>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH] hw/nios2/boot: Remove dead code (big endian check)
Date: Tue, 25 Feb 2020 12:51:40 +0100 [thread overview]
Message-ID: <20200225115140.10023-1-philmd@redhat.com> (raw)
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 {
--
2.21.1
next reply other threads:[~2020-02-25 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 11:51 Philippe Mathieu-Daudé [this message]
2020-03-03 10:02 ` [PATCH] hw/nios2/boot: Remove dead code (big endian check) Laurent Vivier
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=20200225115140.10023-1-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=andrew@codesourcery.com \
--cc=crwulff@gmail.com \
--cc=julian@codesourcery.com \
--cc=marex@denx.de \
--cc=peter.maydell@linaro.org \
--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).