John Levon wrote: >On Thu, Nov 14, 2002 at 10:30:16PM -0600, Corey Minyard wrote: > > > >>Since a lot of things are hacking into this code (lkcd, kdb, oprofile, >>nmi watchdog, and now my IPMI watchdog pretimeout), it would be very >>nice to get their junk out of this code and allow them to bind in >>nicely, and allow binding from modules. >> >> > >I've just noticed you haven't fixed the watchdog vs. oprofile case. You >pass in the handled flag to the NMI watchdog handler, but you ignore the >value and always do the perfctr reset. You /must/ only do the reset if >handled == false, or you'll screw up oprofile when it's running. > I don't think that's a good idea for two reasons: * If the oprofile code is only using the counter that the NMI watchdog is not using, it will silently cause the NMI watchdog to stop working. I know that's not the case now, but it could be in the future. * The oprofile code will always reset the counter, so the NMI watchdog will never see the timeout, so it doesn't matter. It's currently kind of an unnatural relationship. IMHO, it would be better to have a separate handler for the perf counters that they both use. But that's beyond the scope of this right now. > >also, the diff would be much easier to read as a separate "mv nmi.c >nmi_watchdog.c" then diff against that > Yes, but harder to apply (a little :-). I'll attach that patch. As John says, you need to do a "mv nmi.c nmi_watchdog.c" in the arch/i386/kernel.c directory before you apply this patch. -Corey