Received: by 10.223.185.116 with SMTP id b49csp1913756wrg; Thu, 22 Feb 2018 05:20:11 -0800 (PST) X-Google-Smtp-Source: AH8x224ykSPSsg+/wBRw13Ot+hDJ5rxDwFRVEjp85dolGzc77xUUVT9lXHwDGkAFKBugqcGs7MFb X-Received: by 10.98.138.66 with SMTP id y63mr6926456pfd.12.1519305611055; Thu, 22 Feb 2018 05:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519305611; cv=none; d=google.com; s=arc-20160816; b=X6goum96pR7X3jmL1H5xeBoRhYpHj+jgXWYo07EeSgq343fswZnCWOiyVrfo1r9Ww+ 6cceL0vZYiLy/hnaF7/5/jdzW+aN98eV7BQuCkDDfgjV7MZmQqzY76DS32BNr74PXdMJ 3ZwZ6fofK1b6sOIFMjOGAoj1vQ/QrLs37zTT5H6D1jAMzZNmZ69psb4ahvPvsXdciJGE RHYVyNi4DAjg4u6N7vbD+9X69WAQ0XLOw52Wuec/smSbrOdYMl5Ukat1XHu7nwjOumZp kLDLqBPbwTv9ZmcP1HABtYE2VhrLpJCcb8sIMxzLVJgtQOfBLV/9dcsDwrujoTu9kfph 9EZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6Zpo2+Pc7ueVE3bedcaEh1mwl58TqHgMTXfXhPjdTn0=; b=aEwEeGbQHUD0Dhy0mB3n5xZgHJmTQ0G21rj1Tf++6cNYrgs3GhPCbxfuRQ1P+jd6vS fUZfiAziXVIbx54pa9GBsz/QVnDDsRmxWTjoVoML23kmWaVlIRZi9tBRVL2zli3xE8zD zwtPCVW/p9ADFLIO6LGgwYwTN954+1mEh7NSXIpPf0YNw8h8sr1YKXdEvWCRRnWqfbJ1 ncQeUzgOmXs/aSq2icOldNm5mKQdN6mZCSCBj3JEqv2HHhncngw88aMMvwxcXsrIYOkr g1UTJVL/NPtM3aX9AoaQvWAGg7FGcf+UF9UO+1GtQebA5gshkniwEYMT2iDwYd4riYbo gpEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si21413pgp.704.2018.02.22.05.19.55; Thu, 22 Feb 2018 05:20:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932552AbeBVNSi (ORCPT + 99 others); Thu, 22 Feb 2018 08:18:38 -0500 Received: from bmailout2.hostsharing.net ([83.223.90.240]:44023 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932494AbeBVNSg (ORCPT ); Thu, 22 Feb 2018 08:18:36 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id B0888280894FF; Thu, 22 Feb 2018 14:18:34 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 5ED993E57F; Thu, 22 Feb 2018 14:18:34 +0100 (CET) Date: Thu, 22 Feb 2018 14:18:34 +0100 From: Lukas Wunner To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Linux PCI , Valdis Kletnieks , Mathias Nyman , Linux PM , Mika Westerberg , "Rafael J. Wysocki" , Linux Kernel Mailing List , Peter Wu , Qipeng Zha , Greg Kroah-Hartman , Andreas Noever , Dave Airlie , Qi Zheng Subject: Re: [PATCH v1 2/2] PCI: Allow user to request power management of conventional and hotplug bridges Message-ID: <20180222131834.GA5527@wunner.de> References: <151908155159.37696.9710083237704994886.stgit@bhelgaas-glaptop.roam.corp.google.com> <151908204614.37696.12828004282495415825.stgit@bhelgaas-glaptop.roam.corp.google.com> <20180220181554.GA32228@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180220181554.GA32228@bhelgaas-glaptop.roam.corp.google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 12:15:54PM -0600, Bjorn Helgaas wrote: > Basically I was hoping to partially rectify what I think was a mistake > on my part when we merged this. 9d26d3a8f1b0 ("PCI: Put PCIe ports > into D3 during suspend") is somewhat misleading because it suggests > that PCI bridge power management can only be supported on non-hotplug > PCIe ports, when in fact this was mostly a question of testing and "we > know this works on the systems we care about so we're going to > minimize our risk by excluding others". These constraints seem pretty > Intel-centric and it's not clear how or whether they apply to other > architectures. > > Adding the comments will help with that some, but in general I don't > like to artificially limit feature support because it reduces testing > exposure and makes future maintenance more difficult. > > For example, we disallow D3 for hotplug bridges. I don't think the > spec requires that, so the fact that we put that limitation in > suggests that there was some issue we didn't fully understand, and now > it will be hard to go back and figure that out if and when we *do* > want to support D3 for hotplug bridges. Some x86 machines which handle hotplug in firmware, rather than natively by the OS, require that the OS doesn't transition them to D3hot behind the firmware's back. That's the reason why Mika excluded them from runtime PM: https://bugzilla.kernel.org/show_bug.cgi?id=53811 If the OS handles hotplug natively, transitioning the ports to D3hot should be fine in theory. I submitted this series last May to extend runtime PM to those: https://www.spinics.net/lists/linux-pci/msg60962.html However Ashok Raj tested them on a Xeon-SP system and got Hardware Errors: https://lkml.org/lkml/2017/5/3/480 I'm not sure if I've done anything wrong in that series or if we're dealing with an incompatibility of this particular platform with D3hot on hotplug ports. We do need runtime PM on hotplug ports to power off Thunderbolt controllers when nothing is plugged in. That saves 1.5 W, so a noticeable amount of power. I was going to respin the series one of these days, I think the best I can do is continue to forbid runtime PM on hotplug ports by default, but whitelist it for Thunderbolt and allow manually enabling it on other platforms via the command line. That way, vendors are put in a position to validate their platforms for runtime PM of hotplug ports, and perhaps someday we can enable it for all platforms by default, but with a BIOS cut-off date. As for the existing 2015 cut-off for non-hotplug ports, I remember Rafael writing that we may try to slowly push the cut-off further back into the past and stop as soon as problems are reported. That hasn't happened yet because noone had a need for it. Thanks, Lukas