* [PATCH] MIPS: SGI-IP22: Retry the third timer calibration sample on zero
@ 2026-11-28 15:44 Imre Kaloz
2026-12-05 11:29 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Imre Kaloz @ 2026-11-28 15:44 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: SGI-IP22: Retry the third timer calibration sample on zero
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
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-12-05 11:29 UTC (permalink / raw)
To: Imre Kaloz; +Cc: linux-mips, linux-kernel
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 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox