All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Imre Kaloz <kaloz@kernel.org>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: SGI-IP22: Retry the third timer calibration sample on zero
Date: Sat, 5 Dec 2026 12:29:47 +0100	[thread overview]
Message-ID: <axP1qw1igi_BJLet@alpha.franken.de> (raw)
In-Reply-To: <20261128154452.28694-1-kaloz@kernel.org>

On Sat, Nov 28, 2026 at 04:44:52PM +0100, Imre Kaloz wrote:
> The third calibration sample can be 0 and is then averaged in, which
> sets the Count rate to two thirds of its real value. Loop until it
> is non-zero, as for the first two.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Imre Kaloz <kaloz@kernel.org>
> ---
>  arch/mips/sgi-ip22/ip22-time.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
> index 045aa89f28d8..e911bc03f1dd 100644
> --- a/arch/mips/sgi-ip22/ip22-time.c
> +++ b/arch/mips/sgi-ip22/ip22-time.c
> @@ -93,7 +93,9 @@ __init void plat_time_init(void)
>  
>  	if (r4k_ticks[0] != r4k_ticks[1]) {
>  		printk("warning: timer counts differ, retrying... ");
> -		r4k_ticks[2] = dosample();
> +		do {
> +			r4k_ticks[2] = dosample();
> +		} while (!r4k_ticks[2]);
>  		if (r4k_ticks[2] == r4k_ticks[0]
>  		    || r4k_ticks[2] == r4k_ticks[1])
>  			r4k_tick = r4k_ticks[2];
> 
> base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
> -- 
> 2.47.3

applied to mips-next

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2026-12-05 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28 15:44 [PATCH] MIPS: SGI-IP22: Retry the third timer calibration sample on zero Imre Kaloz
2026-12-05 11:29 ` Thomas Bogendoerfer [this message]

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=axP1qw1igi_BJLet@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=kaloz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.