[SeaBIOS] [SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables

Michael S. Tsirkin mst at redhat.com
Wed Sep 21 15:14:16 CEST 2011


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 at redhat.com
> > 20110919093644.GC4501 at redhat.com
> > 20110919100434.GA6764 at 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



More information about the SeaBIOS mailing list