From owner-freebsd-acpi@FreeBSD.ORG Wed Jun 15 20:00:12 2011 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F032106564A for ; Wed, 15 Jun 2011 20:00:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1AAC08FC0A for ; Wed, 15 Jun 2011 20:00:11 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B06C346B0D; Wed, 15 Jun 2011 16:00:10 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4D36F8A027; Wed, 15 Jun 2011 16:00:10 -0400 (EDT) From: John Baldwin To: Nate Lawson Date: Wed, 15 Jun 2011 14:52:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201106150957.58049.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106151452.09955.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 15 Jun 2011 16:00:10 -0400 (EDT) Cc: acpi@freebsd.org Subject: Re: Only attach device_t objects to ACPI devices with a _HID X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2011 20:00:12 -0000 On Wednesday, June 15, 2011 12:48:09 pm Nate Lawson wrote: > On Jun 15, 2011, at 6:57 AM, John Baldwin wrote: > > What I am proposing to do is to change the ACPI bus driver to only add > > device_t objects for Device() nodes that have a _HID or _CID. This should not > > break any devices that have a current driver, but it will avoid having ACPI > > attach to PCI devices. This does mean that _CRS is currently ignored for PCI > > devices. My feeling on that is that if we do feel that is important to > > reserve those resources, we should handle that in the ACPI PCI bus driver > > itself instead (it can examine _CRS for those devices and allocate resources > > if we so choose). > > While this should be fine for legacy devices, I do worry about other synthetic devices, such as CPUs, NUMA zones, etc. Would it be better just not to attach acpi device_t's to any nodes under PCI busses? This is harder to arrange. Note that the proposed patch only applies to a Device(), not to Processor() or ThermalZone(), etc. objects. I believe though that all such things that you mentioned use either an object type other than ACPI_TYPE_DEVICE, an entirely different table (MADT, SRAT, etc.), or a Device() with a HID or CID. > Also, it's still possible some PCI devices would have a CID, so you'd still have to handle this case, right? Yes, and we already handle that case (there's an older tablet that hung a system resource device off its PCI-ISA bridge). In that case you still (as now) end up with two device_t's, one attached to acpi0, the other attached to the relevant PCI bus. -- John Baldwin