]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.9/powerpc-fsl-fix-the-flush-of-branch-predictor.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.9 / powerpc-fsl-fix-the-flush-of-branch-predictor.patch
1 From 42fc63db4483b3fdab780d0f617668bba671a4aa Mon Sep 17 00:00:00 2001
2 From: Christophe Leroy <christophe.leroy@c-s.fr>
3 Date: Thu, 11 Apr 2019 21:46:29 +1000
4 Subject: powerpc/fsl: Fix the flush of branch predictor.
5
6 commit 27da80719ef132cf8c80eb406d5aeb37dddf78cc upstream.
7
8 The commit identified below adds MC_BTB_FLUSH macro only when
9 CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
10 on some configs (seen several times with kisskb randconfig_defconfig)
11
12 arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
13 make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
14 make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
15 make[1]: *** [Makefile:1043: arch/powerpc] Error 2
16 make: *** [Makefile:152: sub-make] Error 2
17
18 This patch adds a blank definition of MC_BTB_FLUSH for other cases.
19
20 Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
21 Cc: Diana Craciun <diana.craciun@nxp.com>
22 Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
23 Reviewed-by: Daniel Axtens <dja@axtens.net>
24 Reviewed-by: Diana Craciun <diana.craciun@nxp.com>
25 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
26 Signed-off-by: Sasha Levin <sashal@kernel.org>
27 ---
28 arch/powerpc/kernel/exceptions-64e.S | 1 +
29 1 file changed, 1 insertion(+)
30
31 diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
32 index 79c6fee6368d..423b5257d3a1 100644
33 --- a/arch/powerpc/kernel/exceptions-64e.S
34 +++ b/arch/powerpc/kernel/exceptions-64e.S
35 @@ -348,6 +348,7 @@ ret_from_mc_except:
36 #define GEN_BTB_FLUSH
37 #define CRIT_BTB_FLUSH
38 #define DBG_BTB_FLUSH
39 +#define MC_BTB_FLUSH
40 #define GDBELL_BTB_FLUSH
41 #endif
42
43 --
44 2.19.1
45