From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtdsL-0003j8-9k for qemu-devel@nongnu.org; Tue, 14 Apr 2009 04:20:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtdsG-0003h7-QI for qemu-devel@nongnu.org; Tue, 14 Apr 2009 04:20:13 -0400 Received: from [199.232.76.173] (port=44847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtdsG-0003h2-MN for qemu-devel@nongnu.org; Tue, 14 Apr 2009 04:20:08 -0400 Received: from mx2.redhat.com ([66.187.237.31]:32825) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LtdsE-00036v-5K for qemu-devel@nongnu.org; Tue, 14 Apr 2009 04:20:08 -0400 Date: Tue, 14 Apr 2009 05:17:40 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [patch 2/2] qemu: switch pci device init functions to accept devfn Message-ID: <20090414081740.GA6955@amt.cnet> References: <20090413035311.009617911@amt.cnet> <20090413035340.296329700@amt.cnet> <200904131327.35201.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200904131327.35201.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Markus Armbruster On Mon, Apr 13, 2009 at 01:27:34PM +0100, Paul Brook wrote: > On Monday 13 April 2009, Marcelo Tosatti wrote: > > Some pci device initialization functions do not accept a devfn parameter, > > but instead use "-1", which caused pci_register_device to find the first > > free slot on the given bus. > > > > Have them accept a "devfn" parameter, and use the newly introduced > > pci_bus_assign_dev_addr function on platform init code to perform > > the "first free" enumeration. > > I don't see how this is better. If anything we want the platform code to get > smaller, not larger. OK, so, what would you like to see? The proposal where pci dev address goes directly from devtree to pci_register_device, behind an opaque type in the way? Or goes through QEMUDevice? Please be more specific, so we can get somewhere.