diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 727bdef76161..e9c24a128655 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7513,21 +7513,28 @@ int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) | |||
7513 | static int update_sched_domains(struct notifier_block *nfb, | 7513 | static int update_sched_domains(struct notifier_block *nfb, |
7514 | unsigned long action, void *hcpu) | 7514 | unsigned long action, void *hcpu) |
7515 | { | 7515 | { |
7516 | int cpu = (int)(long)hcpu; | ||
7517 | |||
7516 | switch (action) { | 7518 | switch (action) { |
7517 | case CPU_UP_PREPARE: | ||
7518 | case CPU_UP_PREPARE_FROZEN: | ||
7519 | case CPU_DOWN_PREPARE: | 7519 | case CPU_DOWN_PREPARE: |
7520 | case CPU_DOWN_PREPARE_FROZEN: | 7520 | case CPU_DOWN_PREPARE_FROZEN: |
7521 | disable_runtime(cpu_rq(cpu)); | ||
7522 | /* fall-through */ | ||
7523 | case CPU_UP_PREPARE: | ||
7524 | case CPU_UP_PREPARE_FROZEN: | ||
7521 | detach_destroy_domains(&cpu_online_map); | 7525 | detach_destroy_domains(&cpu_online_map); |
7522 | free_sched_domains(); | 7526 | free_sched_domains(); |
7523 | return NOTIFY_OK; | 7527 | return NOTIFY_OK; |
7524 | 7528 | ||
7525 | case CPU_UP_CANCELED: | 7529 | |
7526 | case CPU_UP_CANCELED_FROZEN: | ||
7527 | case CPU_DOWN_FAILED: | 7530 | case CPU_DOWN_FAILED: |
7528 | case CPU_DOWN_FAILED_FROZEN: | 7531 | case CPU_DOWN_FAILED_FROZEN: |
7529 | case CPU_ONLINE: | 7532 | case CPU_ONLINE: |
7530 | case CPU_ONLINE_FROZEN: | 7533 | case CPU_ONLINE_FROZEN: |
7534 | enable_runtime(cpu_rq(cpu)); | ||
7535 | /* fall-through */ | ||
7536 | case CPU_UP_CANCELED: | ||
7537 | case CPU_UP_CANCELED_FROZEN: | ||
7531 | case CPU_DEAD: | 7538 | case CPU_DEAD: |
7532 | case CPU_DEAD_FROZEN: | 7539 | case CPU_DEAD_FROZEN: |
7533 | /* | 7540 | /* |