lkml.org 
[lkml]   [2003]   [Feb]   [3]   [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 Sun, Feb 02, 2003 at 01:42:35PM +0100, Pavel Machek wrote:

> This one should be okay. [oprofile not tested because I don't know how
> to use it...

It's not hard you know[1].

> -struct pm_dev * set_nmi_pm_callback(pm_callback callback)
> +static int nmi_resume(struct device *dev, u32 level)
> {
> - apic_pm_unregister(nmi_pmdev);
> - return apic_pm_register(PM_SYS_DEV, 0, callback);
> -}
> + if (level != RESUME_POWER_ON)
> + return 0;
> + setup_apic_nmi_watchdog();
> + return 0;

I don't pretend to understand the PM layer at all, but it looks like
that both nmi.c's and oprofile's resume functions will get called. This
won't work: if oprofile has control of the perfctr's/nmi stuff, you
can't let the NMI watchdog's resume() be called, as it may conflict with
what oprofile is trying to resume.

> + return device_register(&device_nmi);

There's some evil spaces in your patch.

regards
john

[1] opcontrol --setup --vmlinux=/boot/vmlinux --ctr0-count=20000
--ctr0-event=CPU_CLK_UNHALTED && opcontrol --start
-
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.121 / U:3.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site