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]
Date:	Sat, 18 Apr 2009 19:09:07 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Len Brown <lenb@...nel.org>,
	Linux Kernel List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Subject: Re: 900af0d breaks some embedded suspend/resume

On Sat, Apr 18, 2009 at 05:09:46PM +0200, Rafael J. Wysocki wrote:
> On Saturday 18 April 2009, Russell King wrote:
> > No, sysdevs are shut down after IRQs are turned off and the I2C driver
> > has been shut down.  The I2C driver needs IRQs to work in slave mode,
> > and we need slave mode to work.
> 
> Hm, but up to and including 2.6.29 we called the late suspend callbacks with
> interrupts off.

That's not related to the problem - since all that the I2C drivers
late suspend callback does is shut the I2C driver down.

It's what happens between the normal suspend callback (which occurs
with IRQs on) and the late suspend callback which I'm interested in,
which is when the platform's 'prepare' method is called.

> Hmm, what about redefining platform_suspend_ops in the following way:
> 
> struct platform_suspend_ops {
> 	int (*valid)(suspend_state_t state);
> 	int (*begin)(suspend_state_t state);
> 	int (*devices_suspended)(void);
> 	int (*prepare)(void);
> 	int (*enter)(suspend_state_t state);
> 	void (*wake)(void);
> 	int (*resume_devices)(void);
> 	void (*end)(void);
> 	void (*recover)(void);
> };
> 
> where:
> 
> * begin() will be called before suspending devices (no change)
> * devices_suspended() will be called after suspending devices (before
>   suspend_device_irqs())
> * prepare() will be callled after the late suspend callbacks
> * enter() will be called to enter the sleep state (no change)
> * wake() will be called before the early resume callbacks
> * resume_devices() will be called before resuming devices (after
>   resume_device_irqs()
> * end() will be called after resuming devices (no change)
> 
> I don't think we'll need more platform hooks than that.

I'd be happy with that.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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