diff mbox

[3/3] ARM: early_printk: use printascii() rather than printch()

Message ID nycvar.YSQ.7.76.1711020011400.21665@knanqh.ubzr (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Pitre Nov. 2, 2017, 4:16 a.m. UTC
On Wed, 1 Nov 2017, Nicolas Pitre wrote:

> Well... I don't know what happened with Chris' testing either.
> 
> I *thought* I build tested it, but my .config had 
> CONFIG_DEBUG_SEMIHOSTING=y.

Here's the fixed patch. I won't submit it to the patch system before we 
understand how the previous one worked for Chris.

----- >8
Subject: debug printch/printascii: translate '\n' to "\r\n" not "\n\r"

Some terminals apparently have issues with "\n\r" and mess up the 
display. Let's use the traditional "\r\n" ordering.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Chris Brandt <Chris.Brandt@renesas.com>

Comments

Russell King (Oracle) Nov. 2, 2017, 11:09 a.m. UTC | #1
On Thu, Nov 02, 2017 at 12:16:54AM -0400, Nicolas Pitre wrote:
> On Wed, 1 Nov 2017, Nicolas Pitre wrote:
> 
> > Well... I don't know what happened with Chris' testing either.
> > 
> > I *thought* I build tested it, but my .config had 
> > CONFIG_DEBUG_SEMIHOSTING=y.
> 
> Here's the fixed patch. I won't submit it to the patch system before we 
> understand how the previous one worked for Chris.

As we have seen, there's risk involved with merging apparently tested
fixes, and it can result in major build breakage.

Today is the last linux-next fetch before the potential opening of the
merge window on Sunday.  I'd prefer not to merge anything in the next
four days, but instead let things settle ready for that.

Most of last night's builds for my autobuilder failed due to this
problem (I didn't have a chance to regenerate that tree after kernelci
reported the problem), so I'm going to have to wait until tonight's
builds to see how things are - and that's starting to leave precious
little available time before the merge window.  I don't run the
builder during the day as it eats around six hours of time.

So, in short, my tree is now closed in expectation of 4.14 on Sunday.

However, if you want me to remove "8705/1: early_printk: use printascii()
rather than printch()" I can do that, but only if you tell me before
4pm UTC today.

If we get 4.14-rc8 instead, I'll re-open for a few days for this.
Nicolas Pitre Nov. 2, 2017, 3:12 p.m. UTC | #2
On Thu, 2 Nov 2017, Russell King - ARM Linux wrote:

> So, in short, my tree is now closed in expectation of 4.14 on Sunday.
> 
> However, if you want me to remove "8705/1: early_printk: use printascii()
> rather than printch()" I can do that, but only if you tell me before
> 4pm UTC today.

I'd say: just leave things as they are. No point disturbing your tree 
again now. The downside is only cosmetic during the early boot when 
early_printk is enabled. That can be fixed in v4.15-rc1.

> If we get 4.14-rc8 instead, I'll re-open for a few days for this.

Sure.


Nicolas
diff mbox

Patch

diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index ea9646cc2a..01d746efff 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -79,25 +79,28 @@  hexbuf:		.space 16
 
 ENTRY(printascii)
 		addruart_current r3, r1, r2
-		b	2f
-1:		waituart r2, r3
-		senduart r1, r3
-		busyuart r2, r3
-		teq	r1, #'\n'
-		moveq	r1, #'\r'
-		beq	1b
-2:		teq	r0, #0
+1:		teq	r0, #0
 		ldrneb	r1, [r0], #1
 		teqne	r1, #0
-		bne	1b
-		ret	lr
+		reteq	lr
+2:		teq     r1, #'\n'
+		bne	3f
+		mov	r1, #'\r'
+		waituart r2, r3
+		senduart r1, r3
+		busyuart r2, r3
+		mov	r1, #'\n'
+3:		waituart r2, r3
+		senduart r1, r3
+		busyuart r2, r3
+		b	1b
 ENDPROC(printascii)
 
 ENTRY(printch)
 		addruart_current r3, r1, r2
 		mov	r1, r0
 		mov	r0, #0
-		b	1b
+		b	2b
 ENDPROC(printch)
 
 #ifdef CONFIG_MMU