Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5750537rwb; Mon, 14 Nov 2022 08:59:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rgLE5/UpGSWrBvDlX+ejCNAL2ZrdUsKuTPBeQgg5yL5e6i5FhNIIXD9/RZ82siEDWa6Lo X-Received: by 2002:a62:1851:0:b0:563:54fd:3638 with SMTP id 78-20020a621851000000b0056354fd3638mr14435866pfy.44.1668445157369; Mon, 14 Nov 2022 08:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668445157; cv=none; d=google.com; s=arc-20160816; b=uVE0W5d+rmTFh+QPH0ZiOBIm59CqpmKhNqDqnasmC0CJ/rYlidJUZ5FaIfVZbBOSU3 YIyfUpEfhZ02QUoGP977mYQA9V31+pEC4aLL8ze/Hmbh6JwntkBe0UMQxz7VF25IWswE y3nkg9wWRfyqvTQoI0fKrTVZhmjT+s0quMq+FRA193wNQn4q9j56KZSX43C+K0DojSc5 di0YzZ6p+O0Sw3qMqZYwoTzjLwC8OZzh/teEqUBJvVSqgF6AGb+7SPzyS+W8/YIx+KK9 jeNPUJyeCnfmRj9hwtPxp6L51eeXTlUvyzk+j3xyMBp/TpQeMAg3TzxW5qistOzBMKG9 zoMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=adrs720EURYSZXa3sqYnOxJGRA28Na1gbbnTGW616CM=; b=0v0ktnyR8TjCHFdEgUwgCLuYGhf7AldwHSOZMaAbjqoEz+AsuItvMx6XKwZAroEy2a JnP7Up10Bj4+QFH9+a8imf7OtMdhp3YuaAR60+KptULrpEdpOTVnoA/Jw4TX4z+W1r6Z frvK3uBwrjbZW9l6zgDVgXRC+k3ZBf99bFG2uiRnLKH8nnKVKMgu9QM8u6ujidpcwNR5 9+HzLjUk4dsybWURoD7f2/6MFaYnsI8iPU3FEIy3TCoE9wC+I6gZNCa7StGyZg8XsIAe 0wdw1HDosbC8JXbsI972ilFAfIe/azEbLN/GlbYL3/AfQQ23CiqrW5ncv30NSkmmbWDU 52uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nseCzYfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a622702000000b0056c8da80411si8638035pfn.43.2022.11.14.08.59.05; Mon, 14 Nov 2022 08:59:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nseCzYfB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237213AbiKNQyn (ORCPT + 87 others); Mon, 14 Nov 2022 11:54:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236117AbiKNQyl (ORCPT ); Mon, 14 Nov 2022 11:54:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B619F63; Mon, 14 Nov 2022 08:54:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 072DA612FA; Mon, 14 Nov 2022 16:54:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CF11C433C1; Mon, 14 Nov 2022 16:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668444879; bh=MUy8O5WFGyXPVwY1Gpp83dzNZ67hEk35Q6+dyzfGqQQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=nseCzYfBwjX++T+61HAXaIWWQwdFnHY1w2zmhmK4nuSDU1npeMBrbRW9jOr7P+Bsc b2y6GMp9oqCNP/RoJkdFq3Q/0MxotWPQ/b+d9zIVaXBi3Ts6XxmF5pNFZUFblna+PD P2zn/EBIcsTmyeOTFLH+1q14KCwFkfCWQOKMvJPOlhNWwFGobLrHInqN7HOio9UoSr gOWJchUyyWtj3lVKlAYo5gVvc2w3HBO2tQMjf2jqEDwT2IBTzKp05LsEjamZfo9m2h QskYroBVriNQFfguj35pWXQZpg1od2mb0wD6lrCU7R553f1gTObL1zusdquVUszDev R1Nl7OUTNX2JA== Date: Mon, 14 Nov 2022 10:54:37 -0600 From: Bjorn Helgaas To: "Limonciello, Mario" Cc: "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , Mika Westerberg , Mehta Sanju , Lukas Wunner , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] PCI/ACPI: PCI/ACPI: Validate devices with power resources support D3 Message-ID: <20221114165437.GA917550@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53e6278b-9261-952e-56bb-4bd288cd2e9e@amd.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 09:37:58AM -0600, Limonciello, Mario wrote: > On 11/14/2022 09:33, Rafael J. Wysocki wrote: > > On Fri, Nov 11, 2022 at 10:42 PM Bjorn Helgaas wrote: > > > On Fri, Nov 11, 2022 at 12:58:28PM -0600, Limonciello, Mario wrote: > > > > On 11/11/2022 11:41, Bjorn Helgaas wrote: > > > > > On Mon, Oct 31, 2022 at 05:33:55PM -0500, Mario Limonciello wrote: > > > > > > Firmware typically advertises that ACPI devices that represent PCIe > > > > > > devices can support D3 by a combination of the value returned by > > > > > > _S0W as well as the HotPlugSupportInD3 _DSD [1]. > > > > > > > > > > > > `acpi_pci_bridge_d3` looks for this combination but also contains > > > > > > an assumption that if an ACPI device contains power resources the PCIe > > > > > > device it's associated with can support D3. This was introduced > > > > > > from commit c6e331312ebf ("PCI/ACPI: Whitelist hotplug ports for > > > > > > D3 if power managed by ACPI"). > > > > > > > > > > > > Some firmware configurations for "AMD Pink Sardine" do not support > > > > > > wake from D3 in _S0W for the ACPI device representing the PCIe root > > > > > > port used for tunneling. The PCIe device will still be opted into > > > > > > runtime PM in the kernel [2] because of the logic within > > > > > > `acpi_pci_bridge_d3`. This currently happens because the ACPI > > > > > > device contains power resources. > > > > > > Wait. Is this as simple as just recognizing that: > > > > > > _PS0 means the OS has a knob to put the device in D0, but it doesn't > > > mean the device can wake itself from a low-power state. The OS has > > > to use _S0W to learn the device's ability to wake itself. > > > > It is. > > > > > If that's enough, maybe we don't need to complicate this with all the > > > Thunderbolt and device link stuff. Which would be great, because the > > > code change itself has nothing to do with those things. > > > > Indeed. > > I'd think it's still useful to leave "something" in the commit message about > how we got to that conclusion though. > > Bjorn, do you want me to to attempt to rewrite the commit message and send a > v6, or would you like to? Let me give it a try and post it for your reaction. Bjorn