[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 48/49] hw: remove pio_addr_t

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 48/49] hw: remove pio_addr_t
Date: Wed, 16 Mar 2016 12:21:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 16/03/2016 12:16, Peter Maydell wrote:
>> > Using uint32_t is enough and avoids the need to include ioport.h 
>> > everywhere.
>> >
>> > Signed-off-by: Paolo Bonzini <address@hidden>
> I'm not hugely convinced by this patch -- I think it's nice
> to have a typedef that indicates that you're dealing with an
> IO port address (and not some other kind of address or number).

In theory I agree, but in practice it's just a burden.  It's almost
unused---on one hand that's also because these days I/O ports are simply
accessed through the address space, on the other hand even portio_*
functions use it.

cpu_{in,out}[bwl] are almost unused; monitor.c and xen-hvm.c could use
address_space_read/write directly, since they have an integer size at
hand.  This leaves qtest as the only user of those functions, so we
might as well inline them there.

The only interesting use of pio_addr_t thus is include/hw/sysbus.h.  I
guess I could move it there, but I don't see much benefit in that either.


reply via email to

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