[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/29] hw/i386: Make vmmouse helpers static
From: |
Michael S. Tsirkin |
Subject: |
[PULL 29/29] hw/i386: Make vmmouse helpers static |
Date: |
Mon, 4 May 2020 10:30:23 -0400 |
From: Philippe Mathieu-Daudé <address@hidden>
The vmmouse helpers are only used in hw/i386/vmmouse.c,
make them static.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/i386/pc.h | 4 ----
hw/i386/vmmouse.c | 22 +++++++++++++++++++++-
hw/i386/vmport.c | 23 +----------------------
3 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index de49a57506..05e19455bb 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -129,10 +129,6 @@ typedef struct PCMachineClass {
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled);
-/* vmport.c */
-void vmmouse_get_data(uint32_t *data);
-void vmmouse_set_data(const uint32_t *data);
-
/* pc.c */
extern int fd_bootchk;
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index 78b36f6f5d..b3aef41327 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -25,11 +25,11 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "ui/console.h"
-#include "hw/i386/pc.h"
#include "hw/input/i8042.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "vmport.h"
+#include "cpu.h"
/* debug only vmmouse */
//#define DEBUG_VMMOUSE
@@ -71,6 +71,26 @@ typedef struct VMMouseState
ISAKBDState *i8042;
} VMMouseState;
+static void vmmouse_get_data(uint32_t *data)
+{
+ X86CPU *cpu = X86_CPU(current_cpu);
+ CPUX86State *env = &cpu->env;
+
+ data[0] = env->regs[R_EAX]; data[1] = env->regs[R_EBX];
+ data[2] = env->regs[R_ECX]; data[3] = env->regs[R_EDX];
+ data[4] = env->regs[R_ESI]; data[5] = env->regs[R_EDI];
+}
+
+static void vmmouse_set_data(const uint32_t *data)
+{
+ X86CPU *cpu = X86_CPU(current_cpu);
+ CPUX86State *env = &cpu->env;
+
+ env->regs[R_EAX] = data[0]; env->regs[R_EBX] = data[1];
+ env->regs[R_ECX] = data[2]; env->regs[R_EDX] = data[3];
+ env->regs[R_ESI] = data[4]; env->regs[R_EDI] = data[5];
+}
+
static uint32_t vmmouse_get_status(VMMouseState *s)
{
DPRINTF("vmmouse_get_status()\n");
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 00d47e0c4c..1aaaab691a 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -23,10 +23,10 @@
*/
#include "qemu/osdep.h"
#include "hw/isa/isa.h"
-#include "hw/i386/pc.h"
#include "sysemu/hw_accel.h"
#include "qemu/log.h"
#include "vmport.h"
+#include "cpu.h"
#include "trace.h"
#define VMPORT_CMD_GETVERSION 0x0a
@@ -109,27 +109,6 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint32_t
addr)
return ram_size;
}
-/* vmmouse helpers */
-void vmmouse_get_data(uint32_t *data)
-{
- X86CPU *cpu = X86_CPU(current_cpu);
- CPUX86State *env = &cpu->env;
-
- data[0] = env->regs[R_EAX]; data[1] = env->regs[R_EBX];
- data[2] = env->regs[R_ECX]; data[3] = env->regs[R_EDX];
- data[4] = env->regs[R_ESI]; data[5] = env->regs[R_EDI];
-}
-
-void vmmouse_set_data(const uint32_t *data)
-{
- X86CPU *cpu = X86_CPU(current_cpu);
- CPUX86State *env = &cpu->env;
-
- env->regs[R_EAX] = data[0]; env->regs[R_EBX] = data[1];
- env->regs[R_ECX] = data[2]; env->regs[R_EDX] = data[3];
- env->regs[R_ESI] = data[4]; env->regs[R_EDI] = data[5];
-}
-
static const MemoryRegionOps vmport_ops = {
.read = vmport_ioport_read,
.write = vmport_ioport_write,
--
MST
- [PULL 15/29] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length, (continued)
- [PULL 15/29] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length, Michael S. Tsirkin, 2020/05/04
- [PULL 16/29] nvdimm: Use configurable ACPI IO base and size, Michael S. Tsirkin, 2020/05/04
- [PULL 20/29] bios-tables-test: test pc-dimm and nvdimm coldplug for arm/virt, Michael S. Tsirkin, 2020/05/04
- [PULL 21/29] tests/acpi: add expected tables for bios-tables-test, Michael S. Tsirkin, 2020/05/04
- [PULL 22/29] Refactor vhost_user_set_mem_table functions, Michael S. Tsirkin, 2020/05/04
- [PULL 23/29] acpi: unit-test: Ignore diff in WAET ACPI table, Michael S. Tsirkin, 2020/05/04
- [PULL 25/29] acpi: unit-test: Update WAET ACPI Table expected binaries, Michael S. Tsirkin, 2020/05/04
- [PULL 26/29] hw/i386/pc: Create 'vmport' device in place, Michael S. Tsirkin, 2020/05/04
- [PULL 27/29] hw/i386/vmport: Remove unused 'hw/input/i8042.h' include, Michael S. Tsirkin, 2020/05/04
- [PULL 28/29] hw/i386: Add 'vmport.h' local header, Michael S. Tsirkin, 2020/05/04
- [PULL 29/29] hw/i386: Make vmmouse helpers static,
Michael S. Tsirkin <=
- [PULL 24/29] acpi: Add Windows ACPI Emulated Device Table (WAET), Michael S. Tsirkin, 2020/05/04
- [PULL 17/29] hw/arm/virt: Add nvdimm hot-plug infrastructure, Michael S. Tsirkin, 2020/05/04
- [PULL 19/29] tests: Update ACPI tables list for upcoming arm/virt test changes, Michael S. Tsirkin, 2020/05/04
- [PULL 10/29] virtio-pci: update virtio pci bar layout documentation, Michael S. Tsirkin, 2020/05/04
- [PULL 18/29] hw/arm/virt: Add nvdimm hotplug support, Michael S. Tsirkin, 2020/05/04
- [PULL 04/29] acpi: add aml builder stubs, Michael S. Tsirkin, 2020/05/04
- Re: [PULL 00/29] virtio,acpi,pci,pc: backlog from pre-5.0, Peter Maydell, 2020/05/04