Re: [PATCH] fix tulip suspend/resume

Nigel Cunningham
2005-06-07T05:51:52Z

Hi.

On Tue, 2005-06-07 at 15:03, Adam Belay wrote:
> I'd tend to agree with Pat then. The original pm_ops seem to be
> designed around ACPI and after looking at the spec I don't think they're
> correct. (e.g. it looks like _PTS and _GTS should be run after
> device_suspend() instead of before, so *prepare may not be needed). In
> short, this tends to be tricky. It's probably best to have platforms
> handle it on their own with kernel/power as a library.

Hmm....

- We need a lot of arch dependent hooks so the right things are done at
the right time
- We need a lot of arch independent code run between the arch dependent
code so that the right things are done at the right time.

Therefore it doesn't matter whether the centre of the universe is arch
dependent or independent - either way we have to have hooks to get the
other stuff done.

Swsusp takes a minimalist design, so it doesn't look like much to worry
about if some of that code gets duplicated in arch specific places (taht
said, I'm not sure what whoever-it-was was thinking of duplicating).
Suspend2 takes a feature complete/user friendly/etc design and therefore
has a lot more arch independent code. We definitely want to minimise
duplication of code there.

So I'd suggest leaving the arch independent code in the drivers seat,
but simultaneously replacing/redesigning pm_ops & swsusp so that all the
ops that are or might be needed are there and called at the appropriate
time.

Regards,

Nigel