From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Hh6-00017x-NV for qemu-devel@nongnu.org; Sun, 18 Sep 2011 09:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5Hh5-0001Pu-DZ for qemu-devel@nongnu.org; Sun, 18 Sep 2011 09:46:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Hh4-0001Pc-UE for qemu-devel@nongnu.org; Sun, 18 Sep 2011 09:46:03 -0400 Message-ID: <4E75F611.5070806@redhat.com> Date: Sun, 18 Sep 2011 16:45:53 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1314144835-29098-1-git-send-email-rth@twiddle.net> <1314144835-29098-13-git-send-email-rth@twiddle.net> In-Reply-To: <1314144835-29098-13-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/16] vga: Convert to isa_register_portio_list. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On 08/24/2011 03:13 AM, Richard Henderson wrote: > Signed-off-by: Richard Henderson Breaks qemu-system-ppc -M mac99 > +/* Used by both ISA and PCI */ > MemoryRegion *vga_init_io(VGACommonState *s) > { > MemoryRegion *vga_mem; > > - register_ioport_write(0x3c0, 16, 1, vga_ioport_write, s); > - > - register_ioport_write(0x3b4, 2, 1, vga_ioport_write, s); > - register_ioport_write(0x3d4, 2, 1, vga_ioport_write, s); > - register_ioport_write(0x3ba, 1, 1, vga_ioport_write, s); > - register_ioport_write(0x3da, 1, 1, vga_ioport_write, s); > - > - register_ioport_read(0x3c0, 16, 1, vga_ioport_read, s); > - > - register_ioport_read(0x3b4, 2, 1, vga_ioport_read, s); > - register_ioport_read(0x3d4, 2, 1, vga_ioport_read, s); > - register_ioport_read(0x3ba, 1, 1, vga_ioport_read, s); > - register_ioport_read(0x3da, 1, 1, vga_ioport_read, s); > + /* The PCI-ISA bridge should have been configured properly such that > + this works for PCI devices as well. This only supports one bridge, > + but "secondary" VGA cards are generally accessed by MMIO only anyway. */ > + isa_register_portio_list(NULL, 0x3b0, vga_portio_list, s, "vga"); > > memory_region_init_io(vga_mem,&vga_mem_ops, s, This is called even for pci machines which have no ISA bus (and even if they did, the code should work wit the pci bus, not ISA). The code should return the portio list of the caller to register, or perhaps accept a callback to do the registration. -- error compiling committee.c: too many arguments to function