summaryrefslogtreecommitdiff
path: root/arch/x86/oprofile/init.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-11-15 14:05:18 +0400
committerIngo Molnar <mingo@elte.hu>2011-11-15 14:05:18 +0400
commitc23205c8488f11cb9ebe7a7b5851a1d8a0171011 (patch)
tree239dd82daddb1ce08b50ea9145d8f2a4685ebead /arch/x86/oprofile/init.c
parent5d81e5cfb37a174e8ddc0413e2e70cdf05807ace (diff)
parentde346b6949063aa040ef607943b072835294f4b3 (diff)
downloadlinux-c23205c8488f11cb9ebe7a7b5851a1d8a0171011.tar.xz
Merge branch 'core' of git://amd64.org/linux/rric into perf/core
Diffstat (limited to 'arch/x86/oprofile/init.c')
-rw-r--r--arch/x86/oprofile/init.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/x86/oprofile/init.c b/arch/x86/oprofile/init.c
index cdfe4c54deca..9e138d00ad36 100644
--- a/arch/x86/oprofile/init.c
+++ b/arch/x86/oprofile/init.c
@@ -16,34 +16,23 @@
* with the NMI mode driver.
*/
+#ifdef CONFIG_X86_LOCAL_APIC
extern int op_nmi_init(struct oprofile_operations *ops);
-extern int op_nmi_timer_init(struct oprofile_operations *ops);
extern void op_nmi_exit(void);
-extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
+#else
+static int op_nmi_init(struct oprofile_operations *ops) { return -ENODEV; }
+static void op_nmi_exit(void) { }
+#endif
+extern void x86_backtrace(struct pt_regs * const regs, unsigned int depth);
int __init oprofile_arch_init(struct oprofile_operations *ops)
{
- int ret;
-
- ret = -ENODEV;
-
-#ifdef CONFIG_X86_LOCAL_APIC
- ret = op_nmi_init(ops);
-#endif
-#ifdef CONFIG_X86_IO_APIC
- if (ret < 0)
- ret = op_nmi_timer_init(ops);
-#endif
ops->backtrace = x86_backtrace;
-
- return ret;
+ return op_nmi_init(ops);
}
-
void oprofile_arch_exit(void)
{
-#ifdef CONFIG_X86_LOCAL_APIC
op_nmi_exit();
-#endif
}