Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937909AbdCJOgR (ORCPT ); Fri, 10 Mar 2017 09:36:17 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:50542 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932880AbdCJOgN (ORCPT ); Fri, 10 Mar 2017 09:36:13 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B3CC760712 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH V3] PCI/ASPM: reconfigure ASPM following hotplug for POLICY_DEFAULT To: Bjorn Helgaas References: <1489005551-23598-1-git-send-email-okaya@codeaurora.org> <20170309222751.GD19517@bhelgaas-glaptop.roam.corp.google.com> Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, Mayurkumar Patel , open list , linux-arm-kernel@lists.infradead.org From: Sinan Kaya Message-ID: Date: Fri, 10 Mar 2017 09:36:09 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170309222751.GD19517@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1093 Lines: 29 Hi Bjorn, On 3/9/2017 5:27 PM, Bjorn Helgaas wrote: > How hard do you think it would be to rework this path slightly so we: > > - call pcie_aspm_init_link_state() for every device, maybe from > pci_init_capabilities() > > - for bridges, have pcie_aspm_init_link_state() allocate a > link_state, regardless of whether it currently has any children, > and save the ASPM settings done by firmware > > - for endpoints, have pcie_aspm_init_link_state() do the actual ASPM > setup of the link as it currently does > > - for endpoints, change pcie_aspm_exit_link_state() so it cleans up > the device's own state and disables ASPM if necessary, but doesn't > remove the parent's link_state > > - for bridges, change pcie_aspm_exit_link_state() so it frees the > bridge's own link_state Thanks for the feedback, Let me take a stab at this. Sinan -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.