Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754709AbdGCQYN convert rfc822-to-8bit (ORCPT ); Mon, 3 Jul 2017 12:24:13 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:8421 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753335AbdGCQYL (ORCPT ); Mon, 3 Jul 2017 12:24:11 -0400 From: Gabriele Paoloni To: Gabriele Paoloni , Mika Westerberg CC: "Rafael J. Wysocki" , Lorenzo Pieralisi , "Rafael J. Wysocki" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "robh+dt@kernel.org" , "frowand.list@gmail.com" , "bhelgaas@google.com" , "arnd@arndb.de" , "linux-arm-kernel@lists.infradead.org" , "mark.rutland@arm.com" , "brian.starkey@arm.com" , "olof@lixom.net" , "benh@kernel.crashing.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , Linuxarm , "linux-pci@vger.kernel.org" , "minyard@acm.org" , John Garry , "xuwei (O)" , "lee.jones@linaro.org" Subject: RE: [PATCH v9 5/7] ACPI: Translate the I/O range of non-MMIO devices before scanning Thread-Topic: [PATCH v9 5/7] ACPI: Translate the I/O range of non-MMIO devices before scanning Thread-Index: AQHS1UuGzbU5u381iUa+4J2CuQvNbqIMw+oAgAFaBMCACVtbgIAJ46YAgAEanYCAAILAkP//5+WAgABQ2mCAAAEigIADHYUwgADYkoCAAC/eAIAACiIAgAAGKYCABKntQP//5cKAgAAiBaCAFmWo8IAAAp2A Date: Mon, 3 Jul 2017 16:23:40 +0000 Message-ID: References: <20170613151013.GT3187@lahna.fi.intel.com> <20170613200339.GX3187@lahna.fi.intel.com> <20170616083313.GY3187@lahna.fi.intel.com> <20170616120048.GC629@lahna.fi.intel.com> <20170619100209.GC629@lahna.fi.intel.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.162] 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.0A090201.595A6F97.00E3,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.1.122, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b757fe0bb7c462a82f1a93b39b9a3d04 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4707 Lines: 128 +CC Lee Jones > -----Original Message----- > From: Gabriele Paoloni > Sent: 03 July 2017 17:08 > To: Gabriele Paoloni; Mika Westerberg > Cc: Rafael J. Wysocki; Lorenzo Pieralisi; Rafael J. Wysocki; > catalin.marinas@arm.com; will.deacon@arm.com; robh+dt@kernel.org; > frowand.list@gmail.com; bhelgaas@google.com; arnd@arndb.de; linux-arm- > kernel@lists.infradead.org; mark.rutland@arm.com; > brian.starkey@arm.com; olof@lixom.net; benh@kernel.crashing.org; linux- > kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Linuxarm; linux- > pci@vger.kernel.org; minyard@acm.org; John Garry; xuwei (O) > Subject: RE: [PATCH v9 5/7] ACPI: Translate the I/O range of non-MMIO > devices before scanning > > Hi Mika > > > -----Original Message----- > > From: linux-pci-owner@vger.kernel.org [mailto:linux-pci- > > owner@vger.kernel.org] On Behalf Of Gabriele Paoloni > > Sent: 19 June 2017 11:05 > > To: Mika Westerberg > > Cc: Rafael J. Wysocki; Lorenzo Pieralisi; Rafael J. Wysocki; > > catalin.marinas@arm.com; will.deacon@arm.com; robh+dt@kernel.org; > > frowand.list@gmail.com; bhelgaas@google.com; arnd@arndb.de; linux- > arm- > > kernel@lists.infradead.org; mark.rutland@arm.com; > > brian.starkey@arm.com; olof@lixom.net; benh@kernel.crashing.org; > linux- > > kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Linuxarm; linux- > > pci@vger.kernel.org; minyard@acm.org; John Garry; xuwei (O) > > Subject: RE: [PATCH v9 5/7] ACPI: Translate the I/O range of non-MMIO > > devices before scanning > > > > Hi Mika > > > > > -----Original Message----- > > > From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com] > > > Sent: 19 June 2017 11:02 > > > To: Gabriele Paoloni > > > Cc: Rafael J. Wysocki; Lorenzo Pieralisi; Rafael J. Wysocki; > > > catalin.marinas@arm.com; will.deacon@arm.com; robh+dt@kernel.org; > > > frowand.list@gmail.com; bhelgaas@google.com; arnd@arndb.de; linux- > > arm- > > > kernel@lists.infradead.org; mark.rutland@arm.com; > > > brian.starkey@arm.com; olof@lixom.net; benh@kernel.crashing.org; > > linux- > > > kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Linuxarm; > linux- > > > pci@vger.kernel.org; minyard@acm.org; John Garry; xuwei (O) > > > Subject: Re: [PATCH v9 5/7] ACPI: Translate the I/O range of non- > MMIO > > > devices before scanning > > > > > > On Mon, Jun 19, 2017 at 09:50:49AM +0000, Gabriele Paoloni wrote: > > > > Many thanks for your response and your help here. > > > > > > > > I guess that as conclusion with respect to the current v9 > patchset > > we > > > can > > > > disregard the idea of MFD and modify the current v9 so that it > > > doesn't > > > > touch directly ACPI resources. > > > > Instead as I proposed before we can have the scan handler to > > > enumerate > > > > the children devices and translate its addresses filling dev- > > > >resources[] and > > > > at the same time we can modify acpi_default_enumeration to check > > > > acpi_device_enumerated() before continuing with device > > > enumeration...? > > > > > > > > Do you think it as a viable solution? > > > > > > No, I think MFD + scan handler inside the MFD driver is the way to > > go. > > > We don't want to trash ACPI core with stuff that does not belong > > there > > > IMHO. > > > > Ok Many thanks I will investigate this direction > > I had a look into the MFD framework. If my understanding is correct the > mfd > framework create a platform device for each declared mfd_cell that is > passed > to mfd_add_devices(). > However there is something that I do not quite understand: > from > http://elixir.free-electrons.com/linux/latest/source/drivers/mfd/mfd- > core.c#L207 > it seems that mfd_add_device() will create the platform device using > the > resources that are statically declared in the respective mfd_cell. > > In my case I'd like to have a platform device using the resources that > are > parsed from the ACPI table (i.e. as it is done now by > acpi_create_platform_device()). > > If my understanding is correct, if I declared an mfd_cell for my IPMI > child > the mfd subsystem would create a platform device for such child and > therefore acpi_create_platform_device() would fail to create a new > platform > device as adev->physical_node_count will be non zero. > However as things stand now mfd_cell devices can only use the resources > that are statically defined in the code (and therefore not the ones in > the > ACPI nodes)...am I right? > > Thanks > Gab > > > > > > > > > Also you don't need to modify acpi_default_enumeration() because > you > > > can > > > mark your device enumerated in the MFD driver. So all the dirty > > details > > > will be in the MFD driver and not in ACPI core. > > > > Ok got it :) > > > > Cheers > > Gab