aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile/nmi_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r--arch/x86/oprofile/nmi_int.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 33db99ab90c0..75e889156f23 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -1,10 +1,11 @@
1/** 1/**
2 * @file nmi_int.c 2 * @file nmi_int.c
3 * 3 *
4 * @remark Copyright 2002 OProfile authors 4 * @remark Copyright 2002-2008 OProfile authors
5 * @remark Read the file COPYING 5 * @remark Read the file COPYING
6 * 6 *
7 * @author John Levon <levon@movementarian.org> 7 * @author John Levon <levon@movementarian.org>
8 * @author Robert Richter <robert.richter@amd.com>
8 */ 9 */
9 10
10#include <linux/init.h> 11#include <linux/init.h>
@@ -411,6 +412,7 @@ int __init op_nmi_init(struct oprofile_operations *ops)
411 __u8 vendor = boot_cpu_data.x86_vendor; 412 __u8 vendor = boot_cpu_data.x86_vendor;
412 __u8 family = boot_cpu_data.x86; 413 __u8 family = boot_cpu_data.x86;
413 char *cpu_type; 414 char *cpu_type;
415 int ret = 0;
414 416
415 if (!cpu_has_apic) 417 if (!cpu_has_apic)
416 return -ENODEV; 418 return -ENODEV;
@@ -466,6 +468,11 @@ int __init op_nmi_init(struct oprofile_operations *ops)
466 return -ENODEV; 468 return -ENODEV;
467 } 469 }
468 470
471 if (model->init)
472 ret = model->init(ops);
473 if (ret)
474 return ret;
475
469 init_sysfs(); 476 init_sysfs();
470 using_nmi = 1; 477 using_nmi = 1;
471 ops->create_files = nmi_create_files; 478 ops->create_files = nmi_create_files;
@@ -482,4 +489,6 @@ void op_nmi_exit(void)
482{ 489{
483 if (using_nmi) 490 if (using_nmi)
484 exit_sysfs(); 491 exit_sysfs();
492 if (model->exit)
493 model->exit();
485} 494}