From nobody Wed Dec 17 07:06:03 2025 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AEAF2517B7; Wed, 19 Mar 2025 09:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376861; cv=none; b=sEPjveOKVjsPHCYE+kc7cE5oMj890IFEeVEMLf0qbwwXMyBH90mVs1qIpiaDrUg0b7y/oMjeyNbT1SXYq0eG74r6cpmsiQ3yv9W448aTy3uXHBYUabL7A7Njx8jqcGI3LEV0sdDmeLWKRUayitJhmbfDfLer5XSkTXxHjVCtaF4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376861; c=relaxed/simple; bh=EnKX+FpgRVCww3sHNiEFqjbbrZDHXTE15B4EpztQsrQ=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=CU2tHWRtVCQPuYq9mmYG3jftADMTSDKutwBCOQ5DCGA330vDW3qmGnRUdjuT67wiumsMjhlP+Wjaxrcldrih51L5GqA/Wnbcrk+cPCxMUwZiCeXMTiafqeaHkwnJ3BRWDRkGbHx061K5hbUwMJJSnau9zxy/q+KdJYYvDM2TIak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=tv3ajq5k; arc=none smtp.client-ip=202.12.124.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="tv3ajq5k" Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id 8B5972540147; Wed, 19 Mar 2025 05:34:18 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Wed, 19 Mar 2025 05:34:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1742376858; x= 1742463258; bh=15Kxgw62ZotKzngQbV6i/lyJjN7aLGDqI32o79dR9UQ=; b=t v3ajq5kGuojt4t83p1no0Aupru4nfsMPSkBxSCdwi2BskA4lRqvs79YsfT1KghgP XjMXIMMj6xyeov0ZRZEYzvwi3W3VTYgbul9k0egVB1ftRgorWijJWLOfCXwMYUHZ AxQUhx2PPhmV9ZXlXkm722BaBzYAFlqftJTdsRSSBCkybrUulYATYhSv15kmtW6S KGuUNqoQeP49TX9P7SXHByXn4SqAIhpX/1oZmlz/zuZCP+ynhnOOMD+g81fylrST 4k4ccR7JMz7Qg8XISHIjzysXm+ovnZwNxLUblhyjYKcbYEXRYRis1BHJbGdheCaI zTTKqgCu8vwENY2aaptdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeegleelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepvfevkfgjfhfhufffsedttdertddttddtnecu hfhrohhmpefhihhnnhcuvfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrd horhhgqeenucggtffrrghtthgvrhhnpeelgefhvefgveduhefffeeuveehtdeigedukeef uddvhedvfefhkedugffffeetheenucffohhmrghinhephhgvrggurdhssgenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrghinheslhhi nhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphht thhopehlihhnuhigqdhmieekkheslhhishhtshdrlhhinhhugidqmheikehkrdhorhhgpd hrtghpthhtohepshhtrggslhgvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthht oheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 05:34:13 -0400 (EDT) To: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <0fa5e203bb2f811e36e9711dfd461a8f760a1ed6.1742376675.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [PATCH v2 1/3] m68k: Fix lost column on framebuffer debug console Date: Wed, 19 Mar 2025 20:31:15 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Move the cursor position rightward after rendering the character, not before. This avoids complications that arise when the recursive console_putc call has to wrap the line and/or scroll the display. This also fixes the linewrap bug that crops off the rightmost column. When the cursor is at the bottom of the display, a linefeed will not move the cursor position further downward. Instead, the display scrolls upward. Avoid the repeated add/subtract sequence by way of a single subtraction at the initialization of console_struct_num_rows. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Finn Thain --- arch/m68k/kernel/head.S | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 852255cf60de..d0d77b1adbde 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3400,6 +3400,7 @@ L(console_clear_loop): =20 movel %d4,%d1 /* screen height in pixels */ divul %a0@(FONT_DESC_HEIGHT),%d1 /* d1 =3D max num rows */ + subil #1,%d1 /* row range is 0 to num - 1 */ =20 movel %d0,%a2@(Lconsole_struct_num_columns) movel %d1,%a2@(Lconsole_struct_num_rows) @@ -3546,15 +3547,14 @@ func_start console_putc,%a0/%a1/%d0-%d7 cmpib #10,%d7 jne L(console_not_lf) movel %a0@(Lconsole_struct_cur_row),%d0 - addil #1,%d0 - movel %d0,%a0@(Lconsole_struct_cur_row) movel %a0@(Lconsole_struct_num_rows),%d1 cmpl %d1,%d0 jcs 1f - subil #1,%d0 - movel %d0,%a0@(Lconsole_struct_cur_row) console_scroll + jra L(console_exit) 1: + addil #1,%d0 + movel %d0,%a0@(Lconsole_struct_cur_row) jra L(console_exit) =20 L(console_not_lf): @@ -3581,12 +3581,6 @@ L(console_not_cr): */ L(console_not_home): movel %a0@(Lconsole_struct_cur_column),%d0 - addql #1,%a0@(Lconsole_struct_cur_column) - movel %a0@(Lconsole_struct_num_columns),%d1 - cmpl %d1,%d0 - jcs 1f - console_putc #'\n' /* recursion is OK! */ -1: movel %a0@(Lconsole_struct_cur_row),%d1 =20 /* @@ -3633,6 +3627,23 @@ L(console_do_font_scanline): addq #1,%d1 dbra %d7,L(console_read_char_scanline) =20 + /* + * Register usage in the code below: + * a0 =3D pointer to console globals + * d0 =3D cursor column + * d1 =3D cursor column limit + */ + + lea %pc@(L(console_globals)),%a0 + + movel %a0@(Lconsole_struct_cur_column),%d0 + addil #1,%d0 + movel %d0,%a0@(Lconsole_struct_cur_column) /* Update cursor pos */ + movel %a0@(Lconsole_struct_num_columns),%d1 + cmpl %d1,%d0 + jcs L(console_exit) + console_putc #'\n' /* Line wrap using tail recursion */ + L(console_exit): func_return console_putc =20 --=20 2.45.3 From nobody Wed Dec 17 07:06:03 2025 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 172142528E6 for ; Wed, 19 Mar 2025 09:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376883; cv=none; b=h753dqijQc/CcSR155y481frYMaHE/gxT1ffIkHmznWwFi/jkZ8HVAVEiV/yl2W056ylIDPDuJHI3M2S7o4Gr8tK8b+y2wuDyxFcSucEBUdQGOalcJbkPn4z3z2NuHBdQgvkR4Q6JqhTDuI3ocfShtqHyA9QTrWiALxavSkhvYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376883; c=relaxed/simple; bh=bLO6XOp8X8pawLmoD4gDaJghedPjUsU+TO9ppKoTi0I=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=WOK+jHirms5skZQTt4NmERmIX0NnrxSYWb1RkQYdGDdX64+S6uFOKxNsdc5fm/euful8SEHpccDtuH3IKjRkGlMOzGCkN/4VOszJrWhQb4aP4fMYBcNqAgMt0ns1mwVSXhY3dlTBURUyLPCHLozcXEG60Xp+UR5Jxtfw/2Xg7fY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=3TPKg3yr; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="3TPKg3yr" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 2B56C114012B; Wed, 19 Mar 2025 05:34:41 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 19 Mar 2025 05:34:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1742376881; x= 1742463281; bh=lGSaLW/V66TyHrIDzxOJWZo2UgRsz1f9XhClXGMzdJM=; b=3 TPKg3yrwe6Vx3Mu77wwfP5CFEWCBkCstIIU4qMBKeEQykPhr+9mWGIlnWEtsVAEd cqWLk2/syU2ZKGpisMQ/Gi412m8FNF0z6P+5sCdi5oSIPCi9ILAcUUc9+Q/YUjr/ gLfr16IFOLpCaj39jzo8X+EH7+7X7VVs5qOENMrq2b+aUgsSAyjPfACMxLVZK71U PtqA8hnPYY5PUc69E9KfzkUHGixpTZEtzS2zFe81ktrVn7oSyA/yCDirQ6foXad5 NVmO1bbz4WdWogXjZQzRBfLBAb7h7sadOqgU4ygiVnPzrR/9LpVEHvnlBf+0OiNO gtfROcNkyAMoc8pWCdTnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeegleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepvfevkfgjfhfhufffsedttdertddttddtnecu hfhrohhmpefhihhnnhcuvfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrd horhhgqeenucggtffrrghtthgvrhhnpeelgefhvefgveduhefffeeuveehtdeigedukeef uddvhedvfefhkedugffffeetheenucffohhmrghinhephhgvrggurdhssgenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrghinheslhhi nhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphht thhopehlihhnuhigqdhmieekkheslhhishhtshdrlhhinhhugidqmheikehkrdhorhhgpd hrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 05:34:38 -0400 (EDT) To: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-ID: In-Reply-To: References: From: Finn Thain Subject: [PATCH v2 2/3] m68k: Avoid pointless recursion in debug console rendering Date: Wed, 19 Mar 2025 20:31:15 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The recursive call to console_putc to effect a carriage return is needlessly slow and complicated. Instead, just clear the column counter directly. Setup %a0 earlier to avoid a repeated comparison. Signed-off-by: Finn Thain --- arch/m68k/kernel/head.S | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index d0d77b1adbde..bf7fa344cd3a 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3533,19 +3533,16 @@ func_start console_putc,%a0/%a1/%d0-%d7 tstl %pc@(L(console_font)) jeq L(console_exit) =20 + lea %pc@(L(console_globals)),%a0 + /* Output character in d7 on console. */ movel ARG1,%d7 cmpib #'\n',%d7 - jbne 1f + jne L(console_not_lf) =20 - /* A little safe recursion is good for the soul */ - console_putc #'\r' -1: - lea %pc@(L(console_globals)),%a0 + clrl %a0@(Lconsole_struct_cur_column) /* implicit \r */ =20 - cmpib #10,%d7 - jne L(console_not_lf) movel %a0@(Lconsole_struct_cur_row),%d0 movel %a0@(Lconsole_struct_num_rows),%d1 cmpl %d1,%d0 --=20 2.45.3 From nobody Wed Dec 17 07:06:03 2025 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B90E257444 for ; Wed, 19 Mar 2025 09:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376900; cv=none; b=uD92jQ6o1z9YIEIK4WdArz+V0bScHrQvayJp45st5tOMP0cpbtj8/nmJ7EJORZ+3aUOnroUy4c+k/xkAtkLirDU7wvnDVNQGKs41Uop/0pGWLNgJrDJ/PWIg7o6elnKX/oioV3IJrZmdRR1uGO8UEAO7xf/KbI5la4aUhEA/6fU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376900; c=relaxed/simple; bh=xxRiEguAyeGL9D+NNtgql1i2rcqNGXFBjQJxh1bi3rU=; h=To:Cc:Message-ID:In-Reply-To:References:From:Subject:Date; b=qL7NS8OXF57keGoCdg8RqKoqHYxpI+/eH0xzfCWZ6Wr0Lb2Xy+xBwXAcZpX2Y4VDiHJhK40irhqEHkkcXvGvXsDH6Gm/ikXZVjWI5DJOBleRUKlGFZknYxAMiLYvsIw+rXp5MuwXfnMBUli0A4Deqa6aatU1Sa3HEXq6oK5V+jY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Zmq/6zbQ; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Zmq/6zbQ" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 2BF3911400D1; Wed, 19 Mar 2025 05:34:58 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 19 Mar 2025 05:34:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1742376898; x= 1742463298; bh=6vGTjqhrImDW99O46cZMgZcsLhmTGwXSWmZI+UM/MXc=; b=Z mq/6zbQe1Lks5FWz5nNgEQRZd1H9RoycpJgBUOACnOsIJPOjcNDWYzwwIsvgH8Vy RxjUgnHk/6S0//75Z3iDxt3XFyFicZwzi1QTjN6bW4vhUkU6NrTw3Rel+AI4F9c/ mqzd8qPEZeVFPPaX038gyO33ketUDWbbjHFF+rv/sXXEW4dUtRYUFGebvZGMPhZK WAqFi1LSLSezQhZ2J7/wzpLXVnQb7EIdjhE1fL4ufh7sU8OUEKQFMKWStR94LvmS J6mA4ZJfHV26R9P+2sY/+uyeAKZ6Tc1Fy9zg6Aptks9dnx/qGGEQ81WFvr62Wemm HO8cU2PVzON0uTqUrESRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeegleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepvfevkfgjfhfhufffsedttdertddttddtnecu hfhrohhmpefhihhnnhcuvfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrd horhhgqeenucggtffrrghtthgvrhhnpeelgefhvefgveduhefffeeuveehtdeigedukeef uddvhedvfefhkedugffffeetheenucffohhmrghinhephhgvrggurdhssgenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrghinheslhhi nhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgtphht thhopehlihhnuhigqdhmieekkheslhhishhtshdrlhhinhhugidqmheikehkrdhorhhgpd hrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 05:34:55 -0400 (EDT) To: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-ID: <1f27682893bba60572dfed728386a0f76044b17b.1742376675.git.fthain@linux-m68k.org> In-Reply-To: References: From: Finn Thain Subject: [PATCH v2 3/3] m68k: Remove unused "cursor home" code from debug console Date: Wed, 19 Mar 2025 20:31:15 +1100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The cursor home operation is unused and seems undesirable for logging. Remove it. The console_not_cr label actually means "not line feed and not carriage return either" so take the opportunity to replace it with something less confusing. Rectify some inconsistent whitespace while we're here. Signed-off-by: Finn Thain --- arch/m68k/kernel/head.S | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index bf7fa344cd3a..48ef74e45535 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3555,28 +3555,21 @@ func_start console_putc,%a0/%a1/%d0-%d7 jra L(console_exit) =20 L(console_not_lf): - cmpib #13,%d7 - jne L(console_not_cr) + cmpib #'\r',%d7 + jne L(console_not_lf_not_cr) clrl %a0@(Lconsole_struct_cur_column) jra L(console_exit) =20 -L(console_not_cr): - cmpib #1,%d7 - jne L(console_not_home) - clrl %a0@(Lconsole_struct_cur_row) - clrl %a0@(Lconsole_struct_cur_column) - jra L(console_exit) - -/* - * At this point we know that the %d7 character is going to be - * rendered on the screen. Register usage is - - * a0 =3D pointer to console globals - * a1 =3D font data - * d0 =3D cursor column - * d1 =3D cursor row to draw the character - * d7 =3D character number - */ -L(console_not_home): + /* + * At this point we know that the %d7 character is going to be + * rendered on the screen. Register usage is - + * a0 =3D pointer to console globals + * a1 =3D font data + * d0 =3D cursor column + * d1 =3D cursor row to draw the character + * d7 =3D character number + */ +L(console_not_lf_not_cr): movel %a0@(Lconsole_struct_cur_column),%d0 movel %a0@(Lconsole_struct_cur_row),%d1 =20 --=20 2.45.3