* [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
@ 2025-09-02 23:52 Nathan Chancellor
2025-09-02 23:55 ` kernel test robot
2025-09-03 6:15 ` Segher Boessenkool
0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-09-02 23:52 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sasha Levin
Cc: stable, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, Nathan Chancellor
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].
Remove the unnecessary leading zero to fix the build. 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>
---
arch/powerpc/boot/util.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/util.S b/arch/powerpc/boot/util.S
index f11f0589a669..5ab2bc864e66 100644
--- 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:
base-commit: c25f780e491e4734eb27d65aa58e0909fd78ad9f
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
2025-09-02 23:52 [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay() Nathan Chancellor
@ 2025-09-02 23:55 ` kernel test robot
2025-09-03 6:15 ` Segher Boessenkool
1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2025-09-02 23:55 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
Link: https://lore.kernel.org/stable/20250902235234.2046667-1-nathan%40kernel.org
Please ignore this mail if the patch is not relevant for upstream.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
2025-09-02 23:52 [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay() Nathan Chancellor
2025-09-02 23:55 ` kernel test robot
@ 2025-09-03 6:15 ` Segher Boessenkool
2025-09-03 21:14 ` Nathan Chancellor
1 sibling, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2025-09-03 6:15 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Greg Kroah-Hartman, Sasha Levin, stable, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev
Hi!
On Tue, Sep 02, 2025 at 04:52:34PM -0700, Nathan Chancellor wrote:
> 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].
>
> Remove the unnecessary leading zero to fix the build.
To fix it by getting rid of this syntax error, you mean? "00" is not a
valid label name: a) it cannot be a symbol name, it starts with a digit;
and b) it isn't a valid local label either. As the manual says
> To define a local label, write a label of the form ‘N:’ (where N
> represents any non-negative integer).
"0" is written "0", not as "00" (or "0-0" or even "0-0-0", hehe).
Segher
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
2025-09-03 6:15 ` Segher Boessenkool
@ 2025-09-03 21:14 ` Nathan Chancellor
2025-09-03 21:19 ` Segher Boessenkool
0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2025-09-03 21:14 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Greg Kroah-Hartman, Sasha Levin, stable, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev
On Wed, Sep 03, 2025 at 01:15:38AM -0500, Segher Boessenkool wrote:
> Hi!
>
> On Tue, Sep 02, 2025 at 04:52:34PM -0700, Nathan Chancellor wrote:
> > 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].
> >
> > Remove the unnecessary leading zero to fix the build.
>
> To fix it by getting rid of this syntax error, you mean? "00" is not a
> valid label name: a) it cannot be a symbol name, it starts with a digit;
> and b) it isn't a valid local label either. As the manual says
> > To define a local label, write a label of the form ‘N:’ (where N
> > represents any non-negative integer).
> "0" is written "0", not as "00" (or "0-0" or even "0-0-0", hehe).
Sure, I have sent a v2 that hopefully makes it a little clearer that the
code in the kernel was already problematic under the existing rules.
https://lore.kernel.org/20250903211158.2844032-1-nathan@kernel.org/
Cheers,
Nathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay()
2025-09-03 21:14 ` Nathan Chancellor
@ 2025-09-03 21:19 ` Segher Boessenkool
0 siblings, 0 replies; 5+ messages in thread
From: Segher Boessenkool @ 2025-09-03 21:19 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Greg Kroah-Hartman, Sasha Levin, stable, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev
Hi!
On Wed, Sep 03, 2025 at 02:14:42PM -0700, Nathan Chancellor wrote:
> On Wed, Sep 03, 2025 at 01:15:38AM -0500, Segher Boessenkool wrote:
> > On Tue, Sep 02, 2025 at 04:52:34PM -0700, Nathan Chancellor wrote:
> > > 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].
> > >
> > > Remove the unnecessary leading zero to fix the build.
> >
> > To fix it by getting rid of this syntax error, you mean? "00" is not a
> > valid label name: a) it cannot be a symbol name, it starts with a digit;
> > and b) it isn't a valid local label either. As the manual says
> > > To define a local label, write a label of the form ‘N:’ (where N
> > > represents any non-negative integer).
> > "0" is written "0", not as "00" (or "0-0" or even "0-0-0", hehe).
>
> Sure, I have sent a v2 that hopefully makes it a little clearer that the
> code in the kernel was already problematic under the existing rules.
>
> https://lore.kernel.org/20250903211158.2844032-1-nathan@kernel.org/
You forgot to cc: me on that :-) I have it via linuxppc-dev@ of course.
Looks great, thank you!
Segher
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-03 21:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 23:52 [PATCH 5.4 only] powerpc: boot: Remove unnecessary zero in label in udelay() Nathan Chancellor
2025-09-02 23:55 ` kernel test robot
2025-09-03 6:15 ` Segher Boessenkool
2025-09-03 21:14 ` Nathan Chancellor
2025-09-03 21:19 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).