]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.4.177/xtensa-smp-mark-each-possible-cpu-as-present.patch
Linux 3.18.137
[thirdparty/kernel/stable-queue.git] / releases / 4.4.177 / xtensa-smp-mark-each-possible-cpu-as-present.patch
1 From 4ddd1118c527ed190f71dc19440545dd8e9438dc Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Sat, 19 Jan 2019 00:26:48 -0800
4 Subject: xtensa: SMP: mark each possible CPU as present
5
6 [ Upstream commit 8b1c42cdd7181200dc1fff39dcb6ac1a3fac2c25 ]
7
8 Otherwise it is impossible to enable CPUs after booting with 'maxcpus'
9 parameter.
10
11 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
12 Signed-off-by: Sasha Levin <sashal@kernel.org>
13 ---
14 arch/xtensa/kernel/smp.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c
18 index 545144d1431d..0e34c1ed4aa8 100644
19 --- a/arch/xtensa/kernel/smp.c
20 +++ b/arch/xtensa/kernel/smp.c
21 @@ -80,7 +80,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
22 {
23 unsigned i;
24
25 - for (i = 0; i < max_cpus; ++i)
26 + for_each_possible_cpu(i)
27 set_cpu_present(i, true);
28 }
29
30 --
31 2.19.1
32