Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3444280ybb; Mon, 13 Apr 2020 08:12:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJZ4a6rrFFz4vLML1hy+dR4aAyUpSlT8W9w3t1/nX26r0gSIL84Ifa0TW5CWi/a3m104TNz X-Received: by 2002:a17:906:4d45:: with SMTP id b5mr15332165ejv.249.1586790741793; Mon, 13 Apr 2020 08:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586790741; cv=none; d=google.com; s=arc-20160816; b=Wb6wGiLvimVJYUuoHmIZV1lnUyXpory4M/Pgl8o/8ufwmaWbovqggz4QWYMn5X8Brr oOcecsmADFrR0u6ZbqifjOb7U4bNs3V0OBMb3LmWt2F2F0rpr6oGiw9DURF5bdXhjLBt P/kU4kW2+UQXQT0MDbdf9AsFpRcyCs282+i2J+NTVFjM3fs4FgDotcHuWr4L0hmRru0W l/EUnbFAsEioIeswffAXByOCeFBYAx5k+KxYRrUirwD2P4uiTma3N6gxy4i61O6vEEmS Lyrq+4qTowFoZ3hXzVzKm+MwSDE7JxxHTn7jXk3DXjFl/guU7j5LyW0SryDdNDNSyMfx vZZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AIzOt50qCMDrR8+x22GmkfIIGJdcpsoV6Dog0U8l+cg=; b=J7qOKhqm9AmgsOjPjyiohsHYqaemsCxSR0ZK8e0c75jRSWoM0JQodlCi0ahKT9hpZM UZ0VW4PP8WQKCRiPeUsMvPugNJ+AwBIzw7FWVoowkr5rXs17SZPhbp7HahfSLIWAngov dgvo82k/uoteE9+Hrg8b5XHGR6+bpqnftm9wlPRghYQCvX6kU31BTBkN+o5FxCWmXlEk 1mk1m9t0+3TMx2ljLGhPKQMCx5MJpS2JCBb1X2clqL5BV06BgudKvPBzGH+VOFDQhCvL KmzrAAyOf63cWVnLiP/6tkV8CF9O8D8mSKqG20FZNH7xMs/7rLnJS4jjAk7vz55c0T32 IqJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YBG8XVcf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si597121edr.528.2020.04.13.08.11.57; Mon, 13 Apr 2020 08:12:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YBG8XVcf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729770AbgDMNL1 (ORCPT + 99 others); Mon, 13 Apr 2020 09:11:27 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:31585 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729762AbgDMNLZ (ORCPT ); Mon, 13 Apr 2020 09:11:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586783483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AIzOt50qCMDrR8+x22GmkfIIGJdcpsoV6Dog0U8l+cg=; b=YBG8XVcf9V32gNtkfmAUKUoOxRWIsq7MLTov0YyqeHsYj74y2tivzMhtSnph3fBvqSUgmV +76PeD8/2e7heijsHKZBnJSxFNXg08Xe3DrbBd1iABLNNLupzNL6CEqrQ48fjVHSEDrefm Y6boOsci9GUzDiXjdke1Un2YfRGfB6E= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-nGSZ_qhpN4uGOlJA8vqpSg-1; Mon, 13 Apr 2020 09:11:22 -0400 X-MC-Unique: nGSZ_qhpN4uGOlJA8vqpSg-1 Received: by mail-wm1-f71.google.com with SMTP id f128so1014280wmf.8 for ; Mon, 13 Apr 2020 06:11:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AIzOt50qCMDrR8+x22GmkfIIGJdcpsoV6Dog0U8l+cg=; b=WNmX1Cc9QIGaGKpNJ+eGS6EiTI4JY7NIlu+QgkYNPEe2GHqOEaJWoZlL+HxHJUc903 u6zd9hR0v2ikvSNVp+7kN/ZILF9fo+XsXPicoMjFT0L/fNYdPmIr1SQymRjohC06pWAm zgsIC09XW7m5sQ4NFLvfXjYsN7boGxHjtQF29xUgrNLLO1c4saWECDJZp7xAGG5vEjwc r0rns0OGMXJjHYf27h5+8rdqZacZeghuoy0f2hrgLhUFsxpjcZoMyYv9snJ3cP4kiI27 qpnJDeTxK5KZrvdnaMbvUf+QubqXiQHprUtJBl4opKKRiTrh5xA+1is17tHVAZe5oEDj ALWw== X-Gm-Message-State: AGi0PuaqYUVvdSyCtXMHxaTJxy2W0bfMKxvfwYoDGyhimF2Xy5aTG5Ey s+h90rnjkXoMTdR73UuA42OxW3sWaaK3DOcZKpGL4YqxVyIQMX7ibg7vPHqUtVCsutVgsUAXsvM J9XDVZrxLvrwpsGK91DK8DH+3 X-Received: by 2002:adf:fe87:: with SMTP id l7mr3901101wrr.360.1586783480842; Mon, 13 Apr 2020 06:11:20 -0700 (PDT) X-Received: by 2002:adf:fe87:: with SMTP id l7mr3901084wrr.360.1586783480597; Mon, 13 Apr 2020 06:11:20 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c0c-fe00-d2ea-f29d-118b-24dc.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:d2ea:f29d:118b:24dc]) by smtp.gmail.com with ESMTPSA id s18sm5721389wrv.2.2020.04.13.06.11.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2020 06:11:19 -0700 (PDT) Subject: Re: [PATCH 0/7] PM: sleep: core: Rearrange the handling of driver power management flags To: "Rafael J. Wysocki" , Linux PM , Alan Stern Cc: Linux ACPI , Linux PCI , LKML , Bjorn Helgaas , Greg Kroah-Hartman , Mika Westerberg , Ulf Hansson References: <1888197.j9z7NJ8yPn@kreacher> From: Hans de Goede Message-ID: Date: Mon, 13 Apr 2020 15:11:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <1888197.j9z7NJ8yPn@kreacher> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 4/10/20 5:46 PM, Rafael J. Wysocki wrote: > Hi Alan, > > Following our recent discussion regarding the DPM_FLAG_* family of flags [1], > I have decided to follow some of your recommendations and make changes to the > core code handling those flags. > > The purpose of this is basically to make the code more consistent internally, > easier to follow and better documented. > > First of all, patch [1/7] changes the PM core to skip driver-level "late" > and "noirq" suspend callbacks for devices with SMART_SUSPEND set if they are > still runtime-suspended during the "late" system-wide suspend phase (without > the patch it does that only if subsystem-level late/noirq/early suspend/resume > callbacks are not present for the device, which is demonstrably inconsistent) > and updates the resume part of the code accordingly (it doesn't need to check > whether or not the subsystem-level callbacks are present any more). > > The next patch, [2/7], is purely cosmetic and its only purpose is to reduce > the LOC number and move related pieces of code closer to each other. > > Patch [3/7] changes the PM core so that it doesn't skip any subsystem-level > callbacks during system-wide resume (without the patch they may be skipped in > the "early resume" and "resume" phases due to LEAVE_SUSPENDED being set which > may be problematic) and to always run the driver's ->resume callback if the > corresponding subsystem-level callback is not present (without the patch it > may be skipped if LEAVE_SUSPENDED is set) to let it reverse the changes made > by the driver's ->suspend callback (which always runs too) if need be. > > Patches [4-6/7] rename one function in the PM core and two driver PM flags to > make their names better reflect their purpose. > > Finally, patch [7/7] updates the documentation of the driver PM flags to > reflect the new code flows. > > This patch series have been available in the git branch at > > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ > pm-sleep-core > > for easier web and git access. The series looks sane to me at a first look. I've added it to my local tree for testing on all the pesky Bay and Cherry Trail devices I have and which always cause trouble in this area. Regards, Hans