From owner-cvs-src@FreeBSD.ORG Mon Jul 21 14:47:30 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 084E437B407 for ; Mon, 21 Jul 2003 14:47:30 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id B2AF443FEA for ; Mon, 21 Jul 2003 14:47:27 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 34877 invoked by uid 1000); 21 Jul 2003 21:47:29 -0000 Date: Mon, 21 Jul 2003 14:47:29 -0700 (PDT) From: Nate Lawson To: John Baldwin In-Reply-To: Message-ID: <20030721144250.B34834@root.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/dev/acpica acpi_ec.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 21:47:30 -0000 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