Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751158AbdCNIP3 convert rfc822-to-8bit (ORCPT ); Tue, 14 Mar 2017 04:15:29 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:25215 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbdCNIPZ (ORCPT ); Tue, 14 Mar 2017 04:15:25 -0400 From: Gabriele Paoloni To: "Rafael J. Wysocki" , Yuanzhichang CC: "catalin.marinas@arm.com" , "will.deacon@arm.com" , "robh+dt@kernel.org" , "frowand.list@gmail.com" , "bhelgaas@google.com" , "rafael@kernel.org" , "mark.rutland@arm.com" , "arnd@arndb.de" , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "lorenzo.pieralisi@arm.com" , "benh@kernel.crashing.org" , "linux-kernel@vger.kernel.org" , Linuxarm , "devicetree@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-serial@vger.kernel.org" , "minyard@acm.org" , "liviu.dudau@arm.com" , "zourongrong@gmail.com" , 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: AQHSm58c0ZUtA+dn3EKqQ9KohvOi6KGTOGkAgAC9Q5A= Date: Tue, 14 Mar 2017 08:14:51 +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> In-Reply-To: <4600523.rWNiWKrYZC@aspire.rjw.lan> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.93.13] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.58C7A694.005F,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: a8f5490fa774aa8f61ea19521351a067 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2365 Lines: 69 Hi Rafael Many thanks for your review > -----Original Message----- > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: 13 March 2017 21:25 > To: Yuanzhichang > Cc: catalin.marinas@arm.com; will.deacon@arm.com; robh+dt@kernel.org; > frowand.list@gmail.com; bhelgaas@google.com; rafael@kernel.org; > mark.rutland@arm.com; arnd@arndb.de; linux-arm- > kernel@lists.infradead.org; linux-acpi@vger.kernel.org; > lorenzo.pieralisi@arm.com; benh@kernel.crashing.org; linux- > kernel@vger.kernel.org; Linuxarm; devicetree@vger.kernel.org; linux- > pci@vger.kernel.org; linux-serial@vger.kernel.org; minyard@acm.org; > liviu.dudau@arm.com; zourongrong@gmail.com; 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 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. Another option here would be to revert this patch and add a dependency check in the probe functions of the LPC possible children nodes (e.g. in the IPMI driver: http://elixir.free-electrons.com/source/drivers/char/ipmi/ipmi_si_intf.c?v=4.10#L2683 ) we could add if (device->dep_unmet) return -EPROBE_DEFER; as we now have in acpi/battery.c... I think this should not make any difference for current shipped FW that has got no DEP method... What do you think? Many Thanks Gab > > Thanks, > Rafael