From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (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 76BF71CEAB2 for ; Mon, 17 Mar 2025 22:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742251728; cv=none; b=SEV4fNtKIY5yZdvtorsma5Kk85WCYCsB4kmKy/7eeBA0bt9kMgZxjuzFm2wIyHiFr0AlHivLPDfUOT0RMfuBgC283q+8SKMnyBcdLRFaFz4sbw/aqCbNAABWnCMl3xUqtL8l5E9g6wvjpQPF1/3fOVWY32UfbQmLAjRczZGiBqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742251728; c=relaxed/simple; bh=ioTnEAuhr3Pub8Z9EfYIwul2H8ShlzATvu1Td70qjTk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=qcdHazaFMiDiVRKxaTiOgwIQvdo1Zbi0PjGHApDJQlO4oJ6RcqS0zNKoAvGkfQBjvCJj9tOsJn9beMWBVu6IvloLOiS28X4ERjqFglfTwOIyjPF308C+9dyTkWxdT6V8pM+C238oKkrpmgiHXiamSQjN/iGWqyvpYTR+ZB6qEkg= 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=145oZ/59; arc=none smtp.client-ip=202.12.124.151 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="145oZ/59" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id 61DE711401FD; Mon, 17 Mar 2025 18:48:43 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Mon, 17 Mar 2025 18:48:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742251723; x=1742338123; bh=R1vaJFtFdJW8YWR8qMo2bNDCNqTwTcZARad vxpaOfME=; b=145oZ/59WJ4ni4RaK4uhJiEFFhRV97I0tCa4ETLMCzlrpl91Qpf 6sc3fVJSZ7qC6/VBO9zSSvJ5pNolKGVb09S0VD/cZb8gtuuDvBPXb4BlM43xA3AQ Djl4+TvoIu9gtpm+c3dmk4nKcA4LKxIuTE7IQFaYl288/m1H3MlnTiQeRf1jeBP6 mXR3CjF398r/EJ4iL6nF1WwW0AAo36beFvPDUn74vYsrL2k8KY7Xvs7dS+xB6xsT 69+SsGMxzVn9qbzU1Px37wxCk7ctdgrBuElPBoAHX2+wWEX0ghaN6hls3MwAUn7e HPM+9m5P9r2QFRUKl1XCfRTrHAGBxpLOUsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugedtjeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevufgjkfhfgggtsehttdertddttddv necuhfhrohhmpefhihhnnhcuvfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheike hkrdhorhhgqeenucggtffrrghtthgvrhhnpeffiefhudeggfefgeejleekfedtkefgudev ueeguedvffeukeetvdfffeefledvkeenucffohhmrghinhephhgvrggurdhssgenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrghinhes lhhinhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmth hpohhuthdprhgtphhtthhopehgvggvrhhtsehlihhnuhigqdhmieekkhdrohhrghdprhgt phhtthhopehsthgrsghlvgesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhope hlihhnuhigqdhmieekkheslhhishhtshdrlhhinhhugidqmheikehkrdhorhhgpdhrtghp thhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Mar 2025 18:48:41 -0400 (EDT) Date: Tue, 18 Mar 2025 09:48:40 +1100 (AEDT) From: Finn Thain To: Geert Uytterhoeven cc: stable@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] m68k: Fix lost column on framebuffer debug console In-Reply-To: Message-ID: References: Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Please disregard the patch below. Further testing shows that it does not completely solve the problem. In particular, when line-wrap also produces vertical scrolling. I think the recursive console_putc call may have to go. On Fri, 7 Mar 2025, Finn Thain wrote: > When long lines are sent to the debug console on the framebuffer, the > right-most column is lost. Fix this by subtracting 1 from the column > count before comparing it with console_struct_cur_column, as the latter > counts from zero. > > Linewrap is handled with a recursive call to console_putc, but this > alters the console_struct_cur_row global. Store the old value before > calling console_putc, so the right-most character gets rendered on the > correct line. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Cc: stable@vger.kernel.org > Signed-off-by: Finn Thain > --- > arch/m68k/kernel/head.S | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S > index 852255cf60de..9c60047764d0 100644 > --- a/arch/m68k/kernel/head.S > +++ b/arch/m68k/kernel/head.S > @@ -3583,11 +3583,16 @@ 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 > + subil #1,%d1 > cmpl %d1,%d0 > jcs 1f > - console_putc #'\n' /* recursion is OK! */ > + /* recursion will alter console_struct so load d1 register first */ > + movel %a0@(Lconsole_struct_cur_row),%d1 > + console_putc #'\n' > + jmp 2f > 1: > movel %a0@(Lconsole_struct_cur_row),%d1 > +2: > > /* > * At this point we make a shift in register usage >