qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 07/13] acpi: move aml builder code for parallel device


From: Gerd Hoffmann
Subject: Re: [PATCH v4 07/13] acpi: move aml builder code for parallel device
Date: Wed, 6 May 2020 10:46:20 +0200

> > +static void parallel_isa_build_aml(ISADevice *isadev, Aml *scope)
> > +{
> > +    ISAParallelState *isa = ISA_PARALLEL(isadev);
> > +    int i, uid = 0;
> > +    Aml *dev;
> > +    Aml *crs;
> > +
> > +    for (i = 0; i < ARRAY_SIZE(isa_parallel_io); i++) {
> > +        if (isa->iobase == isa_parallel_io[i]) {
> > +            uid = i + 1;
> 
> I'm not sure about this check, as we can create a ISA device setting
> manually index & iobase. What about using simply "uid = isa->index + 1"
> instead?

Looking at the code I see isa->index is assigned unconditionally.  I
misremembered that detail.  So, yes, simply using isa->index should work
fine even with '-device isa-serial,iobase=<something>".  I'll fix it for
both serial and parallel.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]