qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring
Date: Tue, 05 Feb 2013 12:06:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 04.02.2013 22:23, schrieb Peter Maydell:
> On 4 February 2013 20:51, Paolo Bonzini <address@hidden> wrote:
>> Il 04/02/2013 21:33, Peter Maydell ha scritto:
>>>> The $FOO device models should all be in hw/$FOO.  But there are some
>>>> parts that do not fit in a category
>>>
>>> Surely this is what hw/misc is for?
>>
>> It's mostly interrupt/GPIO/DMA/memory/cache controllers.  I placed some
>> of them are in hw/misc because they are in common-obj-y, but I don't
>> like the idea of hw/misc very much.  hw/misc is really for the one-offs
>> such as the tmp105.c temperature controller.
>>
>> If you prefer with creating a bunch of hw/ subdirectories like hw/pic,
>> hw/gpio, hw/dma I can certainly move more stuff out of hw/$TARGET.  As
>> long as there is consensus, it's fine.  But I wanted to avoid
>> proliferation of hw/$FOO directories having only 5-10 files.
> 
> I don't care if devices go in hw/misc or hw/extremely-fine-grained-category
> as long as they don't go in hw/$TARGET :-)

So where would you like a tegra2.c SoC device/object to live?
It depends on ARMCPU and is thus fo me a clear candidate for hw/arm/,
among boards such as ac100.c, kaen.c, ...

And this is not just a question of directory locations: If Tegra2 I2C is
supposed to go to hw/i2c/ then it shouldn't use a hw/tegra2.h or
hw/arm/tegra2.h header but should have its own hw/i2c/tegra_i2c.h
header, which is beyond the scope of a touch-all file movement and
should definitely not be done in one huge patch.

If it takes 120 patches, then we can do it in chunks, but we can't just
give up review of such refactoring series for the goal of doing
something quickly. There's no urgent need to split up the directory
(file system / git limits or the like), so we shouldn't sacrifice being
able to actually work on particular devices in a meaningful way.
Doing this sensibly would also help the NEED_CPU_H patch. QOM'ifying
devices more before moving them can help reduce the amount of headers
needed (or their interdependency), for instance.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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