Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp927443rwe; Thu, 25 Aug 2022 11:42:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ludfzddCPH4jhfq1MA9tdptEqYue2iN2BKepcctjOc7luI5qd4BjDuKwRLSu0dxiTTQTj X-Received: by 2002:a05:6402:4515:b0:443:7833:3d7b with SMTP id ez21-20020a056402451500b0044378333d7bmr4115193edb.151.1661452942995; Thu, 25 Aug 2022 11:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661452942; cv=none; d=google.com; s=arc-20160816; b=GqaYunfiBpKbuNr1xGc0+U4DWbCCfH+q9RBVRY+e5jMVRsIcRUOKPo56N1KJ+m2qcG AkR7UjtHVQuGXDdT6dZaYgpFlpBN4xONGaYoITcL4OB9jCfrYUva2aB0bGyJq0J4RZCe dIQSw0+0qLzyMvLWFs0Ymmou52gPhzmf2Vepa4SiXJDO7D6CvyaY0RF3kW0ZDsRlDtrK N/bsRUVv8R8D7un+DKR99PnVAG5H5ughrAI2aPFDCQQPCER8br8EGt/xyOms5ofzMVij WKKiYTO2URsowYW4cCWX+pQqmPrcO80J4KQ2hW+ito29YKslEXOIyWMX3duUogWAg64r lPTA== 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=r7wf1VgQcXbb9wfHksSmuRqPiTwtCYwRKi+1g4SftOU=; b=drT4oa7pUd7iCRRFgKPGw/Uhie3B0BETA0Q56m5w/FvGrZG1hM+5IRK/tx/NHUESqG Cg4GcAj9P/8votLqRvmdbZUz12dscoMcYRSaitI4ADytihGeUEh0p4YVAQPi1lHI1U/j 0BviQp/sbPDvBrlv1GF/iiW8kiuHalq/bP+ZSJsw73BIWHtbGL/l9xf4GvOUvO6RvEjt WSjDjUI45xZRZHxzijmB6BrgMCyGUSKA97jFC0W9rhZYn+OLpuPmYgVYJAZpPzgzWwh4 9hoe4zCJ11RX2ALv2CjlbYfVE+Tceu91oBQhhPwaE5vcNG9YK8XvHVRDd1ksuLEZfj2F 3hlg== 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 dt17-20020a170906b79100b0073d15dfd9b7si4294838ejb.472.2022.08.25.11.41.56; Thu, 25 Aug 2022 11:42:22 -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; 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 S243376AbiHYS05 (ORCPT + 99 others); Thu, 25 Aug 2022 14:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241669AbiHYS0z (ORCPT ); Thu, 25 Aug 2022 14:26:55 -0400 Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 259F758DFB; Thu, 25 Aug 2022 11:26:55 -0700 (PDT) Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-32a09b909f6so563788087b3.0; Thu, 25 Aug 2022 11:26:55 -0700 (PDT) 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; bh=r7wf1VgQcXbb9wfHksSmuRqPiTwtCYwRKi+1g4SftOU=; b=x4BLn8BkdZtRJ05BlL0taz6+E5x0Cc8MUq2/vObVTnzAxjQQrEiPGqP2fN9sSFudT4 rInyKR+Etb53PFxDG70ybzpuFZnWPO9Dzt9OCq8IPvVXMa7GaECHzMXk2eI/MPMhQy1a 8elBW8gNBPTu8Ud0Lw0hbIRrjfgfTSUurxwwWqCQWe8LMPcq878G3olDfj9oPSvAoD5L zucCSCD5FKOsIalRFUyv1OftZpIRAI9vEO9SYTLFnYXb+ZQoCCFqTWFOtaPFa0pUybHv y7LoRmF5vX15IC4aRRI3hmUWFsCkFM/TXeaG4yKTsdtsvgk7IK93joMbbJvgCVvtrQkZ JugQ== X-Gm-Message-State: ACgBeo2ygJNTrhIb3LAlfXnnuAPanAs6U6+vsimeFPvkBiV3ZbJHdqKg ILxt8FOHF7KDmnJdj3BBX2XH9TB+nBYSsxYO2H0yM7dYtnY= X-Received: by 2002:a25:b749:0:b0:68f:171f:96bd with SMTP id e9-20020a25b749000000b0068f171f96bdmr4577792ybm.137.1661452014375; Thu, 25 Aug 2022 11:26:54 -0700 (PDT) MIME-Version: 1.0 References: <5607133.DvuYhMxLoT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 25 Aug 2022 20:26:43 +0200 Message-ID: Subject: Re: [PATCH v2] ata: ahci: Do not check ACPI_FADT_LOW_POWER_S0 To: "Limonciello, Mario" Cc: "Rafael J. Wysocki" , Damien Le Moal , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , Linux ACPI , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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.