From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 2/7] qemu: Introduce pci_map_irq to get irq nr from pin number for a PCI device Date: Tue, 23 Sep 2008 11:12:11 -0500 Message-ID: <48D9155B.3090908@codemonkey.ws> References: <1222181695-23418-1-git-send-email-amit.shah@redhat.com> <1222181695-23418-2-git-send-email-amit.shah@redhat.com> <1222181695-23418-3-git-send-email-amit.shah@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, kvm@vger.kernel.org, muli@il.ibm.com, benami@il.ibm.com, weidong.han@intel.com, allen.m.kay@intel.com To: Amit Shah Return-path: Received: from mail-gx0-f16.google.com ([209.85.217.16]:52638 "EHLO mail-gx0-f16.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751753AbYIWQNM (ORCPT ); Tue, 23 Sep 2008 12:13:12 -0400 Received: by gxk9 with SMTP id 9so4514308gxk.13 for ; Tue, 23 Sep 2008 09:13:11 -0700 (PDT) In-Reply-To: <1222181695-23418-3-git-send-email-amit.shah@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Amit Shah wrote: > Signed-off-by: Amit Shah > --- > qemu/hw/pci.c | 5 +++++ > qemu/hw/pci.h | 1 + > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c > index 07d37a8..61ff0f6 100644 > --- a/qemu/hw/pci.c > +++ b/qemu/hw/pci.c > @@ -560,6 +560,11 @@ static void pci_set_irq(void *opaque, int irq_num, int level) > bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != 0); > } > > +int pci_map_irq(PCIDevice *pci_dev, int pin) > +{ > + return pci_dev->bus->map_irq(pci_dev, pin); > Formatting is wrong. Regards, Anthony Liguori > +} > + > /***********************************************************/ > /* monitor info on PCI */ > > diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h > index 60e4094..e11fbbf 100644 > --- a/qemu/hw/pci.h > +++ b/qemu/hw/pci.h > @@ -81,6 +81,7 @@ void pci_register_io_region(PCIDevice *pci_dev, int region_num, > uint32_t size, int type, > PCIMapIORegionFunc *map_func); > > +int pci_map_irq(PCIDevice *pci_dev, int pin); > uint32_t pci_default_read_config(PCIDevice *d, > uint32_t address, int len); > void pci_default_write_config(PCIDevice *d, >