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