]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.4/powerpc-fix-build-warning-on-32-bit-ppc.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.4 / powerpc-fix-build-warning-on-32-bit-ppc.patch
1 From 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f Mon Sep 17 00:00:00 2001
2 From: Larry Finger <Larry.Finger@lwfinger.net>
3 Date: Thu, 22 Dec 2016 21:06:53 -0600
4 Subject: powerpc: Fix build warning on 32-bit PPC
5
6 From: Larry Finger <Larry.Finger@lwfinger.net>
7
8 commit 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f upstream.
9
10 I am getting the following warning when I build kernel 4.9-git on my
11 PowerBook G4 with a 32-bit PPC processor:
12
13 AS arch/powerpc/kernel/misc_32.o
14 arch/powerpc/kernel/misc_32.S:299:7: warning: "CONFIG_FSL_BOOKE" is not defined [-Wundef]
15
16 This problem is evident after commit 989cea5c14be ("kbuild: prevent
17 lib-ksyms.o rebuilds"); however, this change in kbuild only exposes an
18 error that has been in the code since 2005 when this source file was
19 created. That was with commit 9994a33865f4 ("powerpc: Introduce
20 entry_{32,64}.S, misc_{32,64}.S, systbl.S").
21
22 The offending line does not make a lot of sense. This error does not
23 seem to cause any errors in the executable, thus I am not recommending
24 that it be applied to any stable versions.
25
26 Thanks to Nicholas Piggin for suggesting this solution.
27
28 Fixes: 9994a33865f4 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S")
29 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
30 Cc: Nicholas Piggin <npiggin@gmail.com>
31 Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
32 Cc: Paul Mackerras <paulus@samba.org>
33 Cc: Michael Ellerman <mpe@ellerman.id.au>
34 Cc: linuxppc-dev@lists.ozlabs.org
35 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
36 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37
38 ---
39 arch/powerpc/kernel/misc_32.S | 2 +-
40 1 file changed, 1 insertion(+), 1 deletion(-)
41
42 --- a/arch/powerpc/kernel/misc_32.S
43 +++ b/arch/powerpc/kernel/misc_32.S
44 @@ -296,7 +296,7 @@ _GLOBAL(flush_instruction_cache)
45 lis r3, KERNELBASE@h
46 iccci 0,r3
47 #endif
48 -#elif CONFIG_FSL_BOOKE
49 +#elif defined(CONFIG_FSL_BOOKE)
50 BEGIN_FTR_SECTION
51 mfspr r3,SPRN_L1CSR0
52 ori r3,r3,L1CSR0_CFI|L1CSR0_CLFC