From 22d2fb4c594e8ac540f5b3132ce0d7a635112b1a Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sun, 10 May 2015 23:29:10 -0700 Subject: [PATCH] lm32: Remove ELF_MACHINE from cpu.h The bootloaders can just pass EM_LATTICEMICO32 directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Michael Walle Acked-By: Michael Walle Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- hw/lm32/lm32_boards.c | 4 ++-- hw/lm32/milkymist.c | 2 +- target-lm32/cpu.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c index 8e17a82a40..eb553a174e 100644 --- a/hw/lm32/lm32_boards.c +++ b/hw/lm32/lm32_boards.c @@ -142,7 +142,7 @@ static void lm32_evr_init(MachineState *machine) int kernel_size; kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL, - 1, ELF_MACHINE, 0); + 1, EM_LATTICEMICO32, 0); reset_info->bootstrap_pc = entry; if (kernel_size < 0) { @@ -244,7 +244,7 @@ static void lm32_uclinux_init(MachineState *machine) int kernel_size; kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL, - 1, ELF_MACHINE, 0); + 1, EM_LATTICEMICO32, 0); reset_info->bootstrap_pc = entry; if (kernel_size < 0) { diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index cb308500b4..13976b3489 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -176,7 +176,7 @@ milkymist_init(MachineState *machine) /* Boots a kernel elf binary. */ kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL, - 1, ELF_MACHINE, 0); + 1, EM_LATTICEMICO32, 0); reset_info->bootstrap_pc = entry; if (kernel_size < 0) { diff --git a/target-lm32/cpu.h b/target-lm32/cpu.h index cc7726301e..3f874d5111 100644 --- a/target-lm32/cpu.h +++ b/target-lm32/cpu.h @@ -30,8 +30,6 @@ struct CPULM32State; typedef struct CPULM32State CPULM32State; -#define ELF_MACHINE EM_LATTICEMICO32 - #define NB_MMU_MODES 1 #define TARGET_PAGE_BITS 12 static inline int cpu_mmu_index(CPULM32State *env, bool ifetch)