summaryrefslogtreecommitdiff
path: root/drivers/oprofile/timer_int.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-11-15 11:05:18 +0100
committerIngo Molnar <mingo@elte.hu>2011-11-15 11:05:18 +0100
commitc23205c8488f11cb9ebe7a7b5851a1d8a0171011 (patch)
tree239dd82daddb1ce08b50ea9145d8f2a4685ebead /drivers/oprofile/timer_int.c
parent5d81e5cfb37a174e8ddc0413e2e70cdf05807ace (diff)
parentde346b6949063aa040ef607943b072835294f4b3 (diff)
Merge branch 'core' of git://amd64.org/linux/rric into perf/core
Diffstat (limited to 'drivers/oprofile/timer_int.c')
-rw-r--r--drivers/oprofile/timer_int.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c
index 3ef44624f5103..93404f72dfa81 100644
--- a/drivers/oprofile/timer_int.c
+++ b/drivers/oprofile/timer_int.c
@@ -97,23 +97,24 @@ static struct notifier_block __refdata oprofile_cpu_notifier = {
.notifier_call = oprofile_cpu_notify,
};
-int oprofile_timer_init(struct oprofile_operations *ops)
+static int oprofile_hrtimer_setup(void)
{
- int rc;
-
- rc = register_hotcpu_notifier(&oprofile_cpu_notifier);
- if (rc)
- return rc;
- ops->create_files = NULL;
- ops->setup = NULL;
- ops->shutdown = NULL;
- ops->start = oprofile_hrtimer_start;
- ops->stop = oprofile_hrtimer_stop;
- ops->cpu_type = "timer";
- return 0;
+ return register_hotcpu_notifier(&oprofile_cpu_notifier);
}
-void oprofile_timer_exit(void)
+static void oprofile_hrtimer_shutdown(void)
{
unregister_hotcpu_notifier(&oprofile_cpu_notifier);
}
+
+int oprofile_timer_init(struct oprofile_operations *ops)
+{
+ ops->create_files = NULL;
+ ops->setup = oprofile_hrtimer_setup;
+ ops->shutdown = oprofile_hrtimer_shutdown;
+ ops->start = oprofile_hrtimer_start;
+ ops->stop = oprofile_hrtimer_stop;
+ ops->cpu_type = "timer";
+ printk(KERN_INFO "oprofile: using timer interrupt.\n");
+ return 0;
+}