From: Ulf Hansson <ulf.hansson@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
Linux Documentation <linux-doc@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Kevin Hilman <khilman@kernel.org>,
Wolfram Sang <wsa@the-dreams.de>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH 02/12] PCI / PM: Use the NEVER_SKIP driver flag
Date: Mon, 23 Oct 2017 18:40:24 +0200 [thread overview]
Message-ID: <CAPDyKFrzW5ZJ5WE=utoT6PZUwEfv1xryw0M4zXsdD8SBJPEe5Q@mail.gmail.com> (raw)
In-Reply-To: <3825270.mro2tgMB2C@aspire.rjw.lan>
On 16 October 2017 at 03:29, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Replace the PCI-specific flag PCI_DEV_FLAGS_NEEDS_RESUME with the
> PM core's DPM_FLAG_NEVER_SKIP one everywhere and drop it.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 2 +-
> drivers/misc/mei/pci-me.c | 2 +-
> drivers/misc/mei/pci-txe.c | 2 +-
> drivers/pci/pci.c | 3 +--
> include/linux/pci.h | 7 +------
> 5 files changed, 5 insertions(+), 11 deletions(-)
>
> Index: linux-pm/include/linux/pci.h
> ===================================================================
> --- linux-pm.orig/include/linux/pci.h
> +++ linux-pm/include/linux/pci.h
> @@ -205,13 +205,8 @@ enum pci_dev_flags {
> PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT = (__force pci_dev_flags_t) (1 << 9),
> /* Do not use FLR even if device advertises PCI_AF_CAP */
> PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10),
> - /*
> - * Resume before calling the driver's system suspend hooks, disabling
> - * the direct_complete optimization.
> - */
> - PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11),
> /* Don't use Relaxed Ordering for TLPs directed at this device */
> - PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 12),
> + PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11),
> };
>
> enum pci_irq_reroute_variant {
> Index: linux-pm/drivers/pci/pci.c
> ===================================================================
> --- linux-pm.orig/drivers/pci/pci.c
> +++ linux-pm/drivers/pci/pci.c
> @@ -2166,8 +2166,7 @@ bool pci_dev_keep_suspended(struct pci_d
>
> if (!pm_runtime_suspended(dev)
> || pci_target_state(pci_dev, wakeup) != pci_dev->current_state
> - || platform_pci_need_resume(pci_dev)
> - || (pci_dev->dev_flags & PCI_DEV_FLAGS_NEEDS_RESUME))
> + || platform_pci_need_resume(pci_dev))
> return false;
>
> /*
> Index: linux-pm/drivers/gpu/drm/i915/i915_drv.c
> ===================================================================
> --- linux-pm.orig/drivers/gpu/drm/i915/i915_drv.c
> +++ linux-pm/drivers/gpu/drm/i915/i915_drv.c
> @@ -1304,7 +1304,7 @@ int i915_driver_load(struct pci_dev *pde
> * becaue the HDA driver may require us to enable the audio power
> * domain during system suspend.
> */
> - pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
> + dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
>
> ret = i915_driver_init_early(dev_priv, ent);
> if (ret < 0)
> Index: linux-pm/drivers/misc/mei/pci-txe.c
> ===================================================================
> --- linux-pm.orig/drivers/misc/mei/pci-txe.c
> +++ linux-pm/drivers/misc/mei/pci-txe.c
> @@ -141,7 +141,7 @@ static int mei_txe_probe(struct pci_dev
> * MEI requires to resume from runtime suspend mode
> * in order to perform link reset flow upon system suspend.
> */
> - pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
> + dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
>
> /*
> * For not wake-able HW runtime pm framework
> Index: linux-pm/drivers/misc/mei/pci-me.c
> ===================================================================
> --- linux-pm.orig/drivers/misc/mei/pci-me.c
> +++ linux-pm/drivers/misc/mei/pci-me.c
> @@ -223,7 +223,7 @@ static int mei_me_probe(struct pci_dev *
> * MEI requires to resume from runtime suspend mode
> * in order to perform link reset flow upon system suspend.
> */
> - pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
> + dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
>
> /*
> * For not wake-able HW runtime pm framework
>
next prev parent reply other threads:[~2017-10-23 16:40 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 1:12 [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume Rafael J. Wysocki
2017-10-16 1:29 ` [PATCH 01/12] PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags Rafael J. Wysocki
2017-10-16 5:34 ` Lukas Wunner
2017-10-16 22:03 ` Rafael J. Wysocki
2017-10-16 6:28 ` Greg Kroah-Hartman
2017-10-16 22:05 ` Rafael J. Wysocki
2017-10-17 7:15 ` Greg Kroah-Hartman
2017-10-17 15:26 ` Rafael J. Wysocki
2017-10-18 6:56 ` Greg Kroah-Hartman
2017-10-16 6:31 ` Greg Kroah-Hartman
2017-10-16 22:07 ` Rafael J. Wysocki
2017-10-17 13:26 ` Greg Kroah-Hartman
2017-10-16 20:16 ` Alan Stern
2017-10-16 22:11 ` Rafael J. Wysocki
2017-10-18 23:17 ` [Update][PATCH v2 " Rafael J. Wysocki
2017-10-19 7:33 ` Greg Kroah-Hartman
2017-10-20 11:11 ` Rafael J. Wysocki
2017-10-20 11:35 ` Greg Kroah-Hartman
2017-10-20 11:28 ` Rafael J. Wysocki
2017-10-23 16:37 ` Ulf Hansson
2017-10-23 20:41 ` Rafael J. Wysocki
2017-10-16 1:29 ` [PATCH 02/12] PCI / PM: Use the NEVER_SKIP driver flag Rafael J. Wysocki
2017-10-23 16:40 ` Ulf Hansson [this message]
2017-10-16 1:29 ` [PATCH 03/12] PM: i2c-designware-platdrv: Use DPM_FLAG_SMART_PREPARE Rafael J. Wysocki
2017-10-23 16:57 ` Ulf Hansson
2017-10-16 1:29 ` [PATCH 04/12] PM / core: Add SMART_SUSPEND driver flag Rafael J. Wysocki
2017-10-23 19:01 ` Ulf Hansson
2017-10-24 5:22 ` Ulf Hansson
2017-10-24 8:55 ` Rafael J. Wysocki
2017-10-16 1:29 ` [PATCH 05/12] PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks Rafael J. Wysocki
2017-10-23 19:06 ` Ulf Hansson
2017-10-16 1:29 ` [PATCH 06/12] PCI / PM: Take SMART_SUSPEND driver flag into account Rafael J. Wysocki
2017-10-16 1:29 ` [PATCH 07/12] ACPI / LPSS: Consolidate runtime PM and system sleep handling Rafael J. Wysocki
2017-10-23 19:09 ` Ulf Hansson
2017-10-16 1:30 ` [PATCH 08/12] ACPI / PM: Take SMART_SUSPEND driver flag into account Rafael J. Wysocki
2017-10-16 1:30 ` [PATCH 09/12] PM / mfd: intel-lpss: Use DPM_FLAG_SMART_SUSPEND Rafael J. Wysocki
2017-10-31 15:09 ` Lee Jones
2017-10-31 16:28 ` Rafael J. Wysocki
2017-11-01 9:28 ` Lee Jones
2017-11-01 20:26 ` Rafael J. Wysocki
2017-11-08 11:08 ` Lee Jones
2017-10-16 1:30 ` [PATCH 10/12] PM / core: Add LEAVE_SUSPENDED driver flag Rafael J. Wysocki
2017-10-23 19:38 ` Ulf Hansson
2017-10-16 1:31 ` [PATCH 11/12] PM: i2c-designware-platdrv: Optimize power management Rafael J. Wysocki
2017-10-26 20:41 ` Wolfram Sang
2017-10-26 21:14 ` Rafael J. Wysocki
2017-10-16 1:32 ` [PATCH 12/12] PM / core: Add AVOID_RPM driver flag Rafael J. Wysocki
2017-10-17 15:33 ` Andy Shevchenko
2017-10-17 15:59 ` Rafael J. Wysocki
2017-10-17 16:25 ` Andy Shevchenko
2017-10-16 7:08 ` [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume Greg Kroah-Hartman
2017-10-16 21:50 ` Rafael J. Wysocki
2017-10-17 8:36 ` Ulf Hansson
2017-10-17 15:25 ` Rafael J. Wysocki
2017-10-17 19:41 ` Ulf Hansson
2017-10-17 20:12 ` Alan Stern
2017-10-17 23:07 ` Rafael J. Wysocki
2017-10-18 0:39 ` Rafael J. Wysocki
2017-10-18 10:24 ` Rafael J. Wysocki
2017-10-18 12:34 ` Ulf Hansson
2017-10-18 21:54 ` Rafael J. Wysocki
2017-10-18 11:57 ` Ulf Hansson
2017-10-18 13:00 ` Rafael J. Wysocki
2017-10-18 14:11 ` Ulf Hansson
2017-10-18 19:45 ` Grygorii Strashko
2017-10-18 21:48 ` Rafael J. Wysocki
2017-10-19 8:33 ` Ulf Hansson
2017-10-19 17:21 ` Grygorii Strashko
2017-10-19 18:04 ` Ulf Hansson
2017-10-19 18:11 ` Ulf Hansson
2017-10-19 21:31 ` Grygorii Strashko
2017-10-20 6:05 ` Ulf Hansson
2017-10-18 22:12 ` Rafael J. Wysocki
2017-10-19 12:21 ` Ulf Hansson
2017-10-19 18:01 ` Ulf Hansson
2017-10-20 1:19 ` Rafael J. Wysocki
2017-10-20 5:57 ` Ulf Hansson
2017-10-20 20:46 ` Bjorn Helgaas
2017-10-21 1:04 ` Rafael J. Wysocki
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='CAPDyKFrzW5ZJ5WE=utoT6PZUwEfv1xryw0M4zXsdD8SBJPEe5Q@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-i2c@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=rjw@rjwysocki.net \
--cc=stern@rowland.harvard.edu \
--cc=wsa@the-dreams.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).