aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2017-05-16 18:42:47 +0000
committerIngo Molnar <[email protected]>2017-05-23 08:01:38 +0000
commit69a78ff226fe0241ab6cb9dd961667be477e3cf7 (patch)
tree0492721a52622ff791f2166e4a41245e7a3550b6 /drivers/xen/manage.c
parentmm/vmscan: Adjust system_state checks (diff)
downloadkernel-69a78ff226fe0241ab6cb9dd961667be477e3cf7.tar.gz
kernel-69a78ff226fe0241ab6cb9dd961667be477e3cf7.zip
init: Introduce SYSTEM_SCHEDULING state
might_sleep() debugging and smp_processor_id() debugging should be active right after the scheduler starts working. The init task can invoke smp_processor_id() from preemptible context as it is pinned on the boot cpu until sched_smp_init() removes the pinning and lets it schedule on all non isolated cpus. Add a new state which allows to enable those checks earlier and add it to the xen do_poweroff() function. No functional change. Tested-by: Mark Rutland <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Acked-by: Mark Rutland <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index c1ec8ee80924..9e35032351a0 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -190,6 +190,7 @@ static void do_poweroff(void)
{
switch (system_state) {
case SYSTEM_BOOTING:
+ case SYSTEM_SCHEDULING:
orderly_poweroff(true);
break;
case SYSTEM_RUNNING: