]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
powerpc/rtas: allow rescheduling while changing cpu states
authorNathan Lynch <nathanl@linux.ibm.com>
Fri, 2 Aug 2019 19:29:25 +0000 (14:29 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 20 Aug 2019 11:22:27 +0000 (21:22 +1000)
rtas_cpu_state_change_mask() potentially operates on scores of cpus,
so explicitly allow rescheduling in the loop body.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802192926.19277-3-nathanl@linux.ibm.com
arch/powerpc/kernel/rtas.c

index ef290d4036baa48fd08a53088e6168212aa5162b..c5fa251b8950c78425607c1319ac3f42829d683f 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/capability.h>
 #include <linux/delay.h>
 #include <linux/cpu.h>
+#include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/completion.h>
 #include <linux/cpumask.h>
@@ -898,6 +899,7 @@ static int rtas_cpu_state_change_mask(enum rtas_cpu_state state,
                                cpumask_clear_cpu(cpu, cpus);
                        }
                }
+               cond_resched();
        }
 
        return ret;