qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/19] m68k: Remove ELF_MACHINE from cpu.h


From: Greg Ungerer
Subject: Re: [Qemu-devel] [PATCH 05/19] m68k: Remove ELF_MACHINE from cpu.h
Date: Mon, 17 Aug 2015 10:15:54 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

On 16/08/15 09:28, Peter Crosthwaite wrote:
> 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 machine model bootloaders can just pass EM_68K directly, as that
> is architecture specific code.
> 
> This removes another architecture specific definition from the global
> namespace.
> 
> Cc: Laurent Vivier <address@hidden>
> Cc: Greg Ungerer <address@hidden>

Reviewed-by: Greg Ungerer <address@hidden>


> Signed-off-by: Peter Crosthwaite <address@hidden>
> ---
>  hw/m68k/an5206.c     | 2 +-
>  hw/m68k/dummy_m68k.c | 2 +-
>  hw/m68k/mcf5208.c    | 2 +-
>  target-m68k/cpu.h    | 2 --
>  4 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
> index f63ab2b..59e89fe 100644
> --- a/hw/m68k/an5206.c
> +++ b/hw/m68k/an5206.c
> @@ -70,7 +70,7 @@ static void an5206_init(MachineState *machine)
>      }
>  
>      kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
> -                           NULL, NULL, 1, ELF_MACHINE, 0);
> +                           NULL, NULL, 1, EM_68K, 0);
>      entry = elf_entry;
>      if (kernel_size < 0) {
>          kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
> diff --git a/hw/m68k/dummy_m68k.c b/hw/m68k/dummy_m68k.c
> index 5b77d93..3463913 100644
> --- a/hw/m68k/dummy_m68k.c
> +++ b/hw/m68k/dummy_m68k.c
> @@ -49,7 +49,7 @@ static void dummy_m68k_init(MachineState *machine)
>      /* Load kernel.  */
>      if (kernel_filename) {
>          kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
> -                               NULL, NULL, 1, ELF_MACHINE, 0);
> +                               NULL, NULL, 1, EM_68K, 0);
>          entry = elf_entry;
>          if (kernel_size < 0) {
>              kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
> diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
> index 326a42d..cb57cf9 100644
> --- a/hw/m68k/mcf5208.c
> +++ b/hw/m68k/mcf5208.c
> @@ -275,7 +275,7 @@ static void mcf5208evb_init(MachineState *machine)
>      }
>  
>      kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
> -                           NULL, NULL, 1, ELF_MACHINE, 0);
> +                           NULL, NULL, 1, EM_68K, 0);
>      entry = elf_entry;
>      if (kernel_size < 0) {
>          kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL,
> diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
> index 9a62f6c..ebbbeef 100644
> --- a/target-m68k/cpu.h
> +++ b/target-m68k/cpu.h
> @@ -32,8 +32,6 @@
>  
>  #define MAX_QREGS 32
>  
> -#define ELF_MACHINE  EM_68K
> -
>  #define EXCP_ACCESS         2   /* Access (MMU) error.  */
>  #define EXCP_ADDRESS        3   /* Address error.  */
>  #define EXCP_ILLEGAL        4   /* Illegal instruction.  */
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]