linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay()
@ 2025-09-03 21:11 Nathan Chancellor
  2025-09-04  8:16 ` Christophe Leroy
  2025-09-04 16:05 ` Patch "powerpc: boot: Remove leading zero in label in udelay()" has been added to the 5.4-stable tree gregkh
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2025-09-03 21:11 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], 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>
---
v1 -> v2:
- Adjust commit message to make it clearer this construct was already
  incorrect under the existing GNU assembler documentation (Segher)

v1: https://lore.kernel.org/20250902235234.2046667-1-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] 3+ messages in thread

* Re: [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay()
  2025-09-03 21:11 [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay() Nathan Chancellor
@ 2025-09-04  8:16 ` Christophe Leroy
  2025-09-04 16:05 ` Patch "powerpc: boot: Remove leading zero in label in udelay()" has been added to the 5.4-stable tree gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: Christophe Leroy @ 2025-09-04  8:16 UTC (permalink / raw)
  To: Nathan Chancellor, Greg Kroah-Hartman, Sasha Levin
  Cc: stable, Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	linuxppc-dev



Le 03/09/2025 à 23:11, Nathan Chancellor a écrit :
> 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>

> ---
> v1 -> v2:
> - Adjust commit message to make it clearer this construct was already
>    incorrect under the existing GNU assembler documentation (Segher)
> 
> v1: https://lore.kernel.org/20250902235234.2046667-1-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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Patch "powerpc: boot: Remove leading zero in label in udelay()" has been added to the 5.4-stable tree
  2025-09-03 21:11 [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay() Nathan Chancellor
  2025-09-04  8:16 ` Christophe Leroy
@ 2025-09-04 16:05 ` gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: gregkh @ 2025-09-04 16:05 UTC (permalink / raw)
  To: christophe.leroy, gregkh, linuxppc-dev, maddy, mpe, nathan,
	npiggin, sashal
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    powerpc: boot: Remove leading zero in label in udelay()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-boot-remove-leading-zero-in-label-in-udelay.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


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:


Patches currently in stable-queue which might be from nathan@kernel.org are

queue-5.4/powerpc-boot-remove-leading-zero-in-label-in-udelay.patch


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-04 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 21:11 [PATCH 5.4 only v2] powerpc: boot: Remove leading zero in label in udelay() Nathan Chancellor
2025-09-04  8:16 ` Christophe Leroy
2025-09-04 16:05 ` Patch "powerpc: boot: Remove leading zero in label in udelay()" has been added to the 5.4-stable tree gregkh

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).