cvs commit: src/sys/dev/acpica acpi_ec.c

Nate Lawson nate at root.org
Mon Jul 21 14:47:30 PDT 2003


On Mon, 21 Jul 2003, John Baldwin wrote:
> On 21-Jul-2003 Nate Lawson wrote:
> > The sequence with ECDT is:
> > acpi_attach()
> > acpi_ec_ecdt_probe()
> >     if ECDT present
> >        device_add_child("acpi_ec")
> >        device_probe_and_attach()
> >            acpi_ec_probe()
> >                if ECDT magic set in ivars
> >                   done
>
> The magic part seems evil.  I'm not sure yet of a better way to handle
> that though.

The reason this was done is that there are two paths for getting resources
about the EC:  ECDT and namespace.  They can share a common probe/attach
function if we take the same route (ivars) for passing the data to
probe/attach.  Since the ivars are zeroed before device_probe() is called
and an already probed ACPI_DEVICE object is extremely unlikely to use the
same magic since it's a pointer to the acpi_ec_devclass, this is a low
risk approach.

-Nate


More information about the cvs-src mailing list