From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h
Date: Tue, 15 Dec 2015 17:50:51 +0100 [thread overview]
Message-ID: <567044EB.7030009@redhat.com> (raw)
In-Reply-To: <CAFEAcA87J4tVwpxq7Xs_auNUK7TahLKqnkiseeKNNzHjkGw18g@mail.gmail.com>
On 15/12/2015 17:06, Peter Maydell wrote:
> > 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.
>
> I would prefer us to provide the typedef. There's no problem
> with older compilers because you just only define the typedef
> in one place (typically in typedefs.h).
typedefs.h generally has target-independent types only (the only
exception is AllwinnerAHCIState; plus FWCfg* and uWireSlave are close
misses). I thought about adding target-arm/typedefs.h or
hw/arm/typedefs.h, but it seemed weird to do that for one type only.
But yes, we can do that too. I went this way first just to check how
many files were affected.
Paolo
prev parent reply other threads:[~2015-12-15 16:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 14:28 [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 1/6] arm: use "struct ARMCPU" in header files Paolo Bonzini
2015-12-15 16:05 ` Peter Maydell
2015-12-17 13:45 ` Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 2/6] mips: use struct CPUMIPSState to avoid need for cpu.h Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 3/6] ppc: use struct to avoid the " Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 4/6] alpha: use AlphaCPU as an opaque type Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 5/6] coldfire: use "struct M68kCPU" in header files Paolo Bonzini
2015-12-15 14:28 ` [Qemu-devel] [PATCH 6/6] sh: use SuperHCPU struct to avoid cpu.h dependency Paolo Bonzini
2015-12-15 16:06 ` [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h Peter Maydell
2015-12-15 16:50 ` Paolo Bonzini [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=567044EB.7030009@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).