qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Michael S. Tsirkin" <mst@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-trivial@nongnu.org, "Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH v4 40/43] i386/pc: move vmport.c to hw/i386/
Date: Fri, 15 Dec 2017 00:30:12 -0300	[thread overview]
Message-ID: <20171215033015.738-41-f4bug@amsat.org> (raw)
In-Reply-To: <20171215033015.738-1-f4bug@amsat.org>

It's a x86-only device, so it does not make sense to keep it
in the shared misc folder.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 hw/{misc => i386}/vmport.c | 17 +++++++++--------
 hw/i386/Makefile.objs      |  1 +
 hw/misc/Makefile.objs      |  2 --
 3 files changed, 10 insertions(+), 10 deletions(-)
 rename hw/{misc => i386}/vmport.c (95%)

diff --git a/hw/misc/vmport.c b/hw/i386/vmport.c
similarity index 95%
rename from hw/misc/vmport.c
rename to hw/i386/vmport.c
index 165500223f..eb880c6def 100644
--- a/hw/misc/vmport.c
+++ b/hw/i386/vmport.c
@@ -28,7 +28,7 @@
 #include "sysemu/hw_accel.h"
 #include "hw/qdev.h"
 
-//#define VMPORT_DEBUG
+/* #define VMPORT_DEBUG */
 
 #define VMPORT_CMD_GETVERSION 0x0a
 #define VMPORT_CMD_GETRAMSIZE 0x14
@@ -38,8 +38,7 @@
 
 #define VMPORT(obj) OBJECT_CHECK(VMPortState, (obj), TYPE_VMPORT)
 
-typedef struct VMPortState
-{
+typedef struct VMPortState {
     ISADevice parent_obj;
 
     MemoryRegion io;
@@ -51,8 +50,9 @@ static VMPortState *port_state;
 
 void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque)
 {
-    if (command >= VMPORT_ENTRIES)
+    if (command >= VMPORT_ENTRIES) {
         return;
+    }
 
     port_state->func[command] = func;
     port_state->opaque[command] = opaque;
@@ -71,14 +71,15 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr,
     cpu_synchronize_state(cs);
 
     eax = env->regs[R_EAX];
-    if (eax != VMPORT_MAGIC)
+    if (eax != VMPORT_MAGIC) {
         return eax;
+    }
 
     command = env->regs[R_ECX];
-    if (command >= VMPORT_ENTRIES)
+    if (command >= VMPORT_ENTRIES) {
         return eax;
-    if (!s->func[command])
-    {
+    }
+    if (!s->func[command]) {
 #ifdef VMPORT_DEBUG
         fprintf(stderr, "vmport: unknown command %x\n", command);
 #endif
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 2e5e1299ad..1548ad1ad0 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -5,6 +5,7 @@ obj-y += pc_sysfw.o
 obj-y += x86-iommu.o intel_iommu.o
 obj-y += amd_iommu.o
 obj-$(CONFIG_XEN) += ../xenpv/ xen/
+obj-$(CONFIG_VMPORT) += vmport.o
 
 obj-y += kvmvapic.o
 obj-y += acpi-build.o
diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
index 10c88a84b4..d517f83e81 100644
--- a/hw/misc/Makefile.objs
+++ b/hw/misc/Makefile.objs
@@ -11,8 +11,6 @@ common-obj-$(CONFIG_EDU) += edu.o
 common-obj-y += unimp.o
 common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o
 
-obj-$(CONFIG_VMPORT) += vmport.o
-
 # ARM devices
 common-obj-$(CONFIG_PL310) += arm_l2x0.o
 common-obj-$(CONFIG_INTEGRATOR_DEBUG) += arm_integrator_debug.o
-- 
2.15.1

  parent reply	other threads:[~2017-12-15  3:32 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  3:29 [Qemu-devel] [PATCH v4 00/43] remove i386/pc dependency from non-PC world (part 1) Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 01/43] MAINTAINERS: add entries for i2c/ppc4xx Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 02/43] MAINTAINERS: add an entry for the i82374 (southbridge) Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 03/43] MAINTAINERS: add an entry for the i8257 (DMA controller) Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 04/43] MAINTAINERS: add an entry for the i82378 (superio) Philippe Mathieu-Daudé
2017-12-15 10:17   ` Thomas Huth
2017-12-15 10:23     ` Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 05/43] MAINTAINERS: add an entry for watchdog/wdt_ib700 Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 06/43] MAINTAINERS: add an entry for input/pckbd.c Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 07/43] MAINTAINERS: add entries for timer/m48t59 Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 08/43] MAINTAINERS: add missing entry for include/hw/net/ Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 09/43] hw: use "qemu/osdep.h" as first #include in source files Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 10/43] hw: remove "qemu/osdep.h" from header files Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 11/43] block: remove "qemu/osdep.h" from header file Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 12/43] misc: remove headers implicitly included Philippe Mathieu-Daudé
2017-12-15  7:40   ` Ben Warren
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 13/43] misc: remove duplicated includes Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 14/43] ppc: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 15/43] i386/hax: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 16/43] i386/hax: remove duplicated include Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 17/43] nios2: remove duplicated includes (in code commented out) Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 18/43] misc: avoid "include/" in include path Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 19/43] numa: remove unused #include Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 20/43] hw/input/vmmouse: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 21/43] hw/misc/pvpanic: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 22/43] hw/ssi/aspeed_smc: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 23/43] amd_iommu: avoid needless includes in header file Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 24/43] misc: remove old i386 dependency Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 25/43] hw/ide: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 26/43] hw/ipmi: " Philippe Mathieu-Daudé
2017-12-15  3:29 ` [Qemu-devel] [PATCH v4 27/43] hw/i2c: " Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 28/43] hw/tpm: " Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 29/43] hw/virtio-balloon: " Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 30/43] hw/unicore32: restrict hw addr defines to source file Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 31/43] hw/timer/i8254: rename pit_init() -> i8254_pit_init() Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 32/43] hw/timer/mc146818: rename rtc_init() -> mc146818_rtc_init() Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 33/43] hw/acpi: ACPI_PM_* defines are not restricted to i386 arch Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 34/43] hw/acpi/ich9: extract ACPI_PM_PROP_TCO_ENABLED from i386/pc Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 35/43] hw/display/vga: "vga.h" only contains registers defs, rename it "vga_regs.h" Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 36/43] hw/display/vga: "vga_int.h" requires "ui/console.h" Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 37/43] hw/display/vga: extract public API from i386/pc to "hw/display/vga.h" Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 38/43] hw/net/ne2000: extract ne2k-isa code from i386/pc to ne2000-isa.c Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 39/43] hw/misc/pvpanic: extract public API from i386/pc to "hw/misc/pvpanic.h" Philippe Mathieu-Daudé
2017-12-15  3:30 ` Philippe Mathieu-Daudé [this message]
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 41/43] i386/pc: move vmmouse.c to hw/i386/ Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 42/43] hw/i386/vmport: replace fprintf() by trace events Philippe Mathieu-Daudé
2017-12-15  3:37   ` Philippe Mathieu-Daudé
2017-12-15  3:30 ` [Qemu-devel] [PATCH v4 43/43] misc: drop old i386 dependency Philippe Mathieu-Daudé
2017-12-15  4:18 ` [Qemu-devel] [PATCH v4 00/43] remove i386/pc dependency from non-PC world (part 1) no-reply
2017-12-15  4:27 ` no-reply
2017-12-15 13:47   ` Philippe Mathieu-Daudé

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=20171215033015.738-41-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=ehabkost@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.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).