]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.19/powerpc-fsl-fix-the-flush-of-branch-predictor.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.19 / powerpc-fsl-fix-the-flush-of-branch-predictor.patch
CommitLineData
3140e7c0
GKH
1From foo@baz Fri Mar 29 16:04:51 CET 2019
2From: Michael Ellerman <mpe@ellerman.id.au>
3Date: Fri, 29 Mar 2019 22:26:19 +1100
4Subject: powerpc/fsl: Fix the flush of branch predictor.
5To: stable@vger.kernel.org, gregkh@linuxfoundation.org
6Cc: linuxppc-dev@ozlabs.org, diana.craciun@nxp.com, msuchanek@suse.de, christophe.leroy@c-s.fr
7Message-ID: <20190329112620.14489-32-mpe@ellerman.id.au>
8
9From: Christophe Leroy <christophe.leroy@c-s.fr>
10
11commit 27da80719ef132cf8c80eb406d5aeb37dddf78cc upstream.
12
13The commit identified below adds MC_BTB_FLUSH macro only when
14CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error
15on some configs (seen several times with kisskb randconfig_defconfig)
16
17arch/powerpc/kernel/exceptions-64e.S:576: Error: Unrecognized opcode: `mc_btb_flush'
18make[3]: *** [scripts/Makefile.build:367: arch/powerpc/kernel/exceptions-64e.o] Error 1
19make[2]: *** [scripts/Makefile.build:492: arch/powerpc/kernel] Error 2
20make[1]: *** [Makefile:1043: arch/powerpc] Error 2
21make: *** [Makefile:152: sub-make] Error 2
22
23This patch adds a blank definition of MC_BTB_FLUSH for other cases.
24
25Fixes: 10c5e83afd4a ("powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)")
26Cc: Diana Craciun <diana.craciun@nxp.com>
27Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
28Reviewed-by: Daniel Axtens <dja@axtens.net>
29Reviewed-by: Diana Craciun <diana.craciun@nxp.com>
30Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32---
33 arch/powerpc/kernel/exceptions-64e.S | 1 +
34 1 file changed, 1 insertion(+)
35
36--- a/arch/powerpc/kernel/exceptions-64e.S
37+++ b/arch/powerpc/kernel/exceptions-64e.S
38@@ -349,6 +349,7 @@ ret_from_mc_except:
39 #define GEN_BTB_FLUSH
40 #define CRIT_BTB_FLUSH
41 #define DBG_BTB_FLUSH
42+#define MC_BTB_FLUSH
43 #define GDBELL_BTB_FLUSH
44 #endif
45