From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bjorn Helgaas" Subject: Re: one more ACPI Error (utglobal-0125): Unknown exception code: 0xFFFFFFEA [Re: 2.6.18-rc4-mm3] Date: Thu, 31 Aug 2006 21:15:55 -0600 (MDT) Message-ID: <49303.24.9.204.52.1157080555.squirrel@mail.cce.hp.com> References: <200608310248.29861.len.brown@intel.com> <1157042913.7859.31.camel@keithlap> <200608311707.00817.bjorn.helgaas@hp.com> <1157073592.5649.29.camel@keithlap> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from smtp.cce.hp.com ([161.114.21.23]:15786 "EHLO ccerelrim02.cce.hp.com") by vger.kernel.org with ESMTP id S1750914AbWIADU5 (ORCPT ); Thu, 31 Aug 2006 23:20:57 -0400 In-Reply-To: <1157073592.5649.29.camel@keithlap> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: kmannth@us.ibm.com Cc: Bjorn Helgaas , Len Brown , "Moore, Robert" , "Li, Shaohua" , Mattia Dongili , Andrew Morton , lkml , linux acpi , KAMEZAWA Hiroyuki > On Thu, 2006-08-31 at 17:06 -0600, Bjorn Helgaas wrote: >> Problem 1: acpi_reserve_io_ranges() needs to return an acpi_status >> like AE_OK or AE_CTRL_TERMINATE, not a -EINVAL. > > Sure great sounds. I understand AE_OK is a 0 return so I can change it > to AE_CTRL_TERMINATE. I don't want acpi_reserve_io_ranges to return a > happy state when if finds a resource type is doesn't know. Except that when the motherboard driver claims a device, it really should claim all the resources used by the device. It currently only claims I/O port resources, but I think it should also claim MMIO resources. Otherwise, the system resource accounting is screwed up, and resources consumed by the motherboard device could be mistakenly allocated to another device. > Kame (who helped me greatly in tracking down the source my troubles) > thinks that the root cause is that the device (my memory_device) has > both a _HID and _CID. The driver for _HID is different for _CID and the > driver for _CID is found before _HID and I pass the wrong device up the > chain. Ok, this is starting to make sense. It sounds like your memory device has _HID of PNP0C80 and _CID of PNP0C01 (or PNP0C02). The current ACPI driver binding algorithm in acpi_bus_find_driver() looks at each driver, checking whether it can match either the _HID or the _CID of a device. Since we try the motherboard driver first, it matches the memory device _CID. I couldn't find a specific reference in the spec, but this seems intuitively sub-optimal. It seems like it'd be better to look first for a driver that can claim the _HID (which is more specific), and only fall back to checking the _CIDs if no _HID-specific driver is found. This looks fairly easy to do in ACPI. Not so easy in PNPACPI, since I don't think PNP has the concept of _HID vs _CID. Maybe Len will chime in with an opinion. Bjorn