From patchwork Thu Nov 2 04:16:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10037927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 90185602D8 for ; Thu, 2 Nov 2017 04:17:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F2428D82 for ; Thu, 2 Nov 2017 04:17:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69FE128D84; Thu, 2 Nov 2017 04:17:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12D1D28D82 for ; Thu, 2 Nov 2017 04:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xvWzEpgQ5vBIA+EFQpB5gfOv80War2b5NNLWpI8mfNg=; b=s9mjt8MEfxUXEa jWWbdV5VlpUTFDRSyhgm4IJye6wOtYvcIfDR36sjqzgWrMHRM7spTPbkGNN02/NMbpXKIaQnqIEaV jc7HxSl8uKpkMPkRoMwpFExL7rDR2b5t+BLnU6jUwoqJkt8K3Z1/xOSkjy/4kT5U5JQiDaOpgJNRg Daa8w2l8r3pmzR0ySwJoSSwU3OfHgVY9uI2V2U8nzQZmLCoigLYODNnSkGNDx2T8dtOJwp4WWfBzv O4sx88bT+zQW3q11kfzONmMZzgWl76NE3UqMJN9HT4mld6K5MQ8s/8qhBMbBA8gHpwwfgq1dVrDYN EDYGnxQWc6dq2C1cPGRA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eA6wT-0005gY-3g; Thu, 02 Nov 2017 04:17:21 +0000 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eA6wP-0005fN-JR for linux-arm-kernel@lists.infradead.org; Thu, 02 Nov 2017 04:17:19 +0000 Received: by mail-qt0-x244.google.com with SMTP id d9so5181162qtd.7 for ; Wed, 01 Nov 2017 21:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=kyd9wrRJZkFEEfwGrIfkUV1J+3b7xme5nQsB3pzQbdA=; b=Fob+QBuJevpZw++6tMmBZHR80zgvNk+sxKdWb9L5q9deBEmxUG3xpjgarGZz+TyAVn O3NMfkcJcsDxWIA+t6cH6x0M0HHsCQ7gqnSAD4PBB3mKym4vzhQjJrzISZbqoFfw9QgR DEAzvm3axRmIvZ9+jl/L0ySLPmLSOmQXVnDis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=kyd9wrRJZkFEEfwGrIfkUV1J+3b7xme5nQsB3pzQbdA=; b=IrVLWMvmYqdyvcMKShjNigk5Ofb0VaPsItM/F2RNWqe2Q129Sret7s0BODcLM06N73 5E0xPeAcKYPT2nyywHvOHfuBobL6QKz9U/yTcWMyElSgUn60yeCptUj72bJX4jZNUeiN 1pxPl+secsRemMMqMr6a6YeRtXEouMTqW08SO7w8tat/s5A4MHqehIVL9wvcTROCTW4U DMW30RlinwYrBgXd0oTPHamC87hwLCUBjV1rdgReLMKTsCoeixgIa4fE9ORw/B6ogeP6 xci70Fr06M60e4tYuD49N/yktv7UltXW2PISyCgz3rGbp10LU1TqiLYUmqguG1EnrZLY J7BQ== X-Gm-Message-State: AMCzsaVcAXz/ytPfVloAgOoTeVu6EElsFPul3i1iwhEvopDMxUxocwaE or4XMpGy5SYKIeL9fIcyiDQ38Q== X-Google-Smtp-Source: ABhQp+QR18k/CpyfNky73mwnfqtNOhfDdFFO/SiZWeyypzA/YC3WaOn6OAWCAmwzWbRIeEml1eMooQ== X-Received: by 10.200.8.53 with SMTP id u50mr3413026qth.260.1509596215505; Wed, 01 Nov 2017 21:16:55 -0700 (PDT) Received: from xanadu.home (modemcable045.234-175-137.mc.videotron.ca. [137.175.234.45]) by smtp.gmail.com with ESMTPSA id u48sm1515915qtk.77.2017.11.01.21.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 21:16:54 -0700 (PDT) Date: Thu, 2 Nov 2017 00:16:54 -0400 (EDT) From: Nicolas Pitre To: Russell King - ARM Linux Subject: Re: [PATCH 3/3] ARM: early_printk: use printascii() rather than printch() In-Reply-To: Message-ID: References: <80bc8c16-321a-43ea-6cbb-257dbeee485b@arm.com> <20171031171629.GI9463@n2100.armlinux.org.uk> <20171031175344.GJ9463@n2100.armlinux.org.uk> <20171031182024.GK9463@n2100.armlinux.org.uk> <20171102000945.GT9463@n2100.armlinux.org.uk> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171101_211717_760273_79C63FCF X-CRM114-Status: GOOD ( 14.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Brandt , Robin Murphy , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-by: Chris Brandt 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