Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5705253rwb; Mon, 14 Nov 2022 08:22:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6r3Csgg36nFqm8dgu0RPuvW8rhclyGXJXTyijox1rVAk0AZOkYzeiFkEs+Qa8SCD2OXE0S X-Received: by 2002:a05:6402:378:b0:461:c3d9:c6a3 with SMTP id s24-20020a056402037800b00461c3d9c6a3mr11687469edw.154.1668442921963; Mon, 14 Nov 2022 08:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668442921; cv=none; d=google.com; s=arc-20160816; b=c99F0Fnu6hg7+LH085Z19qUGnXGtUhCcwMqi7jBY0MQBU8FZPrMQzKY2RW7Vqrp1jL bq1D60QtCUneyb1SOLCH1ryQITyeTQeWC26J/Qrlz6DpWH/MMk4JEVKt+vx1EpC/i42c hqdhg0bOjsfFd3EFBfqFPt/UKvC8haBlmIIn0f9hHnOZPydIwb+n9+BmKJiRcr8ffxsQ VfXojWb+mK/EpRmrzm0K27zqxMLGz6Z3Kbtk4GXBLiKSahminzOvJnn9Fhnqw6gnl3oR /Yea/wXlWl/eaH5oU6RWLWt820JZFoR/wEOMv80U7VWJoYHrnY0Lm9YrdelTv6sKMNzk 0sWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=KOfoaOPTc0krweU3P8wUkVTnZoULqG3PmNlXhu4M7TI=; b=rnoJIg2Gr+nw8IlzL/MB1LLp8iCljkU4nOOmcisQ+yN6IC13d53j4G6o+TRbwvPJxn nfMeQQbWZkzOmUaZwR4MS16Wp+DhpYSneeDGCchDDp3mvA8kxXBhNn9rZOIbzdqTW9Y8 GY2zOZfxHAtv5xjkdkzVwgq1hkrplb6cvm6nqmrVhh5XSPk8doktXIK0x7Mu3lhkFMo0 2OiSQ2NYVlRx8L6CJ9YS9c5j1lcuBCzyvc8XmMuoWX+30HjvFCCkz9Mws4lp3nxObYZD JYOT48xoZ676PICfqrwRZubUu+L90r0Lc9ANic9c8CMMGoNB5IYGS3Sq++BXEVIrwNxl T3GQ== ARC-Authentication-Results: i=1; mx.google.com; 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 q17-20020a056402519100b004674aa77346si9765718edd.72.2022.11.14.08.21.40; Mon, 14 Nov 2022 08:22:01 -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; 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 S236869AbiKNPeR (ORCPT + 87 others); Mon, 14 Nov 2022 10:34:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236007AbiKNPeL (ORCPT ); Mon, 14 Nov 2022 10:34:11 -0500 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D3151170; Mon, 14 Nov 2022 07:34:10 -0800 (PST) Received: by mail-qv1-f50.google.com with SMTP id o8so7964228qvw.5; Mon, 14 Nov 2022 07:34:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KOfoaOPTc0krweU3P8wUkVTnZoULqG3PmNlXhu4M7TI=; b=KY05PUqOp7FWcbU7eUfMaqVEef9rV8wBfLzgKHHluppi7/vDpdWTOIGrvfkqnqDDU2 8n7f2mT4Zt4XV1XN9KPNNCcewmrgz1Sv4HBaQIi4vUkAM3lYehWLuMoA0WIRc8rlpEdq u6nkKIB9ijGdD7hx+wd0uukJ6zK0a16wXKRKP55+/9jE4xd2hJ5F7Fe5yrDW0QpC8WBl qMiXAhpdO4YllgFW4NhLrZFqx19l0DcvnqxMLEXwmOnu50wvOyo6mJCgSfK67I0VQEgJ +Mrm+ZxHTpsgHT55GjvVSQAehoHuSp0KeJYoo8Qi5Xe8uxJb4U+Cj5hmLHXnsqFqC3ew z/bA== X-Gm-Message-State: ANoB5plRbehmcoiHx8zHLCm8enOR/KMg81r8oSnC4q7eOD7wpqxCjIOK FUC2SrZntK8ZkkLlTgarMcs33eEfWJzQnCtvAVA= X-Received: by 2002:a0c:e606:0:b0:4b1:a9ac:21de with SMTP id z6-20020a0ce606000000b004b1a9ac21demr12899948qvm.119.1668440049335; Mon, 14 Nov 2022 07:34:09 -0800 (PST) MIME-Version: 1.0 References: <5754039e-e3c6-cdb8-8d64-6332b0093940@amd.com> <20221111214209.GA748269@bhelgaas> In-Reply-To: <20221111214209.GA748269@bhelgaas> From: "Rafael J. Wysocki" Date: Mon, 14 Nov 2022 16:33:52 +0100 Message-ID: Subject: Re: [PATCH v5] PCI/ACPI: PCI/ACPI: Validate devices with power resources support D3 To: Bjorn Helgaas Cc: "Limonciello, Mario" , "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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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.