| * @remark Copyright 2003 OProfile authors |
| * @remark Read the file COPYING |
| * @author Zwane Mwaikambo <zwane@linuxpower.ca> |
| #include <linux/oprofile.h> |
| #include <linux/rcupdate.h> |
| static int nmi_timer_callback(struct pt_regs * regs, int cpu) |
| oprofile_add_sample(regs, 0); |
| static int timer_start(void) |
| disable_timer_nmi_watchdog(); |
| set_nmi_callback(nmi_timer_callback); |
| static void timer_stop(void) |
| enable_timer_nmi_watchdog(); |
| synchronize_sched(); /* Allow already-started NMIs to complete. */ |
| int __init op_nmi_timer_init(struct oprofile_operations * ops) |
| ops->start = timer_start; |
| printk(KERN_INFO "oprofile: using NMI timer interrupt.\n"); |