Skip to content

Commit

Permalink
hw/core: Move cpu.c, cpu.h from qom/ to hw/core/
Browse files Browse the repository at this point in the history
Suggested-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[Rebased onto merge commit 95a9457; missed instances of qom/cpu.h
in comments replaced]
  • Loading branch information
Markus Armbruster committed Aug 21, 2019
1 parent 17dc579 commit 2e5b09f
Show file tree
Hide file tree
Showing 61 changed files with 60 additions and 62 deletions.
6 changes: 2 additions & 4 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1274,17 +1274,17 @@ Machine core
M: Eduardo Habkost <[email protected]>
M: Marcel Apfelbaum <[email protected]>
S: Supported
F: hw/core/cpu.c
F: hw/core/machine-qmp-cmds.c
F: hw/core/machine.c
F: hw/core/null-machine.c
F: hw/core/numa.c
F: hw/cpu/cluster.c
F: qapi/machine.json
F: qapi/machine-target.json
F: qom/cpu.c
F: include/hw/boards.h
F: include/hw/core/cpu.h
F: include/hw/cpu/cluster.h
F: include/qom/cpu.h
F: include/sysemu/numa.h
T: git https://github.com/ehabkost/qemu.git machine-next

Expand Down Expand Up @@ -2048,12 +2048,10 @@ F: hw/core/qdev*
F: include/hw/qdev*
F: include/monitor/qdev.h
F: include/qom/
X: include/qom/cpu.h
F: qapi/qom.json
F: qapi/qdev.json
F: qdev-monitor.c
F: qom/
X: qom/cpu.c
F: tests/check-qom-interface.c
F: tests/check-qom-proplist.c
F: tests/test-qdev-global-props.c
Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/user-exec-stub.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "sysemu/replay.h"
#include "sysemu/sysemu.h"

Expand Down
2 changes: 1 addition & 1 deletion cpus-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "exec/cpu-common.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "sysemu/cpus.h"

