Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754992AbdCPQOW (ORCPT ); Thu, 16 Mar 2017 12:14:22 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:15486 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbdCPQOR (ORCPT ); Thu, 16 Mar 2017 12:14:17 -0400 From: Gabriele Paoloni To: Arnd Bergmann , Yuanzhichang CC: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Bjorn Helgaas , Rafael Wysocki , Mark Rutland , Linux ARM , ACPI Devel Maling List , Lorenzo Pieralisi , Benjamin Herrenschmidt , Linux Kernel Mailing List , Linuxarm , "devicetree@vger.kernel.org" , linux-pci , "linux-serial@vger.kernel.org" , Corey Minyard , "liviu.dudau@arm.com" , Zou Rongrong , John Garry , "zhichang.yuan02@gmail.com" , "kantyzc@163.com" , "xuwei (O)" Subject: RE: [PATCH V7 5/7] ACPI: Delay the enumeration on the devices whose dependency has not met Thread-Topic: [PATCH V7 5/7] ACPI: Delay the enumeration on the devices whose dependency has not met Thread-Index: AQHSnfweiy61cDwNaUWgk+Wj2Uc3bKGXLw2AgAByPfA= Date: Thu, 16 Mar 2017 16:13:41 +0000 Message-ID: References: <1489372963-9000-1-git-send-email-yuanzhichang@hisilicon.com> <1489372963-9000-6-git-send-email-yuanzhichang@hisilicon.com> <4600523.rWNiWKrYZC@aspire.rjw.lan> <58C9F6C6.4090700@hisilicon.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.203.181.161] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.58CAB9CD.0135,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.1.242, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d48d2ca2394aae5f395859f89bf09d60 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2GGEcit011055 Content-Length: 2989 Lines: 80 Hi Arnd > -----Original Message----- > From: arndbergmann@gmail.com [mailto:arndbergmann@gmail.com] On Behalf > Of Arnd Bergmann > Sent: 16 March 2017 10:13 > To: Yuanzhichang > Cc: Rafael J. Wysocki; Catalin Marinas; Will Deacon; Rob Herring; Frank > Rowand; Bjorn Helgaas; Rafael Wysocki; Mark Rutland; Linux ARM; ACPI > Devel Maling List; Lorenzo Pieralisi; Benjamin Herrenschmidt; Linux > Kernel Mailing List; Linuxarm; devicetree@vger.kernel.org; linux-pci; > linux-serial@vger.kernel.org; Corey Minyard; liviu.dudau@arm.com; Zou > Rongrong; John Garry; Gabriele Paoloni; zhichang.yuan02@gmail.com; > kantyzc@163.com; xuwei (O) > Subject: Re: [PATCH V7 5/7] ACPI: Delay the enumeration on the devices > whose dependency has not met > > On Thu, Mar 16, 2017 at 3:21 AM, zhichang.yuan > wrote: > > Hi, Rafael, > > > > Thanks for your review! > > > > On 2017/3/14 5:24, Rafael J. Wysocki wrote: > >> On Monday, March 13, 2017 10:42:41 AM zhichang.yuan wrote: > >>> In commit 40e7fcb1929(ACPI: Add _DEP support to fix battery issue > on Asus > >>> T100TA), the '_DEP' was supported to solve the dependency of Asus > battery. But > >>> this patch is specific to Asus battery device. > >>> In the real world, there are other devices which need the > dependency to play the > >>> role on the enumeration order. For example, all the Hip06 LPC > >>> periperals(IPMI-BT, uart, etc) must be scanned after the LPC host > driver > >>> finished the probing. So, it makes sense to add a checking whether > the ACPI > >>> device meet all the dependencies during its enumeration slot, if > not, the > >>> enumeration will be delayed till all dependency master finish their > work. > >>> > >>> This patch adds the dependency checking in ACPI enumeration, also > the > >>> corresponding handling to retrigger the Hip06 LPC peripherals' > scanning. > >> > >> AFAICS, _DEP is generally abused in the wild and cannot be made > generic. Sorry. > >> > > > > From the ACPI specification, _DEP is for operation region accesses. > > You are right... > > > > How about we add a ACPI handler for our LPC bus?? Just like amba. > > In this way, we also can solve the issue about LPC enumeration order. > > As far as I can tell, PCI and LPC have exactly the same requirement > here, > so whatever you end up doing for one should be used for the other as > well. Well as you know PCI has got his own handler, identified by his own namespace id "PNP0A03". Now when you say "you end up doing for one should be used for the other" are you saying that we should introduce a new class of devices? i.e. should we have an ACPI namespace identifier for non-PCI IO Host Controllers? Otherwise, if my understanding is correct, having a specific new ACPI handler for HiSilicon LPC would mean to adding another function_init() in the list of acpi handlers inits in acpi_scan_init(). But then every vendor would declare his own one...is this really correct? Many Thanks Gab > > Arnd