From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afqKJ-0007aV-Ig for qemu-devel@nongnu.org; Tue, 15 Mar 2016 10:52:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afqKE-000494-FX for qemu-devel@nongnu.org; Tue, 15 Mar 2016 10:52:03 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:36273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afqKE-00048k-4Y for qemu-devel@nongnu.org; Tue, 15 Mar 2016 10:51:58 -0400 Received: by mail-wm0-x229.google.com with SMTP id l124so14129623wmf.1 for ; Tue, 15 Mar 2016 07:51:56 -0700 (PDT) Sender: Paolo Bonzini References: <87wpp4m6n1.fsf@blackfin.pond.sub.org> <56E7D884.902@redhat.com> <87oaagj5m9.fsf@blackfin.pond.sub.org> From: Paolo Bonzini Message-ID: <56E82189.9080501@redhat.com> Date: Tue, 15 Mar 2016 15:51:53 +0100 MIME-Version: 1.0 In-Reply-To: <87oaagj5m9.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi On 15/03/2016 13:19, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 15/03/2016 10:29, Markus Armbruster wrote: >>> NEED_CPU_H further adds >>> >>> include/disas/bfd.h >>> include/exec/cpu-all.h >>> include/exec/cpu-common.h >>> include/exec/cpu-defs.h >>> include/exec/exec-all.h >>> include/exec/hwaddr.h >>> include/exec/memattrs.h >>> include/exec/memory.h >>> include/hw/hotplug.h >>> include/hw/i386/apic.h >>> include/hw/irq.h >>> include/hw/qdev-core.h >>> include/qemu/bitmap.h >>> include/qemu/bitops.h >>> include/qemu/int128.h >>> include/qemu/log.h >>> include/qemu/notify.h >>> include/qemu/rcu.h >>> include/qemu/thread-posix.h >>> include/qemu/thread.h >>> include/qom/cpu.h >>> include/qom/object.h >>> include/standard-headers/asm-x86/hyperv.h >>> include/standard-headers/linux/types.h >>> target-i386/cpu-qom.h >>> target-i386/cpu.h >>> target-i386/svm.h >>> tcg/i386/tcg-target.h >>> x86_64-softmmu/config-target.h >> >> FWIW, I'm going to do something about this in 2.7. I have patches to >> remove cpu.h inclusion from qemu-common.h. > > Appreciated! Now pushed to github.com/bonzini/qemu.git branch need-cpu-h. Shortlog follows: Paolo Bonzini (48): include: move some definitions out of qemu-common.h log: do not use CONFIG_USER_ONLY hw: explicitly include qemu-common.h and cpu.h cpu: make cpu-qom.h only include-able from cpu.h target-alpha: make cpu-qom.h not target specific target-arm: make cpu-qom.h not target specific target-cris: make cpu-qom.h not target specific target-i386: make cpu-qom.h not target specific target-lm32: make cpu-qom.h not target specific target-m68k: make cpu-qom.h not target specific target-microblaze: make cpu-qom.h not target specific target-mips: make cpu-qom.h not target specific target-ppc: do not use target_ulong in cpu-qom.h target-ppc: make cpu-qom.h not target specific target-s390x: make cpu-qom.h not target specific target-sh4: make cpu-qom.h not target specific target-sparc: make cpu-qom.h not target specific target-tricore: make cpu-qom.h not target specific target-unicore32: make cpu-qom.h not target specific target-xtensa: make cpu-qom.h not target specific arm: include cpu-qom.h in files that require ARMCPU m68k: include cpu-qom.h in files that require M68KCPU sh4: include cpu-qom.h in files that require M68KCPU alpha: include cpu-qom.h in files that require AlphaCPU mips: use MIPSCPU instead of CPUMIPSState ppc: use PowerPCCPU instead of CPUPPCState arm: remove useless cpu.h inclusion explicitly include qom/cpu.h explicitly include hw/qdev-core.h explicitly include linux/kvm.h apic: move target-dependent definitions to cpu.h include: poison symbols in osdep.h hw: do not use VMSTATE_*TL hw: move CPU state serialization to migration/cpu.h hw: cannot include hw/hw.h from user emulation cpu: move endian-dependent load/store functions to cpu-all.h qemu-common: stop including qemu/bswap.h from qemu-common.h qemu-common: stop including qemu/host-utils.h from qemu-common.h gdbstub: remove includes from gdbstub-xml.c dma: do not depend on kvm_enabled() do not include qemu-common.h in hw/hw.h s390x: move stuff out of cpu.h qemu-common: push cpu.h inclusion out of qemu-common.h arm: move arm_log_exception into .c file mips: move CP0 functions out of cpu.h hw: explicitly include qemu/log.h exec: extract exec/tb-context.h cpu: move exec-all.h inclusion out of cpu.h