]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 16:05:27 +0000 (18:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 16:05:27 +0000 (18:05 +0200)
added patches:
powerpc-boot-remove-leading-zero-in-label-in-udelay.patch
series

queue-5.4/powerpc-boot-remove-leading-zero-in-label-in-udelay.patch [new file with mode: 0644]
queue-5.4/series [new file with mode: 0644]

diff --git a/queue-5.4/powerpc-boot-remove-leading-zero-in-label-in-udelay.patch b/queue-5.4/powerpc-boot-remove-leading-zero-in-label-in-udelay.patch
new file mode 100644 (file)
index 0000000..859f057
--- /dev/null
@@ -0,0 +1,54 @@
+From nathan@kernel.org  Thu Sep  4 18:03:41 2025
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Wed,  3 Sep 2025 14:11:58 -0700
+Subject: powerpc: boot: Remove leading zero in label in udelay()
+To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org>
+Cc: stable@vger.kernel.org, Madhavan Srinivasan <maddy@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, linuxppc-dev@lists.ozlabs.org, Nathan Chancellor <nathan@kernel.org>
+Message-ID: <20250903211158.2844032-1-nathan@kernel.org>
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+When building powerpc configurations in linux-5.4.y with binutils 2.43
+or newer, there is an assembler error in arch/powerpc/boot/util.S:
+
+  arch/powerpc/boot/util.S: Assembler messages:
+  arch/powerpc/boot/util.S:44: Error: junk at end of line, first unrecognized character is `0'
+  arch/powerpc/boot/util.S:49: Error: syntax error; found `b', expected `,'
+  arch/powerpc/boot/util.S:49: Error: junk at end of line: `b'
+
+binutils 2.43 contains stricter parsing of certain labels [1], namely
+that leading zeros are no longer allowed. The GNU assembler
+documentation already somewhat forbade this construct:
+
+  To define a local label, write a label of the form 'N:' (where N
+  represents any non-negative integer).
+
+Eliminate the leading zero in the label to fix the syntax error. This is
+only needed in linux-5.4.y because commit 8b14e1dff067 ("powerpc: Remove
+support for PowerPC 601") removed this code altogether in 5.10.
+
+Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b [1]
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/boot/util.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/boot/util.S
++++ b/arch/powerpc/boot/util.S
+@@ -41,12 +41,12 @@ udelay:
+       srwi    r4,r4,16
+       cmpwi   0,r4,1          /* 601 ? */
+       bne     .Ludelay_not_601
+-00:   li      r0,86   /* Instructions / microsecond? */
++0:    li      r0,86   /* Instructions / microsecond? */
+       mtctr   r0
+ 10:   addi    r0,r0,0 /* NOP */
+       bdnz    10b
+       subic.  r3,r3,1
+-      bne     00b
++      bne     0b
+       blr
+ .Ludelay_not_601:
diff --git a/queue-5.4/series b/queue-5.4/series
new file mode 100644 (file)
index 0000000..36cd370
--- /dev/null
@@ -0,0 +1 @@
+powerpc-boot-remove-leading-zero-in-label-in-udelay.patch