RFC decouple board headers from cpu.h
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest6 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | arm: use "struct ARMCPU" in header fileshw/ include/ include/ +2 more | +19 | 2 replies | |
| 2/6 | mips: use struct CPUMIPSState to avoid need for cpu.hinclude/ | +4 | 0 replies | |
| 3/6 | ppc: use struct to avoid the need for cpu.hinclude/ include/ linux-user/ +1 more | +38 | 0 replies | |
| 4/6 | alpha: use AlphaCPU as an opaque typehw/ | +2 | 0 replies | |
| 5/6 | coldfire: use "struct M68kCPU" in header filesinclude/ | +3 | 0 replies | |
| 6/6 | sh: use SuperHCPU struct to avoid cpu.h dependencyinclude/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h
Hi,
a while ago I started removing cpu.h dependencies from several headers in QEMU. In particular, I wanted to put an end to qemu-common.h's including cpu.h and vice versa. This is useful for two reasons: 1) because both headers bring in a lot of dependencies and thus very small changes can cause complete recompilations of target-dependent code;
2) in order to remove indirect inclusions of other header files, which often come from cpu.h itself.
These patches are perhaps the only somewhat controversial part. Generally, we add opaque typedefs to typedefs.h in order to avoid indirect header inclusions. However, this might not be desirable for target specific types such as FooCPU. These types are used mostly in headers for boards, and thus this series uses struct explicitly in those headers. Adding a typedef breaks on older compilers that do not like redefinitions of typedefs.
Everything else is just extremely boring: code movement out of our catch-all header files, or pushing #includes down to the users.
Opinions?
Paolo
Paolo Bonzini (6):
arm: use "struct ARMCPU" in header files
mips: use struct CPUMIPSState to avoid need for cpu.h
ppc: use struct to avoid the need for cpu.h
alpha: use AlphaCPU as an opaque type
coldfire: use "struct M68kCPU" in header files
sh: use SuperHCPU struct to avoid cpu.h dependency
hw/alpha/alpha_sys.h | 3 ++- hw/arm/strongarm.h | 2 +- include/hw/arm/arm.h | 12 +++++++----- include/hw/arm/exynos4210.h | 5 +++-- include/hw/arm/omap.h | 4 +++- include/hw/arm/pxa.h | 8 +++++--- include/hw/m68k/mcf.h | 5 +++-- include/hw/mips/cpudevs.h | 6 ++++-- include/hw/ppc/ppc.h | 36 +++++++++++++++++++++--------------- include/hw/ppc/ppc4xx.h | 17 +++++++++++------ include/hw/sh4/sh.h | 3 ++- linux-user/main.c | 4 ++-- target-ppc/cpu.h | 10 ++++------ 13 files changed, 68 insertions(+), 47 deletions(-)
Signature · 1 line
1.8.3.1