linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Len Brown <len.brown@intel.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] PCI: Disable Precision Time Measurement during suspend
Date: Thu, 19 Nov 2020 11:38:46 -0800	[thread overview]
Message-ID: <2bf771085821fe8c4ea920b6fdb318c09cc3615c.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0gyzYEiFWC4qvQZNDUC4wwcXK60mR=zJ9=Bwb27K1F=Ng@mail.gmail.com>

On Thu, 2020-11-19 at 19:13 +0100, Rafael J. Wysocki wrote:
> On Thu, Nov 19, 2020 at 6:45 PM David E. Box
> <david.e.box@linux.intel.com> wrote:
> > On Thu, 2020-11-19 at 13:01 +0100, Rafael J. Wysocki wrote:
> > > On Thu, Nov 19, 2020 at 1:17 AM David E. Box
> > > <david.e.box@linux.intel.com> wrote:

...

> > > > 
> > > > +        */
> > > > +       if (pm_suspend_target_state == PM_SUSPEND_TO_IDLE &&
> > > 
> > > AFAICS the target sleep state doesn't matter here, so I'd skip
> > > the
> > > check above, but otherwise it LGTM.
> > 
> > The target sleep state doesn't matter so much but that it's
> > suspending
> > does. pci_save_state() is called during probe for the root ports
> > (and
> > many other pci devices - I'm curious as to why).
> 
> I tend to forget about this, sorry.
> 
> > So without this check the capability gets disabled on boot.
> > 
> 
> So instead of calling this from here, why don't we invoke the code
> below from pci_prepare_to_sleep() and pci_finish_runtime_suspend(),
> before enabling wakeup (and it needs to be re-done on failures, eg.
> by
> restoring the cap from the saved copy)?

Ok.


      reply	other threads:[~2020-11-19 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  0:18 [PATCH 1/2] PCI: Add save/restore of Precision Time Measurement capability David E. Box
2020-11-19  0:18 ` [PATCH 2/2] PCI: Disable Precision Time Measurement during suspend David E. Box
2020-11-19 12:01   ` Rafael J. Wysocki
2020-11-19 17:45     ` David E. Box
2020-11-19 18:13       ` Rafael J. Wysocki
2020-11-19 19:38         ` David E. Box [this message]

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=2bf771085821fe8c4ea920b6fdb318c09cc3615c.camel@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael@kernel.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 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).