Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp931530rwe; Thu, 25 Aug 2022 11:47:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5lxh3FKHBsQckQoTm37vMepv5v9XC3HqRa8wx4PymORJ89BqfQYKpYD4tsjT39z+L40Hfo X-Received: by 2002:a17:902:b692:b0:16f:87a0:ddbb with SMTP id c18-20020a170902b69200b0016f87a0ddbbmr310279pls.35.1661453279129; Thu, 25 Aug 2022 11:47:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661453279; cv=pass; d=google.com; s=arc-20160816; b=HqqWT3flFy6c/wS6+4PA6RUPw76xetCijjydkcp9fuBbUGkgisRy3BiMdh+rJiyANc 8/6Xe4xMIzeUC6Q1qyYtpFHsxG8s13mt6RVMxPFx8cnxkFjH3NAuyABFEhTKi7SWb1JL hLwhzXnMYTeM8tYcogoO4tDrzzbosyP0GQLwZJBmvI9kLdosuaFSNQg/e6IP1EkheE7S bp5PfcAp79MBXQveTvd0ZoQCrwhm28RfnbCmewIVpFhRhNTS/GcELbbq1nCBHgGe7E1q 1vDhnYBlTjfNDzl9YWescn8Y/HTeSslo32UhcpRMQVWYdTXlEzLSSpAPA4zkoNbXPnMA IvLg== 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=JnhZ4DdJRNtKxToWfpyHN1WppDMK5XDv79whDp+hpRE=; b=elUZ1VqvOH+bFM8XZIRrVaH6eFMf8usxqqRJZu+2gCF1Os9gG0h3g++X8ZxZhl+naf eXZkWVeH214MRszAjX+evrIOPJwTJh30XcXmaQY+LtsD94kGnyT+5lWbq56PJhKlrKvQ jZzJ7BLRJC/eehr/MerXkhGZbTKxFD2Xe/9TzqGTBexeKkQc5me46dxhHLWEaJH7YlZZ 0IeZa3yDRJisfjxqt7Qut/pejgsLwLHTJDV3oCPxXet6aDlNKJy688tHLZGPar8TDSwp IySnEfI9vdyOhRNFSG0HXs/aAC/5xNNK/dYca3EI9xV5MYafQlH79ZBZ9Bv/N/se11yH vJug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Mywcpu+l; 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 196-20020a6304cd000000b004229c0624f3si22149719pge.132.2022.08.25.11.47.48; Thu, 25 Aug 2022 11:47:59 -0700 (PDT) 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=Mywcpu+l; 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 S243384AbiHYS3V (ORCPT + 99 others); Thu, 25 Aug 2022 14:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbiHYS3T (ORCPT ); Thu, 25 Aug 2022 14:29:19 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2074.outbound.protection.outlook.com [40.107.220.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D8F5B7ED5; Thu, 25 Aug 2022 11:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1BdIAIkp55U0hgIuGR6t8P25KXIbuPvO14vRlPglKh5hd1xtrljztX/2AA1bJBIVeRBpSS5oc93bi6MFeDacvg+mdJQ3opoCZQPUfu2IW2uXzZW4hvdDfkb/Ii9FEf5b31GWt6Lcg1lN2/s08PXwffOIPElKEokCtVP9+a1y48cG9wq46mksauB0vPKNn0OwTML2TSPgZYYaYpTGj1ZtxiwDj2Mzm4U/2BD/sR43kJpRktwhY7TTWZCxYP5oVJ/OM+Gr81DR4ARpMNjZQ+MwzjH91p53/frXJ6SLA6ns9hyKqTHfI2Oq3bdgSSmgbsjn3GT90rRtog5eeziPwgoyA== 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=JnhZ4DdJRNtKxToWfpyHN1WppDMK5XDv79whDp+hpRE=; b=V23t+KzlWqkYaBMFdg6qsPZOL5Gl8jxHX142kKDFWdOJ3cJ4MCJskFYBAoJl9F0SUsS9OJpWy+JqQfdj9C911tELBChA5/g8VbgNhiBCAYzzc6QVzvTZ68pdsXtuVyV/rTah4r9M82zTn9KVggdWDwI0SMgX3KjIkdve9VQXSoQfK4KliqJNgrD47g8Aim5lody4Y56w8yWwmz1qKyDaZN0YWuI3S14RH21tnAB/aOvmoiQmwDcP06ceCc6+Ki2YcSeHFVDy90RtQqX48/xfxjFquBYl2OkQ81eDRhCZiuyVjnmcyIWuhYewGmciC4WFcVGVp+7Pac3ac7222MAwNg== 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=JnhZ4DdJRNtKxToWfpyHN1WppDMK5XDv79whDp+hpRE=; b=Mywcpu+lJV4dtF/Dtc2WrE9+NqnFe0f47th1JNNvbGB9b4Ol2X5kTnlTBT7wvag1Qu2tmghlReqVbM7ClCZi82kC8QPlCrmgABWWnHIUABCyJRc4g1vhrRwo03VkV+3ov1ioarDcoJ9WV3CPmjBRZmCjA8VuD48NLmwf9eB7XiY= 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 MWHPR12MB1743.namprd12.prod.outlook.com (2603:10b6:300:113::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.21; Thu, 25 Aug 2022 18:29:16 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::e00a:1f8c:dcd1:afc3]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::e00a:1f8c:dcd1:afc3%5]) with mapi id 15.20.5566.015; Thu, 25 Aug 2022 18:29:15 +0000 Message-ID: <54e439c8-7390-be01-66b2-5692af571d1b@amd.com> Date: Thu, 25 Aug 2022 13:29:13 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v2] ata: ahci: Do not check ACPI_FADT_LOW_POWER_S0 Content-Language: en-US To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Damien Le Moal , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , Linux ACPI , LKML References: <5607133.DvuYhMxLoT@kreacher> From: "Limonciello, Mario" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL0PR0102CA0024.prod.exchangelabs.com (2603:10b6:207:18::37) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 011ef10c-11f4-4de1-f5af-08da86c7b703 X-MS-TrafficTypeDiagnostic: MWHPR12MB1743:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SCxxJ31+wUuE93jIpED2Sl7KoY4HJZCskqZAmVeyRCjkjEyd3+8oaHpEn8AxyTl1Dq0OhrrB1Rr0eGP75LDMAoTWjYhZWz9AJM4aOz7OrZ75VquwzlIYzNEI5W0N6iO1h6GYQkbXNlDCSeYDrnkZOg4Or+GPJ1PGy1qWf5ozEnE7LeNOFYJGSf7+fH8qcIKHn0ZHezk8mfjBKUWEnPDb6F2hgTqgqpgKgFckYkSBmlqFhbC6c0sMtXkta4BcAFUge4A00wwk2Z7SCMx/AnMoyhswe65hR9bCeIYlwaoVXMbpQx+mAiSyZgnhfXQG46fRusXRNuPf25nQbirC0VFVOuj8UJnhrk6YJu8wPeC6fBRzEA/XJbtfmmeDZcZsVf/7kWAXXq5CS/vxjQEbBVKEJW3od9SJ5ABP7iZgN+qHjGwtR0b6UGeDCcZVPrS5s1jZ1lLGq9wkHeUtxvCTjOlt0UM/GBfr4bYqn0NJuRGajJrs6E1rpldU6mPmVXLRuHe4jI8kQs3nrdbArwG/RT/g6oAhIPCZ4GR/Nmy65rMKzPdDuAmWF7Hqev3T/3u7lbOzskx4E8SxYbmaK7MceDUqCQumI4kbmrVz6TFtOwxLrNXXK46hIyo8pSiYVapWgNVqz14vYS3KD5YoRHsMztzm6APNwMbXVcllzpd1taJEc0S2obXldBeNrY/IQcPL+YN963ufvhogqCJMcvS3bQ50aimBFFDUcv24QB4UIQIW8+9j/QZaHNk45M1MULzVHtPWN3DdRHPxLv5D6pXwnCWXa2zG82+sSwDBamNabFzlEDY= 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:(13230016)(4636009)(136003)(39860400002)(366004)(376002)(396003)(346002)(38100700002)(186003)(31696002)(86362001)(41300700001)(2906002)(6486002)(2616005)(478600001)(6506007)(26005)(83380400001)(5660300002)(66556008)(8936002)(6512007)(53546011)(316002)(8676002)(66476007)(54906003)(66946007)(4326008)(6916009)(31686004)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aXpUNzJocjB2b04yR1ppeTlmNHhlN1crTGtRZExKTUEyUE4vOUNtOXZxTWZL?= =?utf-8?B?eWJyK1FsMDl6ZG00Si91enU3TnFGWU9CMnVyenhjL3RubW5sdU9TS1Iyb2FL?= =?utf-8?B?Z3FEdHlEakI1R0wzWUVZVi90VWZZM2RPK0I5aWpXa3RScmYyZlBmNnhaUG1T?= =?utf-8?B?WDBFNFpVakhsMy9OL1hRaVZuMEZ2aDYyNlZ6YjlXREdGV2FYZG83aW5uMHdk?= =?utf-8?B?UEcxR1pvcGFkM2FEQ1pCUmFrZjc3Q1pnYjlYa1VDM2F1RGdtTkVsUUdNcnpD?= =?utf-8?B?Ly91SVlSTTluU3htRFhzekM0S2svVU1kbmtPWnBLMHdrSVU2Q3RzdDMyN21r?= =?utf-8?B?UUZOZkhPL0dGT0MvK2NIcitXRDZUMXh1d1hSODlCMWY1czMvdGx6RzdNV1Vq?= =?utf-8?B?bW9KY29mczExMlNoZ09XOGFXMEJXVzhjV0VhMzhxVzk2d3VJRnhIYVhEbEtx?= =?utf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zBTdCtUVWtp?= =?utf-8?B?STJQelhBVjNzVHI3aFJNYzhkTXBwVGRJTG5lSWlnMmFmUERZZVdTWXlZMFhK?= =?utf-8?B?N0dYQWxWOWNUdXBwcG5zaHZQYW1Ca2ZCRHBqK3NROWEwdThSdHBHZldVNXVn?= =?utf-8?B?aWU2bXo5eFBsZkdNWm01N3hKM0JLNElBWEZCTDYxZ3JHQSs2MmJwVmJVdFh2?= =?utf-8?B?cm9GVnEyR2w3c2M0cGVZdFFTeGJzK2IreTFsOVNOL2IyUC8wMFBmUGhkSnlI?= =?utf-8?B?UnBvU0Z1amV3VUQ0VXB5dkxJRzFlMlpNUk5RTmtwZ2RVSmhDY0ZiQStQeXow?= =?utf-8?B?cStKcTVLVFkvRWNlM3hZT1huL3AzRkNhMjNxc2VQc2Ztc0dHaEc4QWhoUXJx?= =?utf-8?B?aERBYlp2eFJkQ0JnVi9FNGJxYkdmamxOckFLZUhEWS9VU21uMjZJeGRkQURi?= =?utf-8?B?eXZJdTg2K2pjRDFncXA2LzNRcUZ5QlcrdE9DdXdMWVpvZHRuZkZtNElKczdC?= =?utf-8?B?bHU1SmZqZUc2bHEyR1hheUFkaWRkOThlZ1FCTTRUSDl0QUw5dUJNQlJqM0J1?= =?utf-8?B?K3hIL1VNcmVEZnl6VWxCZUczaVI4Ymo3NlVpTStLYXp5YXI3cDlZZThNYU53?= =?utf-8?B?SVNtVzk3L0JWeXBkeHF1cVZFa1lBQVRkV2JwZlo5MWZhR0ZVTm5teEprb2hu?= =?utf-8?B?L2VWUEFESHlEYjVWdWxnWFVKcWdhSEx0ZGlEWlJhU2R0cmNUUnJaVTJjUzFh?= =?utf-8?Q?coYTM+qtj1xY3gg++czbk+ehP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 011ef10c-11f4-4de1-f5af-08da86c7b703 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 18:29:15.4075 (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: VkOakmZLy0KDMBDmYGv2sOaNePbCbqr4NtKm3CZ2HCEpNA4aOi/Zf1xN/IeTMq/m1DFOsbYhpC7sssA1iGMxvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1743 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,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 8/25/2022 13:26, Rafael J. Wysocki wrote: > On Thu, Aug 25, 2022 at 8:17 PM Limonciello, Mario > wrote: >> >> On 8/25/2022 13:01, Rafael J. Wysocki wrote: >>> From: Rafael J. Wysocki >>> >>> The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to >>> use low-power S0 idle on the given platform than S3 (provided that >>> the latter is supported) and it doesn't preclude using either of >>> them (which of them will be used depends on the choices made by user >>> space). >>> >>> For this reason, there is no benefit from checking that flag in >>> ahci_update_initial_lpm_policy(). >>> >>> First off, it cannot be a bug to do S3 with policy set to either >>> ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER, because S3 can be >>> used on systems with ACPI_FADT_LOW_POWER_S0 set and it must work if >>> really supported, so the ACPI_FADT_LOW_POWER_S0 check is not needed to >>> protect the S3-capable systems from failing. >>> >>> Second, suspend-to-idle can be carried out on a system with >>> ACPI_FADT_LOW_POWER_S0 unset and it is expected to work, so if setting >>> policy to either ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER is >>> needed to handle that case correctly, it should be done regardless of >>> the ACPI_FADT_LOW_POWER_S0 value. >>> >>> Accordingly, drop the ACPI_FADT_LOW_POWER_S0 check from >>> ahci_update_initial_lpm_policy() along with the CONFIG_ACPI #ifdef >>> around it that is not necessary any more. >> >> Looking at the source commit for this behavior: >> >> b1a9585cc396 ("ata: ahci: Enable DEVSLP by default on x86 with SLP_S0") >> >> It was trying to set a policy tied to when the system is defaulting to >> suspend to idle. >> >> To try to match the spirit of the original request but not tying it to >> the FADT, how about using pm_suspend_default_s2idle()? > > The user can switch to "default S3" later anyway, so this wouldn't > help more than the check being dropped. Right, they could also change LPM policy to different policy later too if they want. This is just for setting up default policy. I think if you matched to only when pm_suspend_default_s2idle() it would be the least likelihood to change this default policy on unsuspecting people upgrading.