hw: remove pio_addr_t

pio_addr_t is almost unused, because these days I/O ports are simply
accessed through the address space.  cpu_{in,out}[bwl] themselves 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.

On the other hand even portio_* functions use this type; 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.  Using
uint32_t is enough and avoids the need to include ioport.h everywhere.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini committed 2016-05-19 16:42:30 +02:00
1 parent 63c915526d
commit 89a80e7400
5 files changed
+20 -23

No files matched your search

+4 -4
View File
@@ -726,7 +726,7 @@ static ioreq_t *cpu_get_ioreq(XenIOState *state)
return NULL;
}
static uint32_t do_inp(pio_addr_t addr, unsigned long size)
static uint32_t do_inp(uint32_t addr, unsigned long size)
{
switch (size) {
case 1:
@@ -736,11 +736,11 @@ static uint32_t do_inp(pio_addr_t addr, unsigned long size)
case 4:
return cpu_inl(addr);
default:
hw_error("inp: bad size: %04"FMT_pioaddr" %lx", addr, size);
hw_error("inp: bad size: %04x %lx", addr, size);
}
}
static void do_outp(pio_addr_t addr,
static void do_outp(uint32_t addr,
unsigned long size, uint32_t val)
{
switch (size) {
@@ -751,7 +751,7 @@ static void do_outp(pio_addr_t addr,
case 4:
return cpu_outl(addr, val);
default:
hw_error("outp: bad size: %04"FMT_pioaddr" %lx", addr, size);
hw_error("outp: bad size: %04x %lx", addr, size);
}
}