Commit 216f3d9b authored by Robert Richter's avatar Robert Richter

oprofile/x86: remove CONFIG_SMP macros

CPU notifier register functions also exist if CONFIG_SMP is
disabled. This change is part of hotplug code rework and also
necessary for later patches.

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
parent 2623a1d5
...@@ -471,7 +471,6 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root) ...@@ -471,7 +471,6 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root)
return 0; return 0;
} }
#ifdef CONFIG_SMP
static int oprofile_cpu_notifier(struct notifier_block *b, unsigned long action, static int oprofile_cpu_notifier(struct notifier_block *b, unsigned long action,
void *data) void *data)
{ {
...@@ -491,7 +490,6 @@ static int oprofile_cpu_notifier(struct notifier_block *b, unsigned long action, ...@@ -491,7 +490,6 @@ static int oprofile_cpu_notifier(struct notifier_block *b, unsigned long action,
static struct notifier_block oprofile_cpu_nb = { static struct notifier_block oprofile_cpu_nb = {
.notifier_call = oprofile_cpu_notifier .notifier_call = oprofile_cpu_notifier
}; };
#endif
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -701,9 +699,8 @@ int __init op_nmi_init(struct oprofile_operations *ops) ...@@ -701,9 +699,8 @@ int __init op_nmi_init(struct oprofile_operations *ops)
return -ENODEV; return -ENODEV;
} }
#ifdef CONFIG_SMP
register_cpu_notifier(&oprofile_cpu_nb); register_cpu_notifier(&oprofile_cpu_nb);
#endif
/* default values, can be overwritten by model */ /* default values, can be overwritten by model */
ops->create_files = nmi_create_files; ops->create_files = nmi_create_files;
ops->setup = nmi_setup; ops->setup = nmi_setup;
...@@ -732,9 +729,7 @@ void op_nmi_exit(void) ...@@ -732,9 +729,7 @@ void op_nmi_exit(void)
{ {
if (using_nmi) { if (using_nmi) {
exit_sysfs(); exit_sysfs();
#ifdef CONFIG_SMP
unregister_cpu_notifier(&oprofile_cpu_nb); unregister_cpu_notifier(&oprofile_cpu_nb);
#endif
} }
if (model->exit) if (model->exit)
model->exit(); model->exit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment