mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>, Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Pavel Machek <pavel@suse.cz>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Matthew Wilcox <matthew@wil.cx>, "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>,
	Linux PCI <linux-pci@vger.kernel.org>
Subject: [RFC][PATCH 0/10] PCI PM: Make new suspend-resume callbacks carry out core operations
Date: Tue, 30 Dec 2008 23:33:44 +0100	[thread overview]
Message-ID: <200812302333.45560.rjw@sisk.pl> (raw)
In-Reply-To: <200812281607.28007.rjw@sisk.pl>

On Sunday 28 December 2008, Rafael J. Wysocki wrote:
> On Friday 19 December 2008, Rafael J. Wysocki wrote:
> > Hi Len,
> > 
> > The patch below adds the callbacks that save/restore the standard PCI config
> > registers, change the power state of the device etc. to the new suspend-resume
> > callbacks (which are not yet used by device drivers), so that the drivers don't
> > have to worry about these operations.
> > 
> > The saving and restoring of the standard PCI config registers is done with
> > interrupts off, the other things are done with interrupts enabled.
> > 
> > The patch should apply to the current linux-next tree.
> 
> Below is a new version of the patch.
> 
> Now, the standard config spaces of devices are restored with interrupts
> disabled, but only if the bridges the devices are behind are in D0.  Otherwise,
> the operation is attempted again with interrupts enabled (presumably the
> bridge would be put into D0 before that happens).
> 
> Also, pci_disable_device() is not called during resume and
> pci_reenable_device() is used to enable the devices that were enabled during
> suspend.  This allows us to automatically call pci_set_master() for devices
> that were bus masters before suspend.  Additionally, the pci_reenable_device()
> may be overriden by the driver, by disabling the device during suspend.
> 
> Finally, bridges are handled a bit differently from the regular devices (they
> are not put into low power states during suspend and pci_enable_wake() is
> not called for them.
> 
> The patch should apply on top of linux-next with the patch fixing
> pci_update_current_state() I sent yesterday
> (http://marc.info/?l=linux-kernel&m=123039199607159&w=4).

In the meantime I realized that the pcibios_enable_device() called from
pci_reenable_device() in the resume code path should be balanced by a "suspend"
call of the same kind.

Also, I decided to split the patch into a series of smaller patches with their
own changelogs to make it easier to follow the changes.  Perhaps this way
it will be more clear what I'm after.

The patches should apply to linux-next with the patch from
http://marc.info/?l=linux-kernel&m=123039199607159&w=4 on top.

Comments welcome.

Happy New Year to everyone,
Rafael


  reply	other threads:[~2008-12-30 22:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200812190049.34343.rjw@sisk.pl>
2008-12-28 15:07 ` [RFC][PATCH] PCI PM: Make new suspend-resume callbacks carry out core operations (rev. 2) Rafael J. Wysocki
2008-12-30 22:33   ` Rafael J. Wysocki [this message]
2008-12-30 22:35     ` [RFC][PATCH 1/10] PCI PM: Fix poweroff and restore callbacks Rafael J. Wysocki
2009-01-05 10:00       ` Pavel Machek
2008-12-30 22:37     ` [RFC][PATCH 2/10] PCI PM: Add suspend counterpart of pci_reenable_device Rafael J. Wysocki
2009-01-05 10:49       ` Pavel Machek
2009-01-05 13:17         ` Rafael J. Wysocki
2008-12-30 22:38     ` [RFC][PATCH 3/10] PCI PM: Power-manage devices without drivers during suspend-resume Rafael J. Wysocki
2009-01-05 10:51       ` Pavel Machek
2008-12-30 22:40     ` [RFC][PATCH 4/10] PCI PM: Move pci_has_legacy_pm_support Rafael J. Wysocki
2009-01-05 10:51       ` Pavel Machek
2008-12-30 22:41     ` [RFC][PATCH 5/10] PCI PM: Avoid touching devices behind bridges in unknown state Rafael J. Wysocki
2009-01-01 21:09       ` [RFC][PATCH 5/10] PCI PM: Avoid touching devices behind bridges in unknown state (rev. 2) Rafael J. Wysocki
2009-01-05 10:58         ` Pavel Machek
2009-01-05 13:30           ` Rafael J. Wysocki
2009-01-07 22:32             ` Pavel Machek
2009-01-07 23:02               ` Rafael J. Wysocki
2008-12-30 22:43     ` [RFC][PATCH 6/10] PCI PM: Rearrange code in pci-driver.c Rafael J. Wysocki
2009-01-05 11:25       ` Pavel Machek
2009-01-05 13:32         ` Rafael J. Wysocki
2008-12-30 22:44     ` [RFC][PATCH 7/10] PCI PM: Call pci_fixup_device from legacy routines Rafael J. Wysocki
2009-01-05 11:25       ` Pavel Machek
2008-12-30 22:45     ` [RFC][PATCH 8/10] PCI PM: Register power state of devices during initialization Rafael J. Wysocki
2009-01-05 11:19       ` Pavel Machek
2008-12-30 22:47     ` [RFC][PATCH 9/10] PCI PM: Run default PM callbacks for all devices using new framework Rafael J. Wysocki
2009-01-05 11:26       ` Pavel Machek
2008-12-30 22:49     ` [RFC][PATCH 10/10] PCI PM: Put PM callbacks in the order of execution Rafael J. Wysocki
2009-01-05 11:21       ` Pavel Machek

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=200812302333.45560.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=greg@kroah.com \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=matthew@wil.cx \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®