Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191044
b: refs/heads/master
c: 3de668e
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed May 6, 2010
1 parent 6ff5562 commit 47e2be6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d30d64c6da3ec7a0708bfffa7e05752d5b9a1093
refs/heads/master: 3de668ee8d5b1e08da3200f926ff5a28aeb99bc2
16 changes: 3 additions & 13 deletions trunk/arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ static int nmi_setup(void)
goto fail;

get_online_cpus();
register_cpu_notifier(&oprofile_cpu_nb);
on_each_cpu(nmi_cpu_setup, NULL, 1);
nmi_enabled = 1;
put_online_cpus();
Expand All @@ -519,6 +520,7 @@ static void nmi_shutdown(void)
struct op_msrs *msrs;

get_online_cpus();
unregister_cpu_notifier(&oprofile_cpu_nb);
on_each_cpu(nmi_cpu_shutdown, NULL, 1);
nmi_enabled = 0;
ctr_running = 0;
Expand Down Expand Up @@ -739,12 +741,6 @@ int __init op_nmi_init(struct oprofile_operations *ops)
return -ENODEV;
}

get_online_cpus();
register_cpu_notifier(&oprofile_cpu_nb);
nmi_enabled = 0;
ctr_running = 0;
put_online_cpus();

/* default values, can be overwritten by model */
ops->create_files = nmi_create_files;
ops->setup = nmi_setup;
Expand All @@ -771,14 +767,8 @@ int __init op_nmi_init(struct oprofile_operations *ops)

void op_nmi_exit(void)
{
if (using_nmi) {
if (using_nmi)
exit_sysfs();
get_online_cpus();
unregister_cpu_notifier(&oprofile_cpu_nb);
nmi_enabled = 0;
ctr_running = 0;
put_online_cpus();
}
if (model->exit)
model->exit();
}

0 comments on commit 47e2be6

Please sign in to comment.