qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h
Date: Tue, 15 Dec 2015 17:50:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]