--- /dev/null
+From 98ecc6768e8fdba95da1fc1efa0ef2d769e7fe1c Mon Sep 17 00:00:00 2001
+From: Joel Stanley <joel@jms.id.au>
+Date: Wed, 14 Nov 2018 13:32:18 +1030
+Subject: powerpc/32: Include .branch_lt in data section
+
+From: Joel Stanley <joel@jms.id.au>
+
+commit 98ecc6768e8fdba95da1fc1efa0ef2d769e7fe1c upstream.
+
+When building a 32 bit powerpc kernel with Binutils 2.31.1 this warning
+is emitted:
+
+ powerpc-linux-gnu-ld: warning: orphan section `.branch_lt' from
+ `arch/powerpc/kernel/head_44x.o' being placed in section `.branch_lt'
+
+As of binutils commit 2d7ad24e8726 ("Support PLT16 relocs against local
+symbols")[1], 32 bit targets can produce .branch_lt sections in their
+output.
+
+Include these symbols in the .data section as the ppc64 kernel does.
+
+[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2d7ad24e8726ba4c45c9e67be08223a146a837ce
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Alan Modra <amodra@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/kernel/vmlinux.lds.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/powerpc/kernel/vmlinux.lds.S
++++ b/arch/powerpc/kernel/vmlinux.lds.S
+@@ -328,6 +328,7 @@ SECTIONS
+ *(.sdata2)
+ *(.got.plt) *(.got)
+ *(.plt)
++ *(.branch_lt)
+ }
+ #else
+ .data : AT(ADDR(.data) - LOAD_OFFSET) {
--- /dev/null
+From b51ba4fe2e134b631f9c8f45423707aab71449b5 Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@csgroup.eu>
+Date: Thu, 6 Aug 2020 06:01:42 +0000
+Subject: powerpc/32s: Fix assembler warning about r0
+
+From: Christophe Leroy <christophe.leroy@csgroup.eu>
+
+commit b51ba4fe2e134b631f9c8f45423707aab71449b5 upstream.
+
+The assembler says:
+ arch/powerpc/kernel/head_32.S:1095: Warning: invalid register expression
+
+It's objecting to the use of r0 as the RA argument. That's because
+when RA = 0 the literal value 0 is used, rather than the content of
+r0, making the use of r0 in the source potentially confusing.
+
+Fix it to use a literal 0, the generated code is identical.
+
+Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/2b69ac8e1cddff6f808fc7415907179eab4aae9e.1596693679.git.christophe.leroy@csgroup.eu
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/kernel/head_32.S | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/head_32.S
++++ b/arch/powerpc/kernel/head_32.S
+@@ -987,7 +987,7 @@ start_here:
+ */
+ lis r5, abatron_pteptrs@h
+ ori r5, r5, abatron_pteptrs@l
+- stw r5, 0xf0(r0) /* This much match your Abatron config */
++ stw r5, 0xf0(0) /* This much match your Abatron config */
+ lis r6, swapper_pg_dir@h
+ ori r6, r6, swapper_pg_dir@l
+ tophys(r5, r5)