On 10/16/2011 07:21 PM, Jan Kiszka wrote: > From: Jan Kiszka <jan.kis...@siemens.com> > > Dispatching byte and word accesses like dwords looks strange, but let's > just convert mechanically. > > > -static CPUReadMemoryFunc * const ioapic_mem_read[3] = { > - ioapic_mem_readl, > - ioapic_mem_readl, > - ioapic_mem_readl, > -}; > - > -static CPUWriteMemoryFunc * const ioapic_mem_write[3] = { > - ioapic_mem_writel, > - ioapic_mem_writel, > - ioapic_mem_writel, > +static const MemoryRegionOps ioapic_io_ops = { > + .old_mmio = { > + .read = { ioapic_mem_readl, ioapic_mem_readl, ioapic_mem_readl, }, > + .write = { ioapic_mem_writel, ioapic_mem_writel, ioapic_mem_writel, > }, > + }, > + .endianness = DEVICE_NATIVE_ENDIAN, > };
Why use old_mmio? Use the ordinary .read and .write, and ignore the size parameter. -- error compiling committee.c: too many arguments to function