Received: by 10.223.185.116 with SMTP id b49csp423313wrg; Tue, 20 Feb 2018 01:33:03 -0800 (PST) X-Google-Smtp-Source: AH8x225KHgqzne+ZoSaeq67Czleo7N8ZFzSdDP5yqjGZAmFj0Y2DzTHbMlySoQnMACnOx7PeylbO X-Received: by 10.99.122.12 with SMTP id v12mr14758423pgc.128.1519119183115; Tue, 20 Feb 2018 01:33:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519119183; cv=none; d=google.com; s=arc-20160816; b=ZYjGH6YTHix4gLr3/BixwJ+lzUyHXEBicmsRNpeBQCP+BeHdiq7KhxH0NO9kgSWPhX ScCTaGVpIc2/p5J2Jxnm6jp9+JoEP1FLIeCQV7Qh4/mVxzlHM57t69W3FsAl+FvSxSSv DFPSugJnu1c2K0155UxrUY8+eGL7plhZYZid7DSbTLVUT9FXAyv6CQU61K5PCd9qoeIs 7/hUIdAc+rUe6IhANAARlVdAQOxXMrUwCN6/4TMam0Jx/gEi4Tn56alOSrM+VvBosoHi RGqp+ZhqZctYnh21gE317IObnKrIvlAznxaemFU01nCxOxR0fKHAmlRaNMq7Xfteiaeu m0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=5QOP+coSZjMlVLL4zIGIgaiXOLkXRfUQslPmQ++Roq4=; b=kTy/2UMwEcwhrnYJ/iKcnNKWGphanIHBKldBGKwTQqiQOyK4BdtXxJhoJ6joX9vRuR rEvvphqXYOJvU71ysQ0zTdiKKzUUuPOimpbLeA9EtbhcEcMuxwWlhLqUPVhHu0fA4Moh pvTipEAP9bRNUfMu6wiCM0bUMdkTS8mZj6oLgN9MHVeQ3iZWT9P0YsqcNhbb/CTQ7U+u ddsx3THRE5iZFvYwTBsH+7HZeNoIVpk/GJCnBZ5JsxoUsfmjZwxLdBWLGziPNrRiHugU TVzqfcA2A7Gy0+rdq8n+7BwkllSxpjDXFbNemMWfYHIegHz7I4IYVpeb1+S9LMq8bpbs r/Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Iii19xCA; 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 k66si1013500pfa.415.2018.02.20.01.32.48; Tue, 20 Feb 2018 01:33:03 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Iii19xCA; 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 S1751332AbeBTJcE (ORCPT + 99 others); Tue, 20 Feb 2018 04:32:04 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:35746 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946AbeBTJbw (ORCPT ); Tue, 20 Feb 2018 04:31:52 -0500 Received: by mail-ot0-f195.google.com with SMTP id p8so8014109otf.2; Tue, 20 Feb 2018 01:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5QOP+coSZjMlVLL4zIGIgaiXOLkXRfUQslPmQ++Roq4=; b=Iii19xCAJ0DaB0QZv9y5rsLzHs5/Oc0UPZomkejiF/JAmLQzCgrzl1V12WPUZmCLf7 OzvhZ/X9mIA6EdeA1hxPLXUNjeV+JeznoLTLzn6iffrrE+gmHYL50gHusg7sRTXEF6bj hufCWhB1YTcSAXCOh386wOl5NaW5vL5f9gyxPnk+iCTviHXxgMmsLilUymF7i37/fy61 H+NcBCXX/4et/aOt+9QyQB4Clkak2ul6WTo4IfDm+dgskwdLZIW2CL51yLOTTNe10SLn lAXkb+sMxlvLl6sVHPwdOSd4ZiD8WNWOM73aH/dzM2E6wHKKNKgI67XTHmCHPFWUl/Q9 2I1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5QOP+coSZjMlVLL4zIGIgaiXOLkXRfUQslPmQ++Roq4=; b=F1laGKICLp5iWMw+cTDto7EaCw6y3x2JKo3QDFqan3/iexKVreFARQXaXdNrftPm6K f3fhZYYVQsvDsqdHjv03NAPbz2aw0DT97HIp5Zypz5lAJLhKV5Tm4QLphMaImL0f5QB/ SYdlXBg7caQCt3SvPRmR37ghLfM3Wt4xdDwTqhNHF4DdVyrblQ5inZcojS5usR4Yojs0 pHO42oKL60wGT3gsdD/OF/XC+KpkoWNQeQ1fnlw3yxn+ahC0WbavcNKxf3rcuqVQaO14 ggrBcCHMJPTzo4Wo13uOxh4oM7UG+rF5BolAfyY3oIssj+ZysisteQjrk/p+Ii4Qwpaa cyUg== X-Gm-Message-State: APf1xPB/4Psq1UYm+oqtUuOCAaBRzrtcukDEKOxMA1L5KydRN5Myk3NP I26zK+DElPxrgPfJtcs2/sk1nNxTtRe7SUhCrAo= X-Received: by 10.157.4.204 with SMTP id 70mr12610243otm.291.1519119111532; Tue, 20 Feb 2018 01:31:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.44.146 with HTTP; Tue, 20 Feb 2018 01:31:51 -0800 (PST) In-Reply-To: <151908203999.37696.12678235610905422348.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <151908155159.37696.9710083237704994886.stgit@bhelgaas-glaptop.roam.corp.google.com> <151908203999.37696.12678235610905422348.stgit@bhelgaas-glaptop.roam.corp.google.com> From: "Rafael J. Wysocki" Date: Tue, 20 Feb 2018 10:31:51 +0100 X-Google-Sender-Auth: HLx8OFyPdP1OVSLOacf3l0GsdvM Message-ID: Subject: Re: [PATCH v1 1/2] PCI: Add PCIe port runtime suspend details To: Bjorn Helgaas 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 Content-Type: text/plain; charset="UTF-8" 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:14 AM, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Add details about how we decide whether we can put a PCI bridge in D3. > 9d26d3a8f1b0 ("PCI: Put PCIe ports into D3 during suspend") added this > support to reduce power consumption on Intel Sunrise Point and Broxton > platforms. > > In some cases we don't use D3 for bridges even when it should work, simply > because it's impractical to test the configuration, or we tripped over some > possible hardware issue on older platforms. Links to discussion of the > PCIe port runtime power management patches, which includes mention of these > issues, are below. > > No functional change. > > Link: v1: https://lkml.kernel.org/r/1456750566-116248-1-git-send-email-mika.westerberg@linux.intel.com > Link: v2: https://lkml.kernel.org/r/1460111790-92836-1-git-send-email-mika.westerberg@linux.intel.com > Link: v3: https://lkml.kernel.org/r/1460628268-16204-1-git-send-email-mika.westerberg@linux.intel.com > Link: v4: https://lkml.kernel.org/r/1461578004-129094-1-git-send-email-mika.westerberg@linux.intel.com > Link: v5: https://lkml.kernel.org/r/1461919919-120102-1-git-send-email-mika.westerberg@linux.intel.com > Link: v6: https://lkml.kernel.org/r/1464855435-32960-1-git-send-email-mika.westerberg@linux.intel.com > Link: https://lkml.kernel.org/r/2858019.9TUCWsDpTB@aspire.rjw.lan > Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki > --- > drivers/pci/pci.c | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index f6a4dd10d9b0..75db77cf3f8f 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -2260,6 +2260,13 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) > { > unsigned int year; > > + /* > + * In principle we should be able to put conventional PCI bridges > + * into D3. We only support it for PCIe because (a) we want to > + * save power on new (2015 and newer) SoCs that can enter deep > + * low-power states only if PCIe Root Ports are in D3 and (b) we > + * don't want to risk regressions on older hardware. > + */ > if (!pci_is_pcie(bridge)) > return false; > > @@ -2276,6 +2283,14 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) > * hotplug ports handled by firmware in System Management Mode > * may not be put into D3 by the OS (Thunderbolt on non-Macs). > * For simplicity, disallow in general for now. > + * > + * Per PCIe r4.0, sec 6.7.3.4, if the form factor requires > + * wake support, a hot-plug capable Downstream Port must > + * support generation of a wakeup event on hot-plug events > + * that occur when the system is in a sleep state or the > + * Port is in device state D1, D2, or D3hot. Therefore, it > + * might be possible to use D3 even for hot-plug Ports, but > + * for now we do not. > */ > if (bridge->is_hotplug_bridge) > return false; > @@ -2285,7 +2300,9 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) > > /* > * It should be safe to put PCIe ports from 2015 or newer > - * to D3. > + * to D3. We have vague reports of possible hardware > + * issues when putting older PCIe ports into D3. See > + * changelog. > */ > if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && > year >= 2015) { >