X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Foprofile%2Fnmi_timer_int.c;h=b2e462abf337e44ffe7f2417b26b865542f193b9;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c3351b824187427499501195e53f4f80bddfaf83;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/i386/oprofile/nmi_timer_int.c b/arch/i386/oprofile/nmi_timer_int.c index c3351b824..b2e462abf 100644 --- a/arch/i386/oprofile/nmi_timer_int.c +++ b/arch/i386/oprofile/nmi_timer_int.c @@ -20,9 +20,7 @@ static int nmi_timer_callback(struct pt_regs * regs, int cpu) { - unsigned long eip = instruction_pointer(regs); - - oprofile_add_sample(eip, !user_mode(regs), 0, cpu); + oprofile_add_sample(regs, 0); return 1; } @@ -42,20 +40,16 @@ static void timer_stop(void) } -static struct oprofile_operations nmi_timer_ops = { - .start = timer_start, - .stop = timer_stop, - .cpu_type = "timer" -}; - -int __init nmi_timer_init(struct oprofile_operations ** ops) +int __init nmi_timer_init(struct oprofile_operations * ops) { extern int nmi_active; if (nmi_active <= 0) return -ENODEV; - *ops = &nmi_timer_ops; + ops->start = timer_start; + ops->stop = timer_stop; + ops->cpu_type = "timer"; printk(KERN_INFO "oprofile: using NMI timer interrupt.\n"); return 0; }