From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin O'Connor Subject: Re: [SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables Date: Wed, 21 Sep 2011 08:47:39 -0400 Message-ID: <20110921124739.GA30174@morn.localdomain> References: <20110921014832.GA4597@morn.localdomain> <327a4986-9722-472c-aa01-5e3f72b05763@zmail05.collab.prod.int.phx2.redhat.com> <20110921110908.GC16295@redhat.com> 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: "Michael S. Tsirkin" Return-path: Received: from mail-qy0-f174.google.com ([209.85.216.174]:63174 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753665Ab1IUMrv (ORCPT ); Wed, 21 Sep 2011 08:47:51 -0400 Received: by qyk30 with SMTP id 30so4986217qyk.19 for ; Wed, 21 Sep 2011 05:47:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20110921110908.GC16295@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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