Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5669172rwb; Mon, 14 Nov 2022 07:56:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf6hVGtrYXtKFlSePiKSRZDS0ikuLybvxE+yVrymja+aCnlUr1dcdxXGduc9lntCrB6SE8Qn X-Received: by 2002:a17:907:8c81:b0:7ad:902c:d158 with SMTP id td1-20020a1709078c8100b007ad902cd158mr11226016ejc.121.1668441376974; Mon, 14 Nov 2022 07:56:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668441376; cv=pass; d=google.com; s=arc-20160816; b=ir1Qn4Z4l9HnEu/2JMdDGnUD2nFOmWfIscvv54IJpcJE4CD3kemfKtNITMpMZgWY1Z la1ZmsdbS0982jncd7N8x164h9a0xA0t+3Xx//4fw+BguYIZTmlYNZhTMCQqbFIidlvK rw7cJtc/jWcxWriLzqISLKycHnpdN3MHvlf8uu91CxgVPW10aBo0G+Mrb0CLpUHw895T fs2uDWI2soPL4UgN9Qbr0hSIcUH7smzkNnk1rLYWkHBb9J+EQUxORL/tSRy6bWX+J2Gg WzPJqqjYudZmgQ6zXNrfuEsR+/fWmt3vUmAIwi4z7fOfS4S4qEYhs0QcU3QBDYd7DO2b maJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=MwLCzAslaPP7qJptUm+JvjOntC6dnO2i1C73ncOLSs4=; b=oEIRFgOhtFg3ksEiihr9wpE7y41SbJmovjwh9f6sttCSnjH8uq62r7t8oii+dKqJct uPp0uHFqSBr0gRdb5Ms+50eiCugMb0JIn0y+GZMW/v/I9wMt3c36rYwLD01Gy9z/d2aT Fw4SBuF1kBWgmmEpVvwl3bPJ1mJV+5MrIx//JW26HMtB5QD0JqYDiJBQdv1VtDe4db7N qziEUBfru5NAIOJGbRPj3Q7gwPW2FqIjrAxPJ5ZZw1ZE6trn4c3DtxoNmKVUio+zUynX cYqLEH+qSmhTay2bV1z7aqpoBv7+XeGbOdRy4kPv5eSlyoCF7OAPT2MTc+BtTiFYndKK 7VHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oSoNvGIA; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz10-20020a0564021d4a00b004635dccd3casi10150708edb.57.2022.11.14.07.55.56; Mon, 14 Nov 2022 07:56:16 -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=@amd.com header.s=selector1 header.b=oSoNvGIA; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236730AbiKNPiG (ORCPT + 87 others); Mon, 14 Nov 2022 10:38:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236124AbiKNPiE (ORCPT ); Mon, 14 Nov 2022 10:38:04 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D57502E6A4; Mon, 14 Nov 2022 07:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LCRKNjYGPXgqP1ZFwdk+4BL0Mz/Ucnv0jANasN5OgmqB0/1aoUsh8DAQDhghBHCpSO5gqLvtQ1aBNR9sJwc8eZW9dq7/lY+3uoBBQ3laybuMSLuBIbvi14BCr5lUrIbgXjeZ9AFvu1AcVwsaTKfpeb6fw0wZnTZq8G8w1NXc2aY1x24bQy71L74s9awK1/ayBD5MWeCkYgDWgJqCvfTWV01yYy05vbQB7b3ouGWbQ7aXeyblux1zQm3nFCqbAypdDjVgZ7HF3pw7+LUZF7mEwpMQnDnklW0Ce9Lzx1zVBO9nmcZOhJBvs+PSYpPauIiG5j/XTEgJmO2BQsb1f7h5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MwLCzAslaPP7qJptUm+JvjOntC6dnO2i1C73ncOLSs4=; b=UPfjopWqxJsNFSFCcgQ0DFoMr9iNYW/OP/4z8wuANpu4Eh1957DLH4DMEaeMb1IyowQoTtwMjH3c0HJaA7iL6pmkYtxHDRe/pO2qRD8oGLN20j/Mr6PEcp9ruYON45lNvW7DbBuCl/xlip5/vKbZ7uK/qOb5fB2QJ57NT4gQ1yYhiTJQTg4Z3asHSsdGxraXH7yC7Ianv12fvsqLlAo6eiMHxPRscdnwaP0D3oBv04Eo4BjU4O34RNREZmkbOi8Om3U33G0NCgOj3a7fQIz883Ez6MnbhIXIKUu0ZbmrrWy6o1HJHrd0xlj75rxg0nAoOnZf8FCpb8tXLWgCWccitg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MwLCzAslaPP7qJptUm+JvjOntC6dnO2i1C73ncOLSs4=; b=oSoNvGIA6x2bJkvuRzmcjgk/B6aNIIGvgK+IZKg7TmKt7laeJSfstrdNJQRIyq4BVkHNo+t/89XMqjqfOmCN1COWMF6uDj9nB1B6N6eTPqEr1wj0SR4oFb68l941vYrN8bubL3JD62GIia8mPljrPNNXnJf5A1tdaLr20PvxofQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by CH2PR12MB5018.namprd12.prod.outlook.com (2603:10b6:610:6e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.16; Mon, 14 Nov 2022 15:38:01 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::44a:a337:ac31:d657]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::44a:a337:ac31:d657%4]) with mapi id 15.20.5813.017; Mon, 14 Nov 2022 15:38:01 +0000 Message-ID: <53e6278b-9261-952e-56bb-4bd288cd2e9e@amd.com> Date: Mon, 14 Nov 2022 09:37:58 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v5] PCI/ACPI: PCI/ACPI: Validate devices with power resources support D3 Content-Language: en-US To: "Rafael J. Wysocki" , Bjorn Helgaas Cc: 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 References: <5754039e-e3c6-cdb8-8d64-6332b0093940@amd.com> <20221111214209.GA748269@bhelgaas> From: "Limonciello, Mario" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR03CA0010.namprd03.prod.outlook.com (2603:10b6:610:59::20) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|CH2PR12MB5018:EE_ X-MS-Office365-Filtering-Correlation-Id: 50e84bf5-50a4-4f94-7e1d-08dac656366e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N3zXtq+exrV8/xmWgRjBgv+Ja0jBcY8kXj3mQOJf64MTcgY6j9gsjnQuR9Ry3JysaGEiwr1YrTHSh63eRBJ2GYqdqOQNBHILa7ZzSQ19El+sTVypw40HR/7SuESVkwKZw4d7GIOfjruHI40Fm7Ar3cX9uhsr55srKn60KeOmCfGMuf0phy8e/aGFYry0cL0b0O+9d2e0Vc1TW742ekDRd4tJVa21lJ3LCfBW9e4G9+bonFFT4P+4UVXtpxCp/3QGuUBfXVjNl3W2JmloU0356tFI/ZEbNYrHBaGwx5L2eK0LYHrQdStIGpmr3HlLzBbO5P7icMKBJmXszpfeSnAAh7MdH7S7JqOs1Tnn5/7PaopJ12fiNLU/tQqB6T2WyPiggtsid9CLDHf+0sCtNQ+A3FAmRwjB+1ZOkDjcU5QW4EGUx5IPJ7NCvR9ntOoDYlKBuW6ijFiDnw76F/lc3Gwx8VDF7fRbQmSNNF4/ca9qxm5f5syQtBYUWo0uXeM8KjFf+83rFkpXuU2DZrCWOQhXS8+m33doC4NTk2oU8KxAs2GbhNcpgcHO4q+epFanW5gOyyKde26922Fa2fTJk+lGBvQWwMdR9OacEw17Xw/yAqt/sSs2VerUv8JeZdsq11gwfbrsALNi6iuO3Jopjvpgm1lUMDRHNrwGJc2mwtiyxhr+2e0VT4IgdSdQdsBnMj6Nfuq8R5oJ4cGNeEtJJWmrloH9KIYtgqPL9CW94Wv4O6xP+AUhvVbpsXY9lRM4sVAM377gOM/VlyHrdwKFTIachmK7lCzC6ca1qmCoMssS21E= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(366004)(376002)(396003)(39860400002)(451199015)(8936002)(5660300002)(186003)(41300700001)(2616005)(7416002)(19627235002)(6512007)(53546011)(36756003)(15650500001)(26005)(4326008)(6486002)(478600001)(8676002)(38100700002)(83380400001)(6506007)(66946007)(31686004)(110136005)(66476007)(316002)(66556008)(6666004)(2906002)(86362001)(54906003)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d1dkU2trYTVwYmRQeGZsaG9vNVFqSzRXblVmenRkV2w1cmt5bmFzR2xoa0FQ?= =?utf-8?B?TFh3di91aFp4UGIyRjluYVUzNlpRMVUzRW5MckVuZzdBTldadFFyNXk2enMx?= =?utf-8?B?bTdNZDVscGV6dTQzMS9DbndicE1BRklRcmNCSkl2NkpyU1NCVmtIQWNWSFYw?= =?utf-8?B?UUEwV085REcvM2w5eG1zWkd4Y25YcGxPbDJuYzgwS1FsTjJ6U2UwSG9PV1Jq?= =?utf-8?B?Y2dFNE5pUE9sbGMrNzNLdUxFcy9TWVNBdXVqMXBSSUdRREdXbTBFZzEwdFF4?= =?utf-8?B?Z1NLRnppODRGdEZ4azZlMm0yVHpzQU9Dc2ZiaG8yMUF4bGo1Q3dqODRXcFlj?= =?utf-8?B?VEx3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amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50e84bf5-50a4-4f94-7e1d-08dac656366e X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 15:38:01.0449 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f8v2gxfzr077gxng6zDeqLPLR5unRzbSI3nEGCDsNiaf/jTI9js3VHTtkUrRQsxmum3EPST93DmOZ2SXDLl28g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5018 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 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? Thanks,