Re: [PATCH v2] pm_ops: add system quiesce/activate hooks

Johannes Berg
2007-04-12T10:47:27Z

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

On Thu, 2007-04-12 at 12:16 +0200, Pavel Machek wrote:

> Adding platform hook to disable interrupts just because we need one
> platform device last is not nice, either. (And does decrementer even
> need to come last?)

But the hack is classifying the decrementer as a platform device in the
first place. And then we'd still need to have one platform device and
one sysdev since we want to wake up the decrementer before enabling IRQs
but set it to a high value before disabling IRQs. Or we'd need some sort
of special foo device that has hooks both before and after and comes
last/first, just for one user?

Besides, we can always rewrite it later when somebody introduces a foo
device that fits above model. Since this patch essentially changes
nothing, I'd been hoping to get it into .22 so we can finally start
having a sane userspace interface for suspend on powermac. I can dream,
right?

Besides, disabling IRQs really seems like a platform issue and as such
pm_ops should be able to control it. Why are you so much opposed to that
idea? Would a patch that says

Introduce pm_ops.quiesce and pm_ops.activate to make platforms
control IRQ disabling and enabling (respectively).

and doesn't mention powermac be more acceptable?

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 --]