> diff -ur linux.orig/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
> --- linux.orig/arch/i386/kernel/traps.c Mon Oct 21 13:25:45 2002
> +++ linux/arch/i386/kernel/traps.c Thu Oct 24 08:11:14 2002
At this point I'd quite like to see :
mv nmi.c nmi_watchdog.c
and put all this stuff in always-compiled nmi.c. traps.c is getting
bloated.
> static void default_do_nmi(struct pt_regs * regs)
> {
> unsigned char reason = inb(0x61);
>
> if (!(reason & 0xc0)) {
> -#if CONFIG_X86_LOCAL_APIC
> /*
> - * Ok, so this is none of the documented NMI sources,
> - * so it must be the NMI watchdog.
> + * Check the handler list to see if anyone can handle this
> + * nmi.
> */
> - if (nmi_watchdog) {
> - nmi_watchdog_tick(regs);
> + if (call_nmi_handlers(regs))
Now you're using RCU, it's a real pity that we have the inb() first -
if it wasn't for that, there would be no reason at all to have the "fast
path" setting code too (the latter code is ugly, which is one reason I
want to ditch it).
How about adding default_do_nmi as the minimal-priority handler, then
add the watchdog with higher priority above that ? Then oprofile can add
itself on top of those both and return NOTIFY_OK to indicate it should
break out of the loop. As a bonus, you lose the inb() for the watchdog
too.
> +++ linux/include/asm-i386/irq.h Wed Oct 23 16:47:24 2002
I thought you agreed the stuff should be in asm/nmi.h ?
regards
john
-- "This is playing, not work, therefore it's not a waste of time." - Zath - 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/