linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Finn Thain <fthain@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k@lists.linux-m68k.org,  stable@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] m68k: Fix lost column on framebuffer debug console
Date: Wed, 19 Mar 2025 10:59:16 +0100	[thread overview]
Message-ID: <mvm1putgx3f.fsf@linux-m68k.org> (raw)
In-Reply-To: <0fa5e203bb2f811e36e9711dfd461a8f760a1ed6.1742376675.git.fthain@linux-m68k.org> (Finn Thain's message of "Wed, 19 Mar 2025 20:31:15 +1100")

On Mär 19 2025, Finn Thain wrote:

> 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):
>  
>  	movel	%d4,%d1				/* screen height in pixels */
>  	divul	%a0@(FONT_DESC_HEIGHT),%d1	/* d1 = max num rows */
> +	subil	#1,%d1				/* row range is 0 to num - 1 */

s/subil/subql/

> @@ -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

s/addil/addql/

> @@ -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
>  
>  	/*
> @@ -3633,6 +3627,23 @@ L(console_do_font_scanline):
>  	addq	#1,%d1
>  	dbra	%d7,L(console_read_char_scanline)
>  
> +	/*
> +	 *	Register usage in the code below:
> +	 *	a0 = pointer to console globals
> +	 *	d0 = cursor column
> +	 *	d1 = cursor column limit
> +	 */
> +
> +	lea	%pc@(L(console_globals)),%a0
> +
> +	movel	%a0@(Lconsole_struct_cur_column),%d0
> +	addil	#1,%d0

s/addil/addql/

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2025-03-19 10:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  9:31 [PATCH v2 0/3] m68k: Bug fix and cleanup for framebuffer debug console Finn Thain
2025-03-19  9:31 ` [PATCH v2 1/3] m68k: Fix lost column on " Finn Thain
2025-03-19  9:59   ` Andreas Schwab [this message]
2025-03-20  7:23     ` Finn Thain
2025-03-19  9:31 ` [PATCH v2 3/3] m68k: Remove unused "cursor home" code from " Finn Thain
2025-03-19  9:31 ` [PATCH v2 2/3] m68k: Avoid pointless recursion in debug console rendering Finn Thain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvm1putgx3f.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=fthain@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).