From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, imammedo@redhat.com, ani@anisinha.ca,
peter.maydell@linaro.org, laurent@vivier.eu,
edgar.iglesias@gmail.com, Alistair.Francis@wdc.com,
bin.meng@windriver.com, palmer@dabbelt.com,
marcel.apfelbaum@gmail.com, yangxiaojuan@loongson.cn,
gaosong@loongson.cn, richard.henderson@linaro.org, deller@gmx.de,
jasowang@redhat.com, vikram.garhwal@amd.com,
francisco.iglesias@amd.com, clg@kaod.org, kraxel@redhat.com,
marcandre.lureau@redhat.com, riku.voipio@iki.fi,
qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org,
crwulff@gmail.com, marex@denx.de
Subject: Re: [PATCH v2 0/4] Clean up includes
Date: Sun, 8 Jan 2023 01:49:41 -0500 [thread overview]
Message-ID: <20230108014842-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20221222120813.727830-1-armbru@redhat.com>
On Thu, Dec 22, 2022 at 01:08:09PM +0100, Markus Armbruster wrote:
> Back in 2016, we discussed[1] rules for headers, and these were
> generally liked:
>
> 1. Have a carefully curated header that's included everywhere first. We
> got that already thanks to Peter: osdep.h.
>
> 2. Headers should normally include everything they need beyond osdep.h.
> If exceptions are needed for some reason, they must be documented in
> the header. If all that's needed from a header is typedefs, put
> those into qemu/typedefs.h instead of including the header.
>
> 3. Cyclic inclusion is forbidden.
>
> This series fixes a number of rule violations.
I had to drop this for now due to failures on bsd in particular.
See Peter's answer to my pull.
Markus when you merge this feel free to use:
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> It is based on
>
> [PATCH v2 0/4] hw/ppc: Clean up includes
> [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes
> [PATCH v2 0/3] block: Clean up includes
> [PATCH v3 0/5] coroutine: Clean up includes
>
> With all of these applied, just three inclusion loops remain reachable
> from include/:
>
> target/microblaze/cpu.h target/microblaze/mmu.h
>
> target/nios2/cpu.h target/nios2/mmu.h
>
> target/riscv/cpu.h target/riscv/pmp.h
>
> Breaking them would be nice, but I'm out of steam.
>
> v2:
> * Rebased
> * PATCH 3: v1 posted separately
> * PATCH 4: New
>
> [1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
>
> Based-on: <20221222104628.659681-1-armbru@redhat.com>
>
> Markus Armbruster (4):
> include/hw/virtio: Break inclusion loop
> include: Include headers where needed
> include: Don't include qemu/osdep.h
> docs/devel: Rules on #include in headers
>
> docs/devel/style.rst | 7 +++++++
> bsd-user/qemu.h | 1 -
> crypto/block-luks-priv.h | 1 -
> include/exec/plugin-gen.h | 1 +
> include/hw/acpi/erst.h | 3 +++
> include/hw/char/cmsdk-apb-uart.h | 1 +
> include/hw/char/goldfish_tty.h | 1 +
> include/hw/char/xilinx_uartlite.h | 1 +
> include/hw/cris/etraxfs.h | 1 +
> include/hw/cxl/cxl_host.h | 1 -
> include/hw/display/macfb.h | 3 ++-
> include/hw/dma/sifive_pdma.h | 2 ++
> include/hw/i386/ioapic_internal.h | 1 +
> include/hw/i386/sgx-epc.h | 1 +
> include/hw/input/pl050.h | 1 -
> include/hw/intc/goldfish_pic.h | 2 ++
> include/hw/intc/loongarch_pch_msi.h | 2 ++
> include/hw/intc/loongarch_pch_pic.h | 2 ++
> include/hw/intc/nios2_vic.h | 2 ++
> include/hw/misc/mchp_pfsoc_dmc.h | 2 ++
> include/hw/misc/mchp_pfsoc_ioscb.h | 2 ++
> include/hw/misc/mchp_pfsoc_sysreg.h | 2 ++
> include/hw/misc/pvpanic.h | 1 +
> include/hw/misc/sifive_e_prci.h | 3 ++-
> include/hw/misc/sifive_u_otp.h | 3 ++-
> include/hw/misc/sifive_u_prci.h | 3 ++-
> include/hw/misc/virt_ctrl.h | 2 ++
> include/hw/misc/xlnx-versal-pmc-iou-slcr.h | 1 +
> include/hw/net/lasi_82596.h | 2 +-
> include/hw/net/xlnx-zynqmp-can.h | 1 +
> include/hw/ppc/pnv_psi.h | 2 +-
> include/hw/riscv/boot_opensbi.h | 2 ++
> include/hw/riscv/microchip_pfsoc.h | 3 +++
> include/hw/riscv/numa.h | 1 +
> include/hw/riscv/sifive_u.h | 2 ++
> include/hw/riscv/spike.h | 2 +-
> include/hw/riscv/virt.h | 2 +-
> include/hw/ssi/sifive_spi.h | 3 +++
> include/hw/timer/sse-timer.h | 1 +
> include/hw/tricore/triboard.h | 1 -
> include/hw/usb/hcd-dwc3.h | 1 +
> include/hw/usb/hcd-musb.h | 2 ++
> include/hw/usb/xlnx-usb-subsystem.h | 2 ++
> include/hw/usb/xlnx-versal-usb2-ctrl-regs.h | 3 +++
> include/hw/virtio/virtio-mmio.h | 2 +-
> include/hw/virtio/virtio.h | 1 -
> include/qemu/plugin-memory.h | 3 +++
> include/qemu/userfaultfd.h | 1 -
> include/sysemu/dirtyrate.h | 2 ++
> include/sysemu/dump.h | 1 +
> include/user/syscall-trace.h | 1 +
> net/vmnet_int.h | 1 -
> qga/cutils.h | 1 -
> target/hexagon/hex_arch_types.h | 1 -
> target/hexagon/mmvec/macros.h | 1 -
> target/riscv/pmu.h | 1 -
> hw/virtio/virtio-qmp.c | 1 +
> hw/virtio/virtio.c | 1 +
> qga/cutils.c | 3 ++-
> 59 files changed, 82 insertions(+), 22 deletions(-)
>
> --
> 2.38.1
prev parent reply other threads:[~2023-01-08 6:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 12:08 [PATCH v2 0/4] Clean up includes Markus Armbruster
2022-12-22 12:08 ` [PATCH v2 1/4] include/hw/virtio: Break inclusion loop Markus Armbruster
2022-12-23 2:58 ` Jason Wang
2022-12-23 3:31 ` Edgar E. Iglesias
2022-12-22 12:08 ` [PATCH v2 2/4] include: Include headers where needed Markus Armbruster
2022-12-22 12:08 ` [PATCH v2 3/4] include: Don't include qemu/osdep.h Markus Armbruster
2023-01-08 6:51 ` Michael S. Tsirkin
2022-12-22 12:08 ` [PATCH v2 4/4] docs/devel: Rules on #include in headers Markus Armbruster
2022-12-23 10:47 ` Bernhard Beschow
2023-01-09 12:01 ` Markus Armbruster
2022-12-23 23:41 ` Alex Bennée
2022-12-22 12:10 ` [PATCH v2 0/4] Clean up includes Markus Armbruster
2023-01-05 1:50 ` Michael S. Tsirkin
2023-01-08 6:49 ` Michael S. Tsirkin [this message]
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=20230108014842-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Alistair.Francis@wdc.com \
--cc=ani@anisinha.ca \
--cc=armbru@redhat.com \
--cc=bin.meng@windriver.com \
--cc=clg@kaod.org \
--cc=crwulff@gmail.com \
--cc=deller@gmx.de \
--cc=edgar.iglesias@gmail.com \
--cc=francisco.iglesias@amd.com \
--cc=gaosong@loongson.cn \
--cc=imammedo@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=marex@denx.de \
--cc=palmer@dabbelt.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
--cc=vikram.garhwal@amd.com \
--cc=yangxiaojuan@loongson.cn \
/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).