From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MH00q-0003lM-NB for qemu-devel@nongnu.org; Wed, 17 Jun 2009 14:37:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MH00m-0003eX-1r for qemu-devel@nongnu.org; Wed, 17 Jun 2009 14:37:32 -0400 Received: from [199.232.76.173] (port=33309 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MH00l-0003e5-QG for qemu-devel@nongnu.org; Wed, 17 Jun 2009 14:37:27 -0400 Received: from mail-bw0-f223.google.com ([209.85.218.223]:51994) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MH00l-00038S-50 for qemu-devel@nongnu.org; Wed, 17 Jun 2009 14:37:27 -0400 Received: by bwz23 with SMTP id 23so499588bwz.34 for ; Wed, 17 Jun 2009 11:37:24 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 17 Jun 2009 21:37:23 +0300 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] pci_set_irq_fn: problematic interface List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook , qemu-devel Hi, I'm trying to clean up piix_pci.c by putting the static state variables in into a device state structure. But I hit a problem with piix4_dev and pci_gt64120_set_irq(). The latter wants to access piix4_dev outside of piix_pci.c. Because the PCI IRQ function does not take any device handle as a parameter, this is a bit difficult to fix. So, perhaps pci_set_irq_fn should be changed to typedef void (*pci_set_irq_fn)(void *opaque, qemu_irq *pic, int irq_num, int level), where opaque supplies device state for the piix3/piix4?