[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v1 18/21] mips: Remove ELF_MACHINE from cpu.h
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PULL v1 18/21] mips: Remove ELF_MACHINE from cpu.h |
Date: |
Thu, 10 Sep 2015 22:44:40 -0700 |
From: Peter Crosthwaite <address@hidden>
The only generic code relying on this is linux-user, but linux users'
default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle
this.
The bootloaders can just pass EM_MIPS directly, as that is
architecture specific code.
This removes another architecture specific definition from the global
namespace.
Cc: Aurelien Jarno <address@hidden>
Cc: Leon Alrae <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Acked-By: Riku Voipio <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/mips/mips_fulong2e.c | 2 +-
hw/mips/mips_malta.c | 2 +-
hw/mips/mips_mipssim.c | 2 +-
hw/mips/mips_r4k.c | 2 +-
target-mips/cpu.h | 2 --
5 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index dea941a..a6c746a 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -116,7 +116,7 @@ static int64_t load_kernel (CPUMIPSState *env)
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
(uint64_t *)&kernel_entry, (uint64_t *)&kernel_low,
- (uint64_t *)&kernel_high, 0, ELF_MACHINE, 1) < 0) {
+ (uint64_t *)&kernel_high, 0, EM_MIPS, 1) < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
loaderparams.kernel_filename);
exit(1);
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 3082e75..bf477b6 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -795,7 +795,7 @@ static int64_t load_kernel (void)
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
(uint64_t *)&kernel_entry, NULL, (uint64_t *)&kernel_high,
- big_endian, ELF_MACHINE, 1) < 0) {
+ big_endian, EM_MIPS, 1) < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
loaderparams.kernel_filename);
exit(1);
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index 61f74a6..b08667d 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -69,7 +69,7 @@ static int64_t load_kernel(void)
kernel_size = load_elf(loaderparams.kernel_filename,
cpu_mips_kseg0_to_phys,
NULL, (uint64_t *)&entry, NULL,
(uint64_t *)&kernel_high, big_endian,
- ELF_MACHINE, 1);
+ EM_MIPS, 1);
if (kernel_size >= 0) {
if ((entry & ~0x7fffffffULL) == 0x80000000)
entry = (int32_t)entry;
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index f4dcacd..239a9fd 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -87,7 +87,7 @@ static int64_t load_kernel(void)
kernel_size = load_elf(loaderparams.kernel_filename,
cpu_mips_kseg0_to_phys,
NULL, (uint64_t *)&entry, NULL,
(uint64_t *)&kernel_high, big_endian,
- ELF_MACHINE, 1);
+ EM_MIPS, 1);
if (kernel_size >= 0) {
if ((entry & ~0x7fffffffULL) == 0x80000000)
entry = (int32_t)entry;
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index c91883d..258cccd 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -5,8 +5,6 @@
#define ALIGNED_ONLY
-#define ELF_MACHINE EM_MIPS
-
#define CPUArchState struct CPUMIPSState
#include "config.h"
--
1.9.1
- [Qemu-devel] [PULL v1 07/21] m68k: Remove ELF_MACHINE from cpu.h, (continued)
- [Qemu-devel] [PULL v1 07/21] m68k: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 08/21] cris: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 09/21] moxie: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 10/21] unicore: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 12/21] or32: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 13/21] tricore: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 15/21] sh4: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 16/21] s390: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 14/21] xtensa: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 17/21] sparc: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 18/21] mips: Remove ELF_MACHINE from cpu.h,
Peter Crosthwaite <=
- [Qemu-devel] [PULL v1 19/21] alpha: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 20/21] i386: Rename ELF_MACHINE to be x86 specific, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PULL v1 21/21] ppc: Rename ELF_MACHINE to be PPC specific, Peter Crosthwaite, 2015/09/11
- Re: [Qemu-devel] [PULL v1 00/21] Multi-arch queue, Peter Maydell, 2015/09/11