qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Laurent Vivier <laurent@vivier.eu>,
	Greg Ungerer <gerg@uclinux.org>
Subject: [Qemu-devel] [PULL 34/48] m68k: Remove ELF_MACHINE from cpu.h
Date: Tue, 22 Sep 2015 17:05:57 +0200	[thread overview]
Message-ID: <1442934371-12567-35-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1442934371-12567-1-git-send-email-pbonzini@redhat.com>

From: Peter Crosthwaite <crosthwaitepeter@gmail.com>

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 <laurent@vivier.eu>
Cc: Greg Ungerer <gerg@uclinux.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Acked-By: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Greg Ungerer <gerg@uclinux.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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 aa49cd5..c1dea17 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 d4f2073..8b3b775 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 c3365eb..ddeccc5 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 43a9a1c..d195706 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.  */
-- 
2.5.0

  parent reply	other threads:[~2015-09-22 15:07 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 15:05 [Qemu-devel] [PULL 00/48] Misc patches for 2015-09-22 Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 01/48] nbd: convert to use the QAPI SocketAddress object Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 02/48] qemu-nbd: " Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 03/48] utils: rename strtosz to use qemu prefix Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 04/48] tests: add some qemu_strtosz() tests Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 05/48] checkpatch: do not recommend qemu_strtok over strtok Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 06/48] scsi-generic: let guests recognize readonly=on on passthrough devices Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 07/48] Makefile: fix build when VPATH is outside GIT tree Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 08/48] vhost-scsi: include linux/vhost.h Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 09/48] get_maintainer.pl: \C is deprecated Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 10/48] MAINTAINERS: there is no PPC64 TCG backend anymore Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 11/48] MAINTAINERS: Add disassemblers to the various backends Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 12/48] MAINTAINERS: Add more s390 files Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 13/48] MAINTAINERS: add IPack section Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 14/48] MAINTAINERS: add more devices to the PC section Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 15/48] MAINTAINERS: add more devices to the PCI section Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 16/48] MAINTAINERS: add maintainer for character device front-ends Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 17/48] ioapic: coalesce level interrupts Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 18/48] ioapic: fix contents of arbitration register Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 19/48] apic_internal.h: make some apic_get_* functions externally visible Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 20/48] apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESS Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 21/48] apic_internal.h: added more constants Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 22/48] apic_internal.h: fix formatting and drop unused consts Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 23/48] monitor: make monitor_fprintf and mon_get_cpu externally visible Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 24/48] hmp: added local apic dump state Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 25/48] ioapic_internal.h: added more constants Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 26/48] hmp: added io apic dump state Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 27/48] hmp: implemented io apic dump state for TCG Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 28/48] linux_user: elfload: Default ELF_MACHINE to ELF_ARCH Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 29/48] linux-user: elfload: Provide default for elf_check_arch Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 30/48] elf_ops: Fix coding style for EM alias case statement Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 31/48] elf: Update EM_MOXIE definition Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 32/48] arm: Remove ELF_MACHINE from cpu.h Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 33/48] mb: " Paolo Bonzini
2015-09-22 15:05 ` Paolo Bonzini [this message]
2015-09-22 15:05 ` [Qemu-devel] [PULL 35/48] cris: " Paolo Bonzini
2015-09-22 15:05 ` [Qemu-devel] [PULL 36/48] moxie: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 37/48] unicore: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 38/48] lm32: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 39/48] or32: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 40/48] tricore: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 41/48] xtensa: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 42/48] sh4: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 43/48] s390: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 44/48] sparc: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 45/48] mips: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 46/48] alpha: " Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 47/48] i386: Rename ELF_MACHINE to be x86 specific Paolo Bonzini
2015-09-22 15:06 ` [Qemu-devel] [PULL 48/48] ppc: Rename ELF_MACHINE to be PPC specific Paolo Bonzini
2015-09-22 19:41 ` [Qemu-devel] [PULL 00/48] Misc patches for 2015-09-22 Peter Maydell
2015-09-22 20:12   ` Paolo Bonzini

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=1442934371-12567-35-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=gerg@uclinux.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /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).