From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables Date: Wed, 21 Sep 2011 16:14:16 +0300 Message-ID: <20110921131415.GA19414@redhat.com> References: <20110921014832.GA4597@morn.localdomain> <327a4986-9722-472c-aa01-5e3f72b05763@zmail05.collab.prod.int.phx2.redhat.com> <20110921110908.GC16295@redhat.com> <20110921124739.GA30174@morn.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Amos Kong , seabios@seabios.org, Gleb Natapov , kvm@vger.kernel.org, jasowang@redhat.com, alex williamson , Marcelo Tosatti To: "Kevin O'Connor" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4469 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753643Ab1IUNNV (ORCPT ); Wed, 21 Sep 2011 09:13:21 -0400 Content-Disposition: inline In-Reply-To: <20110921124739.GA30174@morn.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Sep 21, 2011 at 08:47:39AM -0400, Kevin O'Connor wrote: > On Wed, Sep 21, 2011 at 02:09:08PM +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 21, 2011 at 01:39:22AM -0400, Amos Kong wrote: > > > ----- Original Message ----- > > > > How about moving code into functions so that it isn't duplicated for > > > > each PCI device. See the patch below as an example (100% untested). > > > > Hmm, I sent patches that did a similar thing but > > in a slightly more compact way. > > Message ids: > > 20110919092932.GB4501@redhat.com > > 20110919093644.GC4501@redhat.com > > 20110919100434.GA6764@redhat.com > > > > Did they not reach you or something's wrong with them? > > I received them, but when I saw Amos' v2 patch I thought he included > them. > > > > > + /* Bulk generated PCI hotplug devices */ > > > > +#define hotplug_func(nr, fn) \ > > > > + Device (S##nr##fn) { \ > > > > + Name (_ADR, 0x##nr##000##fn) \ > > > > + Method (_EJ0, 1) { Return(PCEJ(0x##nr)) } \ > > > > + Name (_SUN, 0x##nr) \ > > > > + } > > > > The fundamental question is still why would > > we have _EJ0 methods in functions >0 when they are > > not individually hotpluggable. > > I think only function 0 should have _EJ0. > > I don't know the answer to this question. > > Maybe we should just collapse the current definitions and then put the > fixes and enhancements on top of the collapsed version. > > -Kevin OK, I'll refactor my patches. I just sent a patchset which in particular removes the gen_pci_device macro, probably best to work on top of that? -- MST