hw: Clean up hw/i386 headers (and few alpha/hppa)
cover hw: Clean up hw/i386 headers (and few alpha/hppa)
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.html
This part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "hw/i386/pc.h" I had to fix them too.
Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" hw/timer/hpet: Include "exec/address-spaces.h" hw/pci-host/q35: Include "qemu/range.h" hw/i2c/smbus_ich9: Include "qemu/range.h" hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includes
hw/acpi/cpu_hotplug.c | 1 + hw/acpi/ich9.c | 2 +- hw/acpi/piix4.c | 1 + hw/alpha/alpha_sys.h | 1 - hw/alpha/dp264.c | 1 + hw/hppa/machine.c | 1 + hw/i2c/smbus_ich9.c | 1 + hw/i386/acpi-build.c | 1 + hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/input/pckbd.c | 1 - hw/isa/lpc_ich9.c | 2 -- hw/pci-host/piix.c | 1 + hw/pci-host/q35.c | 1 + hw/timer/hpet.c | 2 +- hw/timer/twl92230.c | 1 - hw/usb/dev-storage.c | 1 - hw/xen/xen_pt_load_rom.c | 4 ---- include/hw/i386/ich9.h | 1 - include/hw/i386/intel_iommu.h | 4 ---- include/hw/i386/ioapic_internal.h | 1 - include/hw/i386/pc.h | 12 +++--------- include/hw/pci-host/q35.h | 8 +------- vl.c | 1 + 25 files changed, 18 insertions(+), 34 deletions(-)
Signature · 1 line
2.21.0
PATCH 1/20 vl: Add missing "hw/boards.h" include
vl.c calls machine_usb() declared in "hw/boards.h". Include it.
This fixes (when modifying unrelated headers):
vl.c:1283:10: error: implicit declaration of function 'machine_usb' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (!machine_usb(current_machine)) {
^
vl.c:1283:10: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
vl.c:1283:22: error: use of undeclared identifier 'current_machine'
if (!machine_usb(current_machine)) {
^--- vl.c | 1 + 1 file changed, 1 insertion(+)
vl.c +1 -0
@@ -25,6 +25,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/units.h" +#include "hw/boards.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "qemu-version.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 2/20 hw/southbridge/ich9: Removed unused headers
In reply to Philippe Mathieu-DaudéThe ICH9 chipset is not X86/PC specific.
These files don't use anything declared by the "hw/i386/pc.h" or "hw/i386/ioapic.h" headers. Remove them.
--- hw/acpi/ich9.c | 1 - hw/isa/lpc_ich9.c | 2 -- include/hw/i386/ich9.h | 1 - 3 files changed, 4 deletions(-)
hw/acpi/ich9.c +0 -1
@@ -27,7 +27,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" #include "qemu/timer.h"
hw/isa/lpc_ich9.c +0 -2
@@ -35,10 +35,8 @@#include "hw/isa/isa.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "hw/i386/pc.h" #include "hw/irq.h" #include "hw/isa/apm.h" -#include "hw/i386/ioapic.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" #include "hw/i386/ich9.h"
include/hw/i386/ich9.h +0 -1
@@ -5,7 +5,6 @@#include "hw/sysbus.h" #include "hw/i386/pc.h" #include "hw/isa/apm.h" -#include "hw/i386/ioapic.h" #include "hw/pci/pci.h" #include "hw/pci/pcie_host.h" #include "hw/pci/pci_bridge.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 3/20 hw/input/pckbd: Remove unused "hw/i386/pc.h" header
In reply to Philippe Mathieu-DaudéThe keyboard controller model don't need anything from "hw/i386/pc.h". Remove it.
--- hw/input/pckbd.c | 1 - 1 file changed, 1 deletion(-)
hw/input/pckbd.c +0 -1
@@ -26,7 +26,6 @@#include "qemu/log.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" -#include "hw/i386/pc.h" #include "hw/input/ps2.h" #include "hw/irq.h" #include "hw/input/i8042.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 4/20 hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header
In reply to Philippe Mathieu-DaudéThe "ioapic_internal.h" does not use anything from "hw/i386/ioapic.h", remove it.
--- include/hw/i386/ioapic_internal.h | 1 - 1 file changed, 1 deletion(-)
include/hw/i386/ioapic_internal.h +0 -1
@@ -23,7 +23,6 @@#define QEMU_IOAPIC_INTERNAL_H #include "exec/memory.h" -#include "hw/i386/ioapic.h" #include "hw/sysbus.h" #include "qemu/notify.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 5/20 hw/timer: Remove unused "ui/console.h" header
In reply to Philippe Mathieu-DaudéThe timer models don't need anything from "ui/console.h". Remove it.
--- hw/timer/hpet.c | 1 - hw/timer/twl92230.c | 1 - 2 files changed, 2 deletions(-)
hw/timer/hpet.c +0 -1
@@ -27,7 +27,6 @@#include "qemu/osdep.h" #include "hw/i386/pc.h" #include "hw/irq.h" -#include "ui/console.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/timer.h"
hw/timer/twl92230.c +0 -1
@@ -27,7 +27,6 @@#include "migration/qemu-file-types.h" #include "migration/vmstate.h" #include "sysemu/sysemu.h" -#include "ui/console.h" #include "qemu/bcd.h" #include "qemu/module.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 6/20 hw/usb/dev-storage: Remove unused "ui/console.h" header
In reply to Philippe Mathieu-DaudéThe USB models related to storage don't need anything from "ui/console.h". Remove it.
--- hw/usb/dev-storage.c | 1 - 1 file changed, 1 deletion(-)
hw/usb/dev-storage.c +0 -1
@@ -17,7 +17,6 @@#include "desc.h" #include "hw/qdev-properties.h" #include "hw/scsi/scsi.h" -#include "ui/console.h" #include "migration/vmstate.h" #include "monitor/monitor.h" #include "sysemu/sysemu.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 7/20 hw/i386/intel_iommu: Remove unused includes
In reply to Philippe Mathieu-Daudéintel_iommu.h does not use any of these includes, remove them.
--- include/hw/i386/intel_iommu.h | 4 ---- 1 file changed, 4 deletions(-)
include/hw/i386/intel_iommu.h +0 -4
@@ -22,11 +22,7 @@#ifndef INTEL_IOMMU_H #define INTEL_IOMMU_H -#include "sysemu/dma.h" #include "hw/i386/x86-iommu.h" -#include "hw/i386/ioapic.h" -#include "hw/pci/msi.h" -#include "hw/sysbus.h" #include "qemu/iova-tree.h" #define TYPE_INTEL_IOMMU_DEVICE "intel-iommu"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 8/20 hw/xen/xen_pt_load_rom: Remove unused includes
In reply to Philippe Mathieu-Daudéxen_pt_load_rom.c does not use any of these includes, remove them.
--- hw/xen/xen_pt_load_rom.c | 4 ---- 1 file changed, 4 deletions(-)
hw/xen/xen_pt_load_rom.c +0 -4
@@ -3,12 +3,8 @@*/ #include "qemu/osdep.h" #include "qapi/error.h" -#include "hw/i386/pc.h" #include "qemu/error-report.h" -#include "ui/console.h" #include "hw/loader.h" -#include "monitor/monitor.h" -#include "qemu/range.h" #include "hw/pci/pci.h" #include "xen_pt.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 9/20 hw/alpha/alpha_sys: Remove unused "hw/ide.h" header
In reply to Philippe Mathieu-Daudéalpha_sys.h does not use anything from the "hw/ide.h" header. Remove it.
--- hw/alpha/alpha_sys.h | 1 - 1 file changed, 1 deletion(-)
hw/alpha/alpha_sys.h +0 -1
@@ -6,7 +6,6 @@#include "target/alpha/cpu-qom.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/i386/pc.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 10/20 hw/alpha/dp264: Include "net/net.h"
In reply to Philippe Mathieu-Daudéhw/alpha/dp264.c uses NICInfo variables which are declared in "net/net.h". Include it.
This fixes (when modifying unrelated headers):
hw/alpha/dp264.c:89:21: error: use of undeclared identifier 'nb_nics'
for (i = 0; i < nb_nics; i++) {
^
hw/alpha/dp264.c:90:30: error: use of undeclared identifier 'nd_table'
pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL);
^--- hw/alpha/dp264.c | 1 + 1 file changed, 1 insertion(+)
hw/alpha/dp264.c +1 -0
@@ -20,6 +20,7 @@#include "hw/isa/superio.h" #include "hw/dma/i8257.h" #include "qemu/cutils.h" +#include "net/net.h" #define MAX_IDE_BUS 2
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 11/20 hw/hppa/machine: Include "net/net.h"
In reply to Philippe Mathieu-Daudéhw/hppa/machine.c uses NICInfo variables which are declared in "net/net.h". Include it.
This fixes (when modifying unrelated headers):
hw/hppa/machine.c:126:21: error: use of undeclared identifier 'nb_nics'
for (i = 0; i < nb_nics; i++) {
^
hw/hppa/machine.c:127:30: error: use of undeclared identifier 'nd_table'
pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL);
^--- hw/hppa/machine.c | 1 + 1 file changed, 1 insertion(+)
hw/hppa/machine.c +1 -0
@@ -20,6 +20,7 @@#include "qemu/units.h" #include "qapi/error.h" #include "qemu/log.h" +#include "net/net.h" #define MAX_IDE_BUS 2
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 12/20 hw/acpi/cpu_hotplug: Include "hw/pci/pci.h"
In reply to Philippe Mathieu-Daudéhw/acpi/cpu_hotplug.c calls pci_address_space_io(). Include "hw/pci/pci.h" which declares it.
This fixes (when modifying unrelated headers):
hw/acpi/cpu_hotplug.c:103:28: error: implicit declaration of function 'pci_address_space_io' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
MemoryRegion *parent = pci_address_space_io(PCI_DEVICE(gpe_cpu->device));
^--- hw/acpi/cpu_hotplug.c | 1 + 1 file changed, 1 insertion(+)
hw/acpi/cpu_hotplug.c +1 -0
@@ -14,6 +14,7 @@#include "qapi/error.h" #include "hw/core/cpu.h" #include "hw/i386/pc.h" +#include "hw/pci/pci.h" #include "qemu/error-report.h" #define CPU_EJECT_METHOD "CPEJ"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 13/20 hw/timer/hpet: Include "exec/address-spaces.h"
In reply to Philippe Mathieu-Daudéhw/timer/hpet.c calls address_space_stl_le() declared in "exec/address-spaces.h". Include it.
This fixes (when modifying unrelated headers):
hw/timer/hpet.c:210:31: error: use of undeclared identifier 'address_space_memory'
address_space_stl_le(&address_space_memory, timer->fsb >> 32,
^~~~~~~~~~~~~~~~~~~~--- hw/timer/hpet.c | 1 + 1 file changed, 1 insertion(+)
hw/timer/hpet.c +1 -0
@@ -35,6 +35,7 @@#include "hw/timer/mc146818rtc.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" +#include "exec/address-spaces.h" //#define HPET_DEBUG #ifdef HPET_DEBUG
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 08/20] hw/xen/xen_pt_load_rom: Remove unused includes
In reply to Philippe Mathieu-DaudéQuoted 4 lines · Philippe Mathieu-Daudé
xen_pt_load_rom.cdoes not use any of these includes, remove them.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 22 lines
--- hw/xen/xen_pt_load_rom.c | 4 ---- 1 file changed, 4 deletions(-)hw/xen/xen_pt_load_rom.c +0
-5@@ -3,12 +3,8 @@*/ #include "qemu/osdep.h" #include "qapi/error.h" -#include "hw/i386/pc.h" #include "qemu/error-report.h" -#include "ui/console.h" #include "hw/loader.h" -#include "monitor/monitor.h" -#include "qemu/range.h" #include "hw/pci/pci.h" #include "xen_pt.h" --
Quoted 2 lines
2.21.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 14/20 hw/pci-host/q35: Include "qemu/range.h"
In reply to Philippe Mathieu-DaudéThe MCHPCIState structure uses the Range type which is declared in "qemu/range.h". Include it.
This fixes (when modifying unrelated headers):
In file included from hw/pci-host/q35.c:32:
include/hw/pci-host/q35.h:57:11: error: field has incomplete type 'Range' (aka 'struct Range')
Range pci_hole;
^
include/qemu/typedefs.h:116:16: note: forward declaration of 'struct Range'
typedef struct Range Range;
^--- include/hw/pci-host/q35.h | 1 + 1 file changed, 1 insertion(+)
include/hw/pci-host/q35.h +1 -0
@@ -32,6 +32,7 @@#include "hw/acpi/ich9.h" #include "hw/pci-host/pam.h" #include "hw/i386/intel_iommu.h" +#include "qemu/range.h" #define TYPE_Q35_HOST_DEVICE "q35-pcihost"#define Q35_HOST_DEVICE (obj) \
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 15/20 hw/i2c/smbus_ich9: Include "qemu/range.h"
In reply to Philippe Mathieu-Daudéhw/i2c/smbus_ich9.c calls range_covers_byte(). Include "qemu/range.h" which declares it.
This fixes (when modifying unrelated headers):
hw/i2c/smbus_ich9.c:66:9: error: implicit declaration of function 'range_covers_byte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (range_covers_byte(address, len, ICH9_SMB_HOSTC)) {
^--- hw/i2c/smbus_ich9.c | 1 + 1 file changed, 1 insertion(+)
hw/i2c/smbus_ich9.c +1 -0
@@ -21,6 +21,7 @@*/ #include "qemu/osdep.h" +#include "qemu/range.h" #include "hw/i2c/pm_smbus.h" #include "hw/pci/pci.h" #include "migration/vmstate.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 16/20 hw/pci-host/piix: Include "qemu/range.h"
In reply to Philippe Mathieu-Daudéhw/pci-host/piix.c calls various functions from the Range API. Include "qemu/range.h" which declares them.
This fixes (when modifying unrelated headers):
hw/pci-host/i440fx.c:54:11: error: field has incomplete type 'Range' (aka 'struct Range')
Range pci_hole;
^
include/qemu/typedefs.h:116:16: note: forward declaration of 'struct Range'
typedef struct Range Range;
^
hw/pci-host/i440fx.c:126:9: error: implicit declaration of function 'ranges_overlap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ranges_overlap(address, len, I440FX_PAM, I440FX_PAM_SIZE) ||
^
hw/pci-host/i440fx.c:126:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
hw/pci-host/i440fx.c:127:9: error: implicit declaration of function 'range_covers_byte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
range_covers_byte(address, len, I440FX_SMRAM)) {
^
hw/pci-host/i440fx.c:127:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
hw/pci-host/i440fx.c:189:13: error: implicit declaration of function 'range_is_empty' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
val64 = range_is_empty(&s->pci_hole) ? 0 : range_lob(&s->pci_hole);
^--- hw/pci-host/piix.c | 1 + 1 file changed, 1 insertion(+)
hw/pci-host/piix.c +1 -0
@@ -23,6 +23,7 @@*/ #include "qemu/osdep.h" +#include "qemu/range.h" #include "hw/i386/pc.h" #include "hw/irq.h" #include "hw/pci/pci.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 17/20 hw/acpi: Include "hw/mem/nvdimm.h"
In reply to Philippe Mathieu-DaudéBoth ich9.c and piix4.c use methods/definitions declared in the NVDIMM device header. Include it.
This fixes (when modifying unrelated headers):
hw/acpi/ich9.c:507:46: error: use of undeclared identifier 'TYPE_NVDIMM'
if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
^
hw/acpi/ich9.c:508:13: error: implicit declaration of function 'nvdimm_acpi_plug_cb' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_acpi_plug_cb(hotplug_dev, dev);
^
hw/acpi/piix4.c:403:46: error: use of undeclared identifier 'TYPE_NVDIMM'
if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
^
hw/acpi/piix4.c:404:13: error: implicit declaration of function 'nvdimm_acpi_plug_cb' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_acpi_plug_cb(hotplug_dev, dev);
^--- hw/acpi/ich9.c | 1 + hw/acpi/piix4.c | 1 + 2 files changed, 2 insertions(+)
hw/acpi/ich9.c +1 -0
@@ -39,6 +39,7 @@#include "hw/i386/ich9.h" #include "hw/mem/pc-dimm.h" +#include "hw/mem/nvdimm.h" //#define DEBUG
hw/acpi/piix4.c +1 -0
@@ -39,6 +39,7 @@#include "hw/acpi/cpu.h" #include "hw/hotplug.h" #include "hw/mem/pc-dimm.h" +#include "hw/mem/nvdimm.h" #include "hw/acpi/memory_hotplug.h" #include "hw/acpi/acpi_dev_interface.h" #include "hw/xen/xen.h"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 18/20 hw/i386: Include "hw/mem/nvdimm.h"
In reply to Philippe Mathieu-DaudéAll this files use methods/definitions declared in the NVDIMM device header. Include it.
This fixes (when modifying unrelated headers):
hw/i386/acpi-build.c:2733:9: error: implicit declaration of function 'nvdimm_build_acpi' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_build_acpi(table_offsets, tables_blob, tables->linker,
^
hw/i386/pc.c:1996:61: error: use of undeclared identifier 'TYPE_NVDIMM'
const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
^
hw/i386/pc.c:2032:55: error: use of undeclared identifier 'TYPE_NVDIMM'
bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
^
hw/i386/pc.c:2040:9: error: implicit declaration of function 'nvdimm_plug' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_plug(ms->nvdimms_state);
^
hw/i386/pc.c:2040:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
nvdimm_plug(ms->nvdimms_state);
^
hw/i386/pc.c:2065:42: error: use of undeclared identifier 'TYPE_NVDIMM'
if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
^
hw/i386/pc_i440fx.c:307:9: error: implicit declaration of function 'nvdimm_init_acpi_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_init_acpi_state(machine->nvdimms_state, system_io,
^
hw/i386/pc_q35.c:332:9: error: implicit declaration of function 'nvdimm_init_acpi_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nvdimm_init_acpi_state(machine->nvdimms_state, system_io,
^--- hw/i386/acpi-build.c | 1 + hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + 4 files changed, 4 insertions(+)
hw/i386/acpi-build.c +1 -0
@@ -48,6 +48,7 @@#include "hw/timer/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/mem/memory-device.h" +#include "hw/mem/nvdimm.h" #include "sysemu/numa.h" #include "sysemu/reset.h"
hw/i386/pc.c +1 -0
@@ -73,6 +73,7 @@#include "hw/boards.h" #include "acpi-build.h" #include "hw/mem/pc-dimm.h" +#include "hw/mem/nvdimm.h" #include "qapi/error.h" #include "qapi/qapi-visit-common.h" #include "qapi/visitor.h"
hw/i386/pc_piix.c +1 -0
@@ -58,6 +58,7 @@#include "migration/misc.h" #include "kvm_i386.h" #include "sysemu/numa.h" +#include "hw/mem/nvdimm.h" #define MAX_IDE_BUS 2
hw/i386/pc_q35.c +1 -0
@@ -53,6 +53,7 @@#include "qapi/error.h" #include "qemu/error-report.h" #include "sysemu/numa.h" +#include "hw/mem/nvdimm.h" /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 19/20 hw/pci-host/q35: Remove unused includes
In reply to Philippe Mathieu-DaudéOnly q35.c requires declarations from "hw/i386/pc.h", move it there. Remove all the includes not used by "q35.h".
--- hw/pci-host/q35.c | 1 + include/hw/pci-host/q35.h | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-)
hw/pci-host/q35.c +1 -0
@@ -29,6 +29,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/pci-host/q35.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h"
include/hw/pci-host/q35.h +0 -7
@@ -22,16 +22,9 @@#ifndef HW_Q35_H #define HW_Q35_H -#include "hw/isa/isa.h" -#include "hw/sysbus.h" -#include "hw/i386/pc.h" -#include "hw/isa/apm.h" #include "hw/pci/pci.h" #include "hw/pci/pcie_host.h" -#include "hw/acpi/acpi.h" -#include "hw/acpi/ich9.h" #include "hw/pci-host/pam.h" -#include "hw/i386/intel_iommu.h" #include "qemu/range.h" #define TYPE_Q35_HOST_DEVICE "q35-pcihost"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 20/20 hw/i386/pc: Clean up includes
In reply to Philippe Mathieu-DaudéVarious headers are not required by hw/i386/pc.h:
- "qemu/range.h"
- "qemu/bitmap.h"
- "qemu/module.h"
- "exec/memory.h"
- "hw/pci/pci.h"
- "hw/mem/pc-dimm.h"
- "hw/mem/nvdimm.h"
- "net/net.h"
Remove them.
Add 3 headers that were missing:
- "hw/hotplug.h"
PCMachineState::acpi_dev is of type HotplugHandler
- "qemu/notify.h"
PCMachineState::machine_done is of type Notifier
- "qapi/qapi-types-common.h"
PCMachineState::vmport/smm is of type OnOffAuto
--- include/hw/i386/pc.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
include/hw/i386/pc.h +3 -9
@@ -1,21 +1,15 @@#ifndef HW_PC_H #define HW_PC_H -#include "exec/memory.h" +#include "qemu/notify.h" +#include "qapi/qapi-types-common.h" #include "hw/boards.h" #include "hw/isa/isa.h" #include "hw/block/fdc.h" #include "hw/block/flash.h" -#include "net/net.h" #include "hw/i386/ioapic.h" - -#include "qemu/range.h" -#include "qemu/bitmap.h" -#include "qemu/module.h" -#include "hw/pci/pci.h" -#include "hw/mem/pc-dimm.h" -#include "hw/mem/nvdimm.h" #include "hw/acpi/acpi_dev_interface.h" +#include "hw/hotplug.h" #define HPET_INTCAP "hpet-intcap"
Signature · 7 lines
2.21.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 02/20] hw/southbridge/ich9: Removed unused headers
In reply to Philippe Mathieu-DaudéQuoted 6 lines · Philippe Mathieu-Daudé
The ICH9 chipset is not X86/PC specific.
These files don't use anything declared by the "
hw/i386/pc.h" or "hw/i386/ioapic.h" headers. Remove them.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 46 lines
--- hw/acpi/ich9.c | 1 - hw/isa/lpc_ich9.c | 2 -- include/hw/i386/ich9.h | 1 - 3 files changed, 4 deletions(-)hw/acpi/ich9.c +0
-1@@ -27,7 +27,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "hw/i386/pc.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" #include "qemu/timer.h" hw/isa/lpc_ich9.c +0
-2@@ -35,10 +35,8 @@#include "hw/isa/isa.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "hw/i386/pc.h" #include "hw/irq.h" #include "hw/isa/apm.h" -#include "hw/i386/ioapic.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" #include "hw/i386/ich9.h" include/hw/i386/ich9.h +0
-1@@ -5,7 +5,6 @@#include "hw/sysbus.h" #include "hw/i386/pc.h" #include "hw/isa/apm.h" -#include "hw/i386/ioapic.h" #include "hw/pci/pci.h" #include "hw/pci/pcie_host.h" #include "hw/pci/pci_bridge.h"
Signature · 6 lines
—js _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 55 lines · Philippe Mathieu-Daudé
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.htmlThis part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "
hw/i386/pc.h" I had to fix them too.Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" hw/timer/hpet: Include "exec/address-spaces.h" hw/pci-host/q35: Include "qemu/range.h" hw/i2c/smbus_ich9: Include "qemu/range.h" hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includeshw/acpi/cpu_hotplug.c | 1 + hw/acpi/ich9.c | 2 +- hw/acpi/piix4.c | 1 + hw/alpha/alpha_sys.h | 1 - hw/alpha/dp264.c | 1 + hw/hppa/machine.c | 1 + hw/i2c/smbus_ich9.c | 1 + hw/i386/acpi-build.c | 1 + hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + hw/input/pckbd.c | 1 - hw/isa/lpc_ich9.c | 2 -- hw/pci-host/piix.c | 1 + hw/pci-host/q35.c | 1 + hw/timer/hpet.c | 2 +- hw/timer/twl92230.c | 1 - hw/usb/dev-storage.c | 1 -
Quoted 9 lines
hw/xen/xen_pt_load_rom.c | 4 ---- include/hw/i386/ich9.h | 1 - include/hw/i386/intel_iommu.h | 4 ---- include/hw/i386/ioapic_internal.h | 1 - include/hw/i386/pc.h | 12 +++--------- include/hw/pci-host/q35.h | 8 +------- vl.c | 1 + 25 files changed, 18 insertions(+), 34 deletions(-)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 28 lines · Philippe Mathieu-Daudé
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.htmlThis part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "
hw/i386/pc.h" I had to fix them too.Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h"
Quoted 8 lines
hw/timer/hpet: Include "
exec/address-spaces.h"
hw/pci-host/q35: Include "qemu/range.h"
hw/i2c/smbus_ich9: Include "qemu/range.h"
hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includes
Laurent, since this series is fully reviewed, can it go via your qemu-trivial tree?
Thanks,
Phil.
Le 26/10/2019 à 14:20, Philippe Mathieu-Daudé a écrit :
Quoted 39 lines
Hi,
Quoted 28 lines · Philippe Mathieu-Daudé
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.htmlThis part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "
hw/i386/pc.h" I had to fix them too.Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h"Quoted 8 lines
hw/timer/hpet: Include "
exec/address-spaces.h"
hw/pci-host/q35: Include "qemu/range.h"
hw/i2c/smbus_ich9: Include "qemu/range.h"
hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includes
Quoted 2 lines
Laurent, since this series is fully reviewed, can it go via your qemu-trivial tree?
I'll try but I'm not sure to have the time to do that before the softfreeze.
Thanks,
Laurent
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 08/20] hw/xen/xen_pt_load_rom: Remove unused includes
In reply to Paul DurrantQuoted 7 lines · Paul Durrant
Quoted 4 lines · Philippe Mathieu-Daudé
xen_pt_load_rom.cdoes not use any of these includes, remove them.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Paul Durrant <[email protected]>
Hi,
I've added this patch to a pull requests for the xen.
Cheers,
Signature · 6 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 40 lines · Laurent Vivier
Le 26/10/2019 à 14:20, Philippe Mathieu-Daudé a écrit :
Quoted 39 lines
Hi,
Quoted 36 lines · Philippe Mathieu-Daudé
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.htmlThis part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "
hw/i386/pc.h" I had to fix them too.Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" hw/timer/hpet: Include "exec/address-spaces.h" hw/pci-host/q35: Include "qemu/range.h" hw/i2c/smbus_ich9: Include "qemu/range.h" hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includes
Quoted 4 lines
Quoted 2 lines
Laurent, since this series is fully reviewed, can it go via your qemu-trivial tree?
I'll try but I'm not sure to have the time to do that before the softfreeze.
Ping :)
Paolo
Laurent Vivier
AppliedLe 27/02/2020 à 14:28, Paolo Bonzini a écrit :
Quoted 41 lines · Laurent Vivier
Quoted 40 lines
Le 26/10/2019 à 14:20, Philippe Mathieu-Daudé a écrit :
Quoted 39 lines
Hi,
Quoted 36 lines · Philippe Mathieu-Daudé
This is a follow-up of Markus's cleanup series:
Tame a few "touch this, recompile the world"
https://www.mail-archive.com/[email protected]/msg635748.htmlThis part is mostly restricted to X86, but since some file from the Alpha/PA-RISC machines include "
hw/i386/pc.h" I had to fix them too.Eventually I'll succeed at removing hw/i386/ dependency on non-X86 platforms (Quest I started 2 years ago...).
Regards,
Phil.
Philippe Mathieu-Daudé (20):
vl: Add missing "hw/boards.h" include hw/southbridge/ich9: Removed unused headers hw/input/pckbd: Remove unused "hw/i386/pc.h" header hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header hw/timer: Remove unused "ui/console.h" header hw/usb/dev-storage: Remove unused "ui/console.h" header hw/i386/intel_iommu: Remove unused includes hw/xen/xen_pt_load_rom: Remove unused includes hw/alpha/alpha_sys: Remove unused "hw/ide.h" header hw/alpha/dp264: Include "net/net.h"
hw/hppa/machine: Include "net/net.h" hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" hw/timer/hpet: Include "exec/address-spaces.h" hw/pci-host/q35: Include "qemu/range.h" hw/i2c/smbus_ich9: Include "qemu/range.h" hw/pci-host/piix: Include "qemu/range.h"
hw/acpi: Include "hw/mem/nvdimm.h"
hw/i386: Include "hw/mem/nvdimm.h"
hw/pci-host/q35: Remove unused includes
hw/i386/pc: Clean up includes
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Laurent, since this series is fully reviewed, can it go via your qemu-trivial tree?
I'll try but I'm not sure to have the time to do that before the softfreeze.
Ping :)
Applied v2 to my trivial-patches branch.
Thanks,
Laurent
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel