aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/cpupool.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2012-03-22 12:20:13 +0000
committerKeir Fraser <keir@xen.org>2012-03-22 12:20:13 +0000
commit269f543ea750ed567d18f2e819e5d5ce58eda5c5 (patch)
treef1bfaca66eeec018fa55f65817fa387ca62c082f /xen/common/cpupool.c
parent8aed7f047dacebfe8c28109b7adb55784e5bc8ef (diff)
downloadxen-269f543ea750ed567d18f2e819e5d5ce58eda5c5.tar.gz
xen-269f543ea750ed567d18f2e819e5d5ce58eda5c5.tar.bz2
xen-269f543ea750ed567d18f2e819e5d5ce58eda5c5.zip
Introduce system_state variable.
Use it to replace x86-specific early_boot boolean variable. Also use it to detect suspend/resume case during cpu offline/online to avoid unnecessarily breaking vcpu and cpupool affinities. Signed-off-by: Keir Fraser <keir@xen.org> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Diffstat (limited to 'xen/common/cpupool.c')
-rw-r--r--xen/common/cpupool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 6cef4a003e..c9cc123a40 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -629,6 +629,10 @@ static int cpu_callback(
unsigned int cpu = (unsigned long)hcpu;
int rc = 0;
+ if ( (system_state == SYS_STATE_suspend) ||
+ (system_state == SYS_STATE_resume) )
+ goto out;
+
switch ( action )
{
case CPU_DOWN_FAILED:
@@ -642,6 +646,7 @@ static int cpu_callback(
break;
}
+out:
return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
}