From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: ACPI device using sub-resource of PCI device Date: Mon, 12 Sep 2016 11:10:50 +0300 Message-ID: <20160912081050.GV15313@lahna.fi.intel.com> References: <3103060.86QBTjSLk3@vostro.rjw.lan> <3861743.KWBechkp08@vostro.rjw.lan> <20160816091502.GB1751@lahna.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org To: Aaron Durbin Cc: "Rafael J. Wysocki" , Bjorn Helgaas , "Rafael J. Wysocki" , ACPI Devel Maling List , Linux PCI , Andy Shevchenko List-Id: linux-acpi@vger.kernel.org On Fri, Sep 09, 2016 at 09:12:49AM -0500, Aaron Durbin wrote: > On Wed, Aug 17, 2016 at 6:02 PM, Aaron Durbin wrote: > > On Tue, Aug 16, 2016 at 2:15 AM, Mika Westerberg > > wrote: > >> On Fri, Aug 12, 2016 at 11:45:30AM -0500, Aaron Durbin wrote: > >>> Was anyone able to take a look into a solution for the current > >>> problem? Again, please feel free to ask if anyone would like help > >>> testing potential solutions. > >> > >> Below is one proposal for fixing the issue. It is just a prototype and > >> I'm not sure if it takes everything needed into account. Would you be > >> able to try it out and let us know if it works for you? > > > > Yes. I'll give it a go. I'm traveling this week so it won't likely be > > til early next week. Thanks for the proposed fix. I'll report back on > > my findings. > > > > Sorry for the late response. I tried the patch and it works with ACPI > devices in a hierarchy below PCI devices. I didn't have any ACPI > drivers probed but I was able to hang 2 ACPI devices off of a BAR that > had a driver for the PCI device without any resource conflicts > (snippet from /proc/iomem): > > c2a43000-c2a43fff : 0000:00:1b.0 > c2a43000-c2a437ff : GOOG1234:00 > c2a43800-c2a43fff : GOOG1235:00 Thanks for testing. > One observation that I don't think matters much, but I wanted to write > it down in case anyone pulls this thread up again. In the case of > finding the parent resource, the ACPI devcie's resources won't show up > in the resource tree until the pci parent devices' resources are > inserted. Right, that's expected as the parent PCI device resources will be allocated a bit later when pcibios_resource_survey_bus() is called. Rafael, Bjorn, What do you think? Should I clean up the code and send it out as a formal patch?