lantiq: Fix build after kernel 5.15.150
[openwrt/staging/nbd.git] / target / linux / lantiq / patches-5.15 / 0155-lantiq-VPE-nosmp.patch
1 From 07ce9e9bc4dcd5ac4728e587901112eef95bbe7b Mon Sep 17 00:00:00 2001
2 From: Stefan Koch <stefan.koch10@gmail.com>
3 Date: Mon, 13 Mar 2017 23:42:00 +0100
4 Subject: [PATCH] lantiq: vpe nosmp
5
6 Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
7 ---
8 arch/mips/kernel/vpe-mt.c | 5 ++++-
9 1 file changed, 4 insertions(+), 1 deletion(-)
10
11 --- a/arch/mips/kernel/vpe-mt.c
12 +++ b/arch/mips/kernel/vpe-mt.c
13 @@ -130,7 +130,10 @@ int vpe_run(struct vpe *v)
14 * kernels need to turn it on, even if that wasn't the pre-dvpe() state.
15 */
16 #ifdef CONFIG_SMP
17 - evpe(vpeflags);
18 + if (!setup_max_cpus) /* nosmp is set */
19 + evpe(EVPE_ENABLE);
20 + else
21 + evpe(vpeflags);
22 #else
23 evpe(EVPE_ENABLE);
24 #endif