[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 22/28] Include hw/boards.h a bit less
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 22/28] Include hw/boards.h a bit less |
Date: |
Tue, 30 Jul 2019 13:06:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Eduardo Habkost <address@hidden> writes:
> On Fri, Jul 26, 2019 at 02:05:36PM +0200, Markus Armbruster wrote:
>> hw/boards.h pulls in almost 60 headers. The less we include it into
>> headers, the better. As a first step, drop superfluous inclusions,
>> and downgrade some more to what's actually needed. Gets rid of just
>> one inclusion into a header.
>>
>> Cc: Eduardo Habkost <address@hidden>
>> Cc: Marcel Apfelbaum <address@hidden>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>
> The following files use the MACHINE macro and require
> hw/boards.h, but are touched by this patch:
>
> hw/acpi/cpu.c: MachineState *machine = MACHINE(qdev_get_machine());
> hw/acpi/memory_hotplug.c: MachineState *machine =
> MACHINE(qdev_get_machine());
> hw/i386/intel_iommu.c: MachineState *ms = MACHINE(qdev_get_machine());
> hw/i386/x86-iommu.c: MachineState *ms = MACHINE(qdev_get_machine());
> hw/ppc/spapr_rtas.c: MachineState *ms = MACHINE(qdev_get_machine());
> hw/s390x/s390-stattrib-kvm.c: MachineState *machine =
> MACHINE(qdev_get_machine());
> hw/s390x/s390-stattrib-kvm.c: MachineState *machine =
> MACHINE(qdev_get_machine());
Since they still compile, they obviously still get it indirectly. I'll
drop these hunks.
> Maybe there are other files touched by this patch that require
> struct MachineClass or struct MachineState contents to be
> defined, but this is a bit trickier to verify.
I tried to exclude those, but I might have screwed it up, just like I
screwed up for MACHINE(). I'll double-check.
Thanks!
- [Qemu-devel] [PATCH 01/28] include: Make headers more self-contained, (continued)
- [Qemu-devel] [PATCH 01/28] include: Make headers more self-contained, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 21/28] Include hw/qdev-properties.h less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 22/28] Include hw/boards.h a bit less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 18/28] Include hw/hw.h exactly where needed, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 12/28] Include hw/irq.h a lot less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 28/28] Include sysemu/sysemu.h a lot less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 26/28] Clean up inclusion of sysemu/sysemu.h, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 20/28] Include qemu/main-loop.h less, Markus Armbruster, 2019/07/26