diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2019-08-02 14:29:25 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-08-20 21:22:27 +1000 |
commit | 10e4850d7c7f2af2e5c40520b8caf73bf9d7e2d1 (patch) | |
tree | fb6f0f7e5a45fe2dbdb996940c5f2bbedac0dfa1 /arch/powerpc/kernel/rtas.c | |
parent | a6717c01ddc259f6f73364779df058e2c67309f8 (diff) | |
download | lwn-10e4850d7c7f2af2e5c40520b8caf73bf9d7e2d1.tar.gz lwn-10e4850d7c7f2af2e5c40520b8caf73bf9d7e2d1.zip |
powerpc/rtas: allow rescheduling while changing cpu states
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
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index ef290d4036ba..c5fa251b8950 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c @@ -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; |