From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFkXU-0004qi-FJ for qemu-devel@nongnu.org; Mon, 17 Oct 2011 06:35:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFkXT-0001RC-95 for qemu-devel@nongnu.org; Mon, 17 Oct 2011 06:35:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFkXT-0001R6-0I for qemu-devel@nongnu.org; Mon, 17 Oct 2011 06:35:23 -0400 Message-ID: <4E9C04E7.9040807@redhat.com> Date: Mon, 17 Oct 2011 12:35:19 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4E9B12A4.30100@web.de> In-Reply-To: <4E9B12A4.30100@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ioapic: Convert to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel On 10/16/2011 07:21 PM, Jan Kiszka wrote: > From: Jan Kiszka > > 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