lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812302333.45560.rjw@sisk.pl>
Date:	Tue, 30 Dec 2008 23:33:44 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Len Brown <lenb@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>
Cc:	Pavel Machek <pavel@...e.cz>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Matthew Wilcox <matthew@....cx>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>, Greg KH <greg@...ah.com>,
	Linux PCI <linux-pci@...r.kernel.org>
Subject: [RFC][PATCH 0/10] PCI PM: Make new suspend-resume callbacks carry out core operations

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