10 #include <linux/kernel.h>
17 #include <linux/hrtimer.h>
18 #include <asm/irq_regs.h>
19 #include <asm/ptrace.h>
24 static int ctr_running;
29 hrtimer_forward_now(hrtimer, ns_to_ktime(
TICK_NSEC));
33 static void __oprofile_hrtimer_start(
void *
unused)
41 hrtimer->
function = oprofile_hrtimer_notify;
47 static int oprofile_hrtimer_start(
void)
56 static void __oprofile_hrtimer_stop(
int cpu)
58 struct hrtimer *hrtimer = &
per_cpu(oprofile_hrtimer, cpu);
66 static void oprofile_hrtimer_stop(
void)
72 __oprofile_hrtimer_stop(cpu);
78 unsigned long action,
void *hcpu)
80 long cpu = (
long) hcpu;
90 __oprofile_hrtimer_stop(cpu);
97 .notifier_call = oprofile_cpu_notify,
100 static int oprofile_hrtimer_setup(
void)
105 static void oprofile_hrtimer_shutdown(
void)
113 ops->
setup = oprofile_hrtimer_setup;
114 ops->
shutdown = oprofile_hrtimer_shutdown;
115 ops->
start = oprofile_hrtimer_start;
116 ops->
stop = oprofile_hrtimer_stop;