All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Hans De Goede <hdegoede@redhat.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 0/7] PM: sleep: core: Rearrange the handling of driver power management flags
Date: Fri, 10 Apr 2020 17:46:27 +0200	[thread overview]
Message-ID: <1888197.j9z7NJ8yPn@kreacher> (raw)

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.

Cheers!


[1] https://lore.kernel.org/linux-pm/Pine.LNX.4.44L0.2003251631360.1724-100000@netrider.rowland.org/




             reply	other threads:[~2020-04-10 16:01 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 15:46 Rafael J. Wysocki [this message]
2020-04-10 15:48 ` [PATCH 1/7] PM: sleep: core: Simplify the SMART_SUSPEND flag handling Rafael J. Wysocki
2020-04-10 15:48 ` [PATCH 2/7] PM: sleep: core: Fold functions into their callers Rafael J. Wysocki
2020-04-10 15:51 ` [PATCH 3/7] PM: sleep: core: Do not skip callbacks in the resume phase Rafael J. Wysocki
2020-04-10 15:51 ` [PATCH 4/7] PM: sleep: core: Rename dev_pm_may_skip_resume() Rafael J. Wysocki
2020-04-10 15:56 ` [PATCH 5/7] PM: sleep: core: Rename DPM_FLAG_NEVER_SKIP Rafael J. Wysocki
2020-04-10 15:56   ` [Intel-wired-lan] " Rafael J. Wysocki
2020-04-10 15:56   ` [Intel-gfx] " Rafael J. Wysocki
2020-04-10 15:56   ` Rafael J. Wysocki
2020-04-10 19:38   ` Bjorn Helgaas
2020-04-10 19:38     ` [Intel-wired-lan] " Bjorn Helgaas
2020-04-10 19:38     ` [Intel-gfx] " Bjorn Helgaas
2020-04-10 19:38     ` Bjorn Helgaas
2020-04-13  6:35   ` Jeff Kirsher
2020-04-13  6:35     ` [Intel-wired-lan] " Jeff Kirsher
2020-04-13  6:35     ` [Intel-gfx] " Jeff Kirsher
2020-04-13  6:35     ` Jeff Kirsher
2020-04-10 15:57 ` [PATCH 6/7] PM: sleep: core: Rename DPM_FLAG_LEAVE_SUSPENDED Rafael J. Wysocki
2020-04-15  9:51   ` Wolfram Sang
2020-04-10 15:58 ` [PATCH 7/7] Documentation: PM: sleep: Update driver flags documentation Rafael J. Wysocki
2020-04-13 13:11 ` [PATCH 0/7] PM: sleep: core: Rearrange the handling of driver power management flags Hans de Goede
2020-04-18 16:23 ` [PATCH v2 0/9] " Rafael J. Wysocki
2020-04-18 16:29   ` [PATCH v2 1/9] PM: sleep: core: Simplify the SMART_SUSPEND flag handling Rafael J. Wysocki
2020-04-18 16:51   ` [PATCH v2 2/9] PM: sleep: core: Fold functions into their callers Rafael J. Wysocki
2020-04-18 16:52   ` [PATCH v2 3/9] PM: sleep: core: Do not skip callbacks in the resume phase Rafael J. Wysocki
2020-04-18 16:52   ` [PATCH v2 4/9] PM: sleep: core: Rework the power.may_skip_resume handling Rafael J. Wysocki
2020-04-18 16:52   ` [PATCH v2 5/9] PM: sleep: core: Rename dev_pm_may_skip_resume() Rafael J. Wysocki
2020-04-18 16:52   ` [PATCH v2 6/9] PM: sleep: core: Rename dev_pm_smart_suspend_and_suspended() Rafael J. Wysocki
2020-04-18 16:53   ` [PATCH v2 7/9] PM: sleep: core: Rename DPM_FLAG_NEVER_SKIP Rafael J. Wysocki
2020-04-18 16:53     ` [Intel-wired-lan] " Rafael J. Wysocki
2020-04-18 16:53     ` [Intel-gfx] " Rafael J. Wysocki
2020-04-18 16:53     ` Rafael J. Wysocki
2020-04-22 20:10     ` Alex Deucher
2020-04-22 20:10       ` [Intel-wired-lan] " Alex Deucher
2020-04-22 20:10       ` [Intel-gfx] " Alex Deucher
2020-04-22 20:10       ` Alex Deucher
2020-04-18 16:53   ` [PATCH v2 8/9] PM: sleep: core: Rename DPM_FLAG_LEAVE_SUSPENDED Rafael J. Wysocki
2020-04-18 16:55   ` [PATCH v2 9/9] Documentation: PM: sleep: Update driver flags documentation Rafael J. Wysocki
2020-04-18 18:00   ` [PATCH v2 0/9] PM: sleep: core: Rearrange the handling of driver power management flags Alan Stern
2020-04-18 18:08     ` Rafael J. Wysocki
2020-04-18 19:41       ` Alan Stern
2020-04-19 14:43   ` Alan Stern
2020-04-19 15:13     ` Rafael J. Wysocki
2020-04-21 10:30   ` Ulf Hansson
2020-04-21 11:32     ` Rafael J. Wysocki
2020-04-23 17:07   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1888197.j9z7NJ8yPn@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.