Received: by 10.223.185.116 with SMTP id b49csp941125wrg; Tue, 20 Feb 2018 10:17:28 -0800 (PST) X-Google-Smtp-Source: AH8x227Rms9Rho8VoZA76sAr6b5HLrY16/hZ5SNggszB6WsCMXo30H4nHBqGnLzYYDswmPbAkakm X-Received: by 2002:a17:902:4201:: with SMTP id g1-v6mr479351pld.62.1519150648502; Tue, 20 Feb 2018 10:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519150648; cv=none; d=google.com; s=arc-20160816; b=TjI8oKKC8r3ULRCJ33zkM8gEgdkMaMh66ZomjWn+FO3199smUFesQeHnmseiXSPtUV JYqiqAJjd17yr+9gfBGeHOSfAhkWfDlMIBJ91FPIH71tN0HnY3KCkGhMXaP98d2RUFRw Q+D47edyErdAQzoubinOlT5tFudmUe3WzUCiPWdvCzfqTqIpTT41+nL5y/B7y3lIGMzr qhpOLasefHZly3HAHM50qGis78AEPExZMwApBr3DluBa/pFmJL4Cq+FzmlLvEyfwTSAP UvXHxeQqw1ese1+NpInQ/LwBPuU4wqu5VQUFF5NfSAdV/LcanCi4C9Me0u4lb939EaXZ dckw== 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:dmarc-filter:arc-authentication-results; bh=PLHKU52ef00SVOG/JACoHe/huX9aP+VZq6YVmXn5Zvw=; b=Lo6qcljXK3A8Coi2mMiJKiU1Xrh71/2kdnxPLxSn7Z4v4hO6CeYWn3Oe2xbYp9c/WB iMgMsC/gmeUcna7r3y1DTalwT8t0+9rAjblzRKuxgQLyWSyC9skW1dh3Vt5dJCHhFSgG Wo0W+Wkjlb6Z6yxtd/119aT47pd7tBvCQ2P2mOvT1z+BCC8HpWXsc/txZAzsB9y4qYjy pPibe7BAhV1W/2gYH3T+ev6RU+gOFARmgZwK1kmhPvCX9I2N0YCDg+ERVMS8Ou3dbPP1 +ixd+/wB0NRj7KA9bkUrk/xdj2XmuKJjQBRB7WT6rQ7eO/TfUbXUb+qtVMOOXE/CsRZw E/XA== 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 v18si1382071pge.237.2018.02.20.10.17.14; Tue, 20 Feb 2018 10:17:28 -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 S1752999AbeBTSP7 (ORCPT + 99 others); Tue, 20 Feb 2018 13:15:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:47998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752343AbeBTSP5 (ORCPT ); Tue, 20 Feb 2018 13:15:57 -0500 Received: from localhost (unknown [69.71.4.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7CCC20837; Tue, 20 Feb 2018 18:15:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7CCC20837 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Tue, 20 Feb 2018 12:15:54 -0600 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: Linux PCI , Valdis Kletnieks , Mathias Nyman , Linux PM , Mika Westerberg , "Rafael J. Wysocki" , Linux Kernel Mailing List , Lukas Wunner , 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: <20180220181554.GA32228@bhelgaas-glaptop.roam.corp.google.com> References: <151908155159.37696.9710083237704994886.stgit@bhelgaas-glaptop.roam.corp.google.com> <151908204614.37696.12828004282495415825.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) 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 10:41:33AM +0100, Rafael J. Wysocki wrote: > On Tue, Feb 20, 2018 at 12:14 AM, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > Previously "pcie_port_pm=force" enabled power management of PCI bridges, > > but only for PCIe ports (not conventional PCI bridges) and only for ports > > that do not support hotplug. Those limitations are there because we're not > > confident that all those configurations work, not because the spec requires > > them. > > > > Change "pcie_port_pm=force" to enable power management of conventional PCI > > bridges and hotplug bridges as well as PCIe ports. As with the previous > > PCIe port-only behavior, this is not expected to work in all systems. > > > > Add a "pci=bridge_pm" parameter to reflect the increased scope. For > > backward compatibility, retain "pcie_port_pm=force" as an undocumented > > equivalent. > > > > Add "pci=no_bridge_pm" as an equivalent to "pcie_port_pm=off". This > > disables power management for all PCI bridges, which is results in the same > > behavior as before, since we always disabled power management of > > conventional PCI bridges, and "pcie_port_pm=off" disabled it for PCIe > > ports. > > > > Signed-off-by: Bjorn Helgaas > > Honestly, I wouldn't do that, at least not this way. > > Somebody might be using pcie_port_pm=force already, for example, and > it works for them for PCIe, but the PCI-to-PCI part of the same system > may not. Yes, you and Valdis are right, this is over-aggressive and I'll drop it. > IMO the behavior of pcie_port_pm= should be as is and I don't see > what's wrong with it being documented. > > Of course, you can add pci=bridge_pm/no_bridge_pm to extend the scope, > but for what reason really? Just to follow the letter of the spec? 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. Anyway, I'll drop this one and just go with adding the comments. Bjorn