Re: [PATCH] pm_ops: add irq enable/disable hooks

Johannes Berg
2007-04-10T13:42:32Z

[-- Attachment #1.1: Type: text/plain, Size: 1292 bytes --]

Hi,

> > > Hmm, and can't you simply create sysdev for decrementer and special
> > > platform handling? sysdevs should be suspended last...
> >
> > In theory, yes.
> >
> > In practise, however, it seems to be impossible to get a sysdev into the
> > queue that is suspended before any other sysdevs are suspended (i.e.
> > right after interrupts are disabled)
> >
> > And then there are the platform functions. In theory, they could be done
> > with a regular struct device, but in practice they need to be the very
> > last thing before interrupts are disabled, and that again is impossible
> > to achieve.
>
> Is it feasible to improve sysdev handling to allow this?

Actually, I think I spoke too soon when I wrote above.
device_power_down() calls sysdev's last so even being first in the
sysdev queue probably wouldn't help here. Then again, I'm not 100%
certain that we do need the decrementer right after disabling IRQs, it
seems to me on casual inspections that it isn't necessary but I'd have
to take another look.

Pushing aside the decrementer, the second issue with the platform
functions remain. I'm not opposed to working on something to allow me to
order the device tree suspend, but I have absolutely no idea how that
could be done.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]