Skip to content

Commit

Permalink
[S390] hwsampler: allow cpu hotplug
Browse files Browse the repository at this point in the history
The hardware sample cpu hotplug notifier always returns NOTIFY_BAD.
That will prevent cpu hotplug if the machine is enabled for hardware
sampling even if it is not used. Fix the cpu hotplug notifier and
allow cpu hotplug if hardware sampling is unused.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
Martin Schwidefsky authored and Heiko Carstens committed May 26, 2011
1 parent 7683f74 commit b07c901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/oprofile/hwsampler.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ static int hws_cpu_callback(struct notifier_block *nfb,
{
/* We do not have sampler space available for all possible CPUs.
All CPUs should be online when hw sampling is activated. */
return NOTIFY_BAD;
return (hws_state <= HWS_DEALLOCATED) ? NOTIFY_OK : NOTIFY_BAD;
}

static struct notifier_block hws_cpu_notifier = {
Expand Down

0 comments on commit b07c901

Please sign in to comment.