From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33488 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB2W2-00020Z-4q for qemu-devel@nongnu.org; Wed, 27 Oct 2010 05:41:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PB2HB-0003Za-Gj for qemu-devel@nongnu.org; Wed, 27 Oct 2010 05:26:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PB2HB-0003ZQ-3Y for qemu-devel@nongnu.org; Wed, 27 Oct 2010 05:26:33 -0400 Message-ID: <4CC7F042.3040901@redhat.com> Date: Wed, 27 Oct 2010 11:26:26 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks References: <1287934469-16624-1-git-send-email-avi@redhat.com> <1287934469-16624-2-git-send-email-avi@redhat.com> <4CC55554.4060103@redhat.com> <4CC68BE1.5010207@redhat.com> <4CC70D5D.4020109@redhat.com> <4CC70F65.7050506@codemonkey.ws> <4CC7115D.4050108@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 10/26/2010 08:33 PM, Blue Swirl wrote: > > > > Why two types? I think some devices use PIO on a PC and MMIO on other > > architectures. Sharing the type would allow sharing code. > > Then there are the functions provided by rwhandler.c. I think that > interface makes even more sense compared to 8/16/32 (and 64?) bit > handlers in many cases. On the other hand, that makes the transition harder. Perhaps we can have a type with {read,write}(addr, width), and another built on top that provides the traditional {read,write}[bwl](addr) to ease the transition. -- error compiling committee.c: too many arguments to function