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

Benjamin Herrenschmidt
2007-04-13T21:15:10Z

On Fri, 2007-04-13 at 22:58 +0200, Pavel Machek wrote:
> Hi!
>
> > > For powermac, we need to do some things between suspending devices and
> > > device_power_off, for example setting the decrementer. This patch
> > > introduces pm_ops.quiesce and pm_ops.activate which will be called instead
> > > of disabling/enabling irqs so platforms get control over this step.
> > >
> > > If not assigned, these two calls will be assigned with defaults during
> > > set_pm_ops.
> > >
> > > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> >
> > I have no objections. Pavel, what do you think?
>
> That it is same old hack it used to be. There's nothing magic about
> decrementer, and I do not think it is _neccessary_ to touch it just
> before cli. Just disable it from sysdev handler or something.

You don't know what you're talking about... so please stop being an ass
and be constructive for once.

We need to deal with the DEC -there-, and with other arch issues while
at it. A sysdev will not do. A non-sydev device will not do due to
ordering issues among other things, at least not without some
significant rework of the driver core PM code.

Thus this is the solution to make it work. Now, if you have decided that
you will refuse making it work on powermacs, then I'll have no choice
but try to push that patch through anyway since you aren't proposing any
alternative solution that would work for us.

(BTW. I still wonder how ACPI can get away without such a hook either
since they motherboard suspend/resume code needs to run with irqs on and
needs to run after all devices are suspended... if they rely on magic
ordering of devices, that would explain why the stuff isn't reliable.
Ordering of devices at the toplevel is -not- reliable in the current
model).

Ben.