lkml.org 
[lkml]   [2003]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Switch APIC to driver model (and make S3 sleep with APIC on)
On Tue, 28 Jan 2003 10:26:09 +0100, Pavel Machek wrote:
>> - You're hardcoding that the local-APIC NMI watchdog is the
>> only possible sub-client of the local APIC. Not true.
>> - perfctr_pmdev exists precisely to handle both these cases
>> in a clean way.
>
>While being as ugly as night, which is even noted in sources:
>
>- /* 'perfctr_pmdev' is here because the current (2.4.1) PM
>- callback system doesn't handle hierarchical dependencies */
>
>Nothing prevents more clients from registering as subtrees to APIC. I
>did not do that for NMI watchdog because it is hardcoded in Makefile,
>anyway.

Not "more" clients, OTHER clients. They're exclusive.
The NMI watchdog simply happens to be the default client, but it
needs to unregister itself before any other client can take over
the performance counters and the local APIC's LVTPC entry.
(And that's what happens today.)

If the device model handles hierarchical dependencies correctly,
there should be no need to hardcode calls from the local APIC's
PM routines to whoever happens to be its current sub-client.

(And if it doesn't do this correctly, please fix the device
model first before migrating apic.c/nmi.c to it.)

>I'll fix APM to call device model methods.

Good.

>Because PM_SUSPEND/PM_RESUME is ugly and can not be made to work
>(devices are hierarchical, and PM_SUSPEND/PM_RESUME system does not
>honour that).

Agreed, but existing PM users do work. Most are leaves in the
dependency tree (e.g. sound cards). The only one I know of that
isn't is apic.c, and it has a local workaround as you noted.

Given that we're supposed to be in a feature freeze getting 2.5
into some kind of 2.6-worthy shape soonish, I think PM should
be hooked into the device model as a legacy API.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.061 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site