From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQMa5-0006p8-1u for qemu-devel@nongnu.org; Mon, 22 Oct 2012 14:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQMa3-0003SD-3F for qemu-devel@nongnu.org; Mon, 22 Oct 2012 14:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQMa2-0003Rn-Qc for qemu-devel@nongnu.org; Mon, 22 Oct 2012 14:18:27 -0400 Date: Mon, 22 Oct 2012 14:18:22 -0400 From: Jason Baron Message-ID: <20121022181822.GC23972@redhat.com> References: <707fd29bf6b842cb43ceec3fd81351a24309fb23.1350677362.git.jbaron@redhat.com> <50854980.2010908@suse.de> <20121022161730.GA23029@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20121022161730.GA23029@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 17/26] Add i21154 bridge chip. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aliguori@us.ibm.com, juzhang@redhat.com, jan.kiszka@siemens.com, agraf@suse.de, qemu-devel@nongnu.org, blauwirbel@gmail.com, yamahata@valinux.co.jp, alex.williamson@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, Andreas =?iso-8859-1?Q?F=E4rber?= , armbru@redhat.com, kraxel@redhat.com On Mon, Oct 22, 2012 at 06:17:30PM +0200, Michael S. Tsirkin wrote: > On Mon, Oct 22, 2012 at 03:26:24PM +0200, Andreas F=E4rber wrote: > > Am 19.10.2012 22:43, schrieb Jason Baron: > > > From: Jason Baron > > >=20 > > > This adds support for the DECchip 21154 PCI bridge. > > >=20 > > > Signed-off-by: Isaku Yamahata > > > Signed-off-by: Jason Baron > > > --- > > > hw/Makefile.objs | 2 +- > > > hw/i21154.c | 113 ++++++++++++++++++++++++++++++++++++++++++= ++++++++++++ > > > hw/i21154.h | 9 ++++ > > > 3 files changed, 123 insertions(+), 1 deletions(-) > > > create mode 100644 hw/i21154.c > > > create mode 100644 hw/i21154.h > >=20 > > Why is this creating a new file and not reusing dec_pci.c? We shouldn= 't > > have two parallel implementations of the same chip. > >=20 > > Andreas >=20 > Good point I missed this. There's a minor difference Yes, I missed this too. No reason to carry this patch, I will drop it. Thanks, -Jason > wrt dec-21154-p2p-bridge in a couple of fields, > these could be set by properties. > Also dec_map_irq differs from the spec compliant > map function. I am guessing this is a bug. > Would appreciate testing of the patch below. >=20 >=20 > Are you familiar with dec_pci.c? Looking at it, it seems to > implement a pci host bridge "dec-21154-sysbus" , > a pci to pci bridge "dec-21154-p2p-bridge",=20 > and something called "dec-21154" which sports a comment > "PCI2PCI bridge same values as PearPC - check this" - > and implements an empty init function; > what this last is and why it's useful I am not sure. >=20 > Anyone? Blue Swirl? Anyone can test this doesn't break > things and report? >=20 > ---> >=20 > dec_pci: irq swizzle PCI spec compliance >=20 > Make IRQ mapping for dec PCI PCI 2 PCI Bridge compliant > with the PCI spec. >=20 > Signed-off-by: Michael S. Tsirkin >=20 > --- >=20 > diff --git a/hw/dec_pci.c b/hw/dec_pci.c > index c30ade3..a49f0bd 100644 > --- a/hw/dec_pci.c > +++ b/hw/dec_pci.c > @@ -82,7 +82,7 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int de= vfn) > dev =3D pci_create_multifunction(parent_bus, devfn, false, > "dec-21154-p2p-bridge"); > br =3D DO_UPCAST(PCIBridge, dev, dev); > - pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", dec_map_irq); > + pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", pci_swizzle_map= _irq_fn); > qdev_init_nofail(&dev->qdev); > return pci_bridge_get_sec_bus(br); > }