static QemuMutex qemu_cpu_list_lock;
Expand Down
2 changes: 1 addition & 1 deletion exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ void cpu_exec_unrealizefn(CPUState *cpu)
Property cpu_common_props[] = {
#ifndef CONFIG_USER_ONLY
/* Create a memory property for softmmu CPU object,
* so users can wire up its memory. (This can't go in qom/cpu.c
* so users can wire up its memory. (This can't go in hw/core/cpu.c
* because that file is compiled only once for both user-mode
* and system builds.) The default if no link is set up is to use
* the system address space.
Expand Down
2 changes: 1 addition & 1 deletion hw/acpi/cpu_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "hw/acpi/cpu_hotplug.h"
#include "qapi/error.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/i386/pc.h"
#include "qemu/error-report.h"

Expand Down
2 changes: 1 addition & 1 deletion hw/acpi/ich9.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/acpi/acpi.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/acpi/piix4.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "hw/xen/xen.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "trace.h"

#define GPE_BASE 0xafe0
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/smmu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "exec/address-spaces.h"
#include "trace.h"
#include "exec/target_page.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu/jhash.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/virt-acpi-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "qapi/error.h"
#include "qemu/bitmap.h"
#include "trace.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "target/arm/cpu.h"
#include "hw/acpi/acpi-defs.h"
#include "hw/acpi/acpi.h"
Expand Down
1 change: 1 addition & 0 deletions hw/core/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ common-obj-y += irq.o
common-obj-y += hotplug.o
common-obj-$(CONFIG_SOFTMMU) += nmi.o
common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
common-obj-y += cpu.o

common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
common-obj-$(CONFIG_XILINX_AXI) += stream.o
Expand Down
2 changes: 1 addition & 1 deletion qom/cpu.c → hw/core/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "sysemu/hw_accel.h"
#include "qemu/notify.h"
#include "qemu/log.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/core/generic-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

#include "qemu/osdep.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/sysbus.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/core/null-machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

static void machine_none_init(MachineState *mch)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/core/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "qapi/opts-visitor.h"
#include "qapi/qapi-visit-machine.h"
#include "sysemu/qtest.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/mem/pc-dimm.h"
#include "migration/vmstate.h"
#include "hw/boards.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/cpu/a9mpcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "hw/cpu/a9mpcore.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

static void a9mp_priv_set_irq(void *opaque, int irq, int level)
{
Expand Down
2 changes: 1 addition & 1 deletion hw/cpu/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "hw/cpu/cluster.h"
#include "hw/qdev-properties.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "qemu/cutils.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/acpi-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "qemu/bitmap.h"
#include "qemu/error-report.h"
#include "hw/pci/pci.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "target/i386/cpu.h"
#include "hw/misc/pvpanic.h"
#include "hw/timer/hpet.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#include "qapi/error.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/nmi.h"
#include "hw/usb.h"
#include "hw/i386/intel_iommu.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/intc/arm_gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "hw/sysbus.h"
#include "gic_internal.h"
#include "qapi/error.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "trace.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/intc/arm_gicv3_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/intc/arm_gicv3_common.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/isa/lpc_ich9.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "exec/address-spaces.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "hw/nvram/fw_cfg.h"
#include "qemu/cutils.h"

Expand Down
2 changes: 1 addition & 1 deletion hw/misc/imx6_src.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "arm-powerctl.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#ifndef DEBUG_IMX6_SRC
#define DEBUG_IMX6_SRC 0
Expand Down
2 changes: 1 addition & 1 deletion hw/ppc/spapr.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "mmu-hash64.h"
#include "mmu-book3s-v3.h"
#include "cpu-models.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#include "hw/boards.h"
#include "hw/ppc/ppc.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/timer/a9gtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "qemu/bitops.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#ifndef A9_GTIMER_ERR_DEBUG
#define A9_GTIMER_ERR_DEBUG 0
Expand Down
2 changes: 1 addition & 1 deletion hw/timer/arm_mptimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "qapi/error.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define PTIMER_POLICY \
(PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD | \
Expand Down
2 changes: 1 addition & 1 deletion include/exec/cpu-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "exec/cpu-common.h"
#include "exec/memory.h"
#include "qemu/thread.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "qemu/rcu.h"

#define EXCP_INTERRUPT 0x10000 /* async interruption */
Expand Down
2 changes: 1 addition & 1 deletion include/exec/cpu-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "exec/hwaddr.h"
#endif
#include "exec/memattrs.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#include "cpu-param.h"

Expand Down
2 changes: 1 addition & 1 deletion include/exec/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define QEMU_EXEC_LOG_H

#include "qemu/log.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "disas/disas.h"

/* cpu_dump_state() logging functions: */
Expand Down
2 changes: 1 addition & 1 deletion include/hw/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "qapi/qapi-types-machine.h"
#include "qemu/module.h"
#include "qom/object.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

/**
* memory_region_allocate_system_memory - Allocate a board's main memory
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion include/hw/ppc/openpic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define OPENPIC_H

#include "hw/sysbus.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define MAX_CPU 32
#define MAX_MSI 8
Expand Down
2 changes: 1 addition & 1 deletion include/sysemu/hw_accel.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef QEMU_HW_ACCEL_H
#define QEMU_HW_ACCEL_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "sysemu/hax.h"
#include "sysemu/kvm.h"
#include "sysemu/whpx.h"
Expand Down
2 changes: 1 addition & 1 deletion include/sysemu/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define QEMU_KVM_H

#include "qemu/queue.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "exec/memattrs.h"

#ifdef NEED_CPU_H
Expand Down
1 change: 0 additions & 1 deletion qom/Makefile.objs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
qom-obj-y = object.o container.o qom-qobject.o
qom-obj-y += object_interfaces.o

common-obj-y = cpu.o
common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
2 changes: 1 addition & 1 deletion target/alpha/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_ALPHA_CPU_QOM_H
#define QEMU_ALPHA_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define TYPE_ALPHA_CPU "alpha-cpu"

Expand Down
2 changes: 1 addition & 1 deletion target/arm/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_ARM_CPU_QOM_H
#define QEMU_ARM_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

struct arm_boot_info;

Expand Down
2 changes: 1 addition & 1 deletion target/cris/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_CRIS_CPU_QOM_H
#define QEMU_CRIS_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define TYPE_CRIS_CPU "cris-cpu"

Expand Down
2 changes: 1 addition & 1 deletion target/hppa/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_HPPA_CPU_QOM_H
#define QEMU_HPPA_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define TYPE_HPPA_CPU "hppa-cpu"

Expand Down
2 changes: 1 addition & 1 deletion target/hppa/int_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "qemu/log.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"

#ifndef CONFIG_USER_ONLY
static void eval_interrupt(HPPACPU *cpu)
Expand Down
2 changes: 1 addition & 1 deletion target/hppa/mem_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "trace.h"

#ifdef CONFIG_USER_ONLY
Expand Down
2 changes: 1 addition & 1 deletion target/i386/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_I386_CPU_QOM_H
#define QEMU_I386_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"
#include "qemu/notify.h"

#ifdef TARGET_X86_64
Expand Down
2 changes: 1 addition & 1 deletion target/lm32/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_LM32_CPU_QOM_H
#define QEMU_LM32_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define TYPE_LM32_CPU "lm32-cpu"

Expand Down
2 changes: 1 addition & 1 deletion target/m68k/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef QEMU_M68K_CPU_QOM_H
#define QEMU_M68K_CPU_QOM_H

#include "qom/cpu.h"
#include "hw/core/cpu.h"

#define TYPE_M68K_CPU "m68k-cpu"

Expand Down
Loading

0 comments on commit 2e5b09f

Please sign in to comment.