Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 14:47:29 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   RE: cvs commit: src/sys/dev/acpica acpi_ec.c
Message-ID:  <20030721144250.B34834@root.org>
In-Reply-To: <XFMail.20030721172908.jhb@FreeBSD.org>
References:  <XFMail.20030721172908.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030721144250.B34834>