Skip to content

Commit

Permalink
kernel 4.9 no longer uses CPU_STARTING and CPU_DYING
Browse files Browse the repository at this point in the history
  • Loading branch information
soramichi committed Feb 14, 2017
1 parent 93757ec commit d175a0b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions simple-pebs/simple-pebs.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,24 +604,6 @@ static void simple_pebs_cpu_reset(void *arg)
}
}

static int simple_pebs_cpu(struct notifier_block *nb, unsigned long action,
void *v)
{
switch (action) {
case CPU_STARTING:
simple_pebs_cpu_init(NULL);
break;
case CPU_DYING:
simple_pebs_cpu_reset(NULL);
break;
}
return NOTIFY_OK;
}

static struct notifier_block cpu_notifier = {
.notifier_call = simple_pebs_cpu,
};

static int simple_pebs_init(void)
{
int err;
Expand All @@ -635,7 +617,6 @@ static int simple_pebs_init(void)

get_online_cpus();
on_each_cpu(simple_pebs_cpu_init, NULL, 1);
register_cpu_notifier(&cpu_notifier);
put_online_cpus();
if (pebs_error) {
pr_err("PEBS initialization failed\n");
Expand All @@ -653,7 +634,6 @@ static int simple_pebs_init(void)
return 0;

out_notifier:
unregister_cpu_notifier(&cpu_notifier);
on_each_cpu(simple_pebs_cpu_reset, NULL, 1);
simple_pebs_free_vector();
return err;
Expand All @@ -665,7 +645,6 @@ static void simple_pebs_exit(void)
misc_deregister(&simple_pebs_miscdev);
get_online_cpus();
on_each_cpu(simple_pebs_cpu_reset, NULL, 1);
unregister_cpu_notifier(&cpu_notifier);
put_online_cpus();
simple_pebs_free_vector();
/* Could PMI still be pending? For now just wait a bit. (XXX) */
Expand Down

0 comments on commit d175a0b

Please sign in to comment.