From: Martin Schwidefsky Date: Thu, 26 May 2011 07:48:26 +0000 (+0200) Subject: [S390] hwsampler: allow cpu hotplug X-Git-Tag: firefly_0821_release~7613^2~1035^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b07c9015efcde71ed929ce5ded0268630bb1c95e;p=firefly-linux-kernel-4.4.55.git [S390] hwsampler: allow cpu hotplug 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 Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 4634c9ef9722..4552ce40c81a 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c @@ -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 = {