All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc <marvin24@gmx.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: clock skew on B/W G3
Date: Wed, 5 Oct 2005 08:34:35 +0200	[thread overview]
Message-ID: <200510050834.35493.marvin24@gmx.de> (raw)
In-Reply-To: <1128464094.6417.31.camel@gaston>


Hi Ben,=20

Le Mittwoch 05 Oktober 2005 00:14, Benjamin Herrenschmidt a =C3=A9crit :
> The problem is indeed in via_calibrate_decr(). This routine works on
> HZ/100 so it will not do any good with HZ not beeing a multiple of 100.
>
> Can you test this patch ?

I can confirm that this patch solves the timer skew on my mac.

Thanks!

>
> Index: linux-work/arch/ppc/platforms/pmac_time.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- linux-work.orig/arch/ppc/platforms/pmac_time.c	2005-09-22
> 14:06:18.000000000 +1000 +++
> linux-work/arch/ppc/platforms/pmac_time.c	2005-10-05 08:14:17.000000000
> +1000 @@ -195,7 +195,7 @@
>  		;
>  	dend =3D get_dec();
>
> -	tb_ticks_per_jiffy =3D (dstart - dend) / (6 * (HZ/100));
> +	tb_ticks_per_jiffy =3D (dstart - dend) / ((6 * HZ)/100);
>  	tb_to_us =3D mulhwu_scale_factor(dstart - dend, 60000);
>
>  	printk(KERN_INFO "via_calibrate_decr: ticks per jiffy =3D %u (%u ticks)=
\n",
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

WARNING: multiple messages have this Message-ID (diff)
From: Marc <marvin24@gmx.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rune Torgersen <runet@innovsys.com>,
	linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: clock skew on B/W G3
Date: Wed, 5 Oct 2005 08:34:35 +0200	[thread overview]
Message-ID: <200510050834.35493.marvin24@gmx.de> (raw)
In-Reply-To: <1128464094.6417.31.camel@gaston>


Hi Ben, 

Le Mittwoch 05 Oktober 2005 00:14, Benjamin Herrenschmidt a écrit :
> The problem is indeed in via_calibrate_decr(). This routine works on
> HZ/100 so it will not do any good with HZ not beeing a multiple of 100.
>
> Can you test this patch ?

I can confirm that this patch solves the timer skew on my mac.

Thanks!

>
> Index: linux-work/arch/ppc/platforms/pmac_time.c
> ===================================================================
> --- linux-work.orig/arch/ppc/platforms/pmac_time.c	2005-09-22
> 14:06:18.000000000 +1000 +++
> linux-work/arch/ppc/platforms/pmac_time.c	2005-10-05 08:14:17.000000000
> +1000 @@ -195,7 +195,7 @@
>  		;
>  	dend = get_dec();
>
> -	tb_ticks_per_jiffy = (dstart - dend) / (6 * (HZ/100));
> +	tb_ticks_per_jiffy = (dstart - dend) / ((6 * HZ)/100);
>  	tb_to_us = mulhwu_scale_factor(dstart - dend, 60000);
>
>  	printk(KERN_INFO "via_calibrate_decr: ticks per jiffy = %u (%u ticks)\n",
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2005-10-05  6:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03 14:18 clock skew on B/W G3 Rune Torgersen
2005-10-03 14:18 ` Rune Torgersen
2005-10-04  6:14 ` Marc
2005-10-04  6:14   ` Marc
2005-10-04 22:10   ` Benjamin Herrenschmidt
2005-10-04 22:10     ` Benjamin Herrenschmidt
2005-10-04 22:14   ` Benjamin Herrenschmidt
2005-10-04 22:14     ` Benjamin Herrenschmidt
2005-10-05  6:34     ` Marc [this message]
2005-10-05  6:34       ` Marc
2005-10-04 12:48 ` Paul Mackerras
2005-10-04 12:48   ` Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04 19:22 Rune Torgersen
2005-10-04 19:22 ` Rune Torgersen
2005-10-04 15:15 Rune Torgersen
2005-10-04 15:15 ` Rune Torgersen
2005-10-04 19:14 ` George Anzinger
2005-10-04 19:14   ` George Anzinger
2005-10-01 12:29 marvin24
2005-10-02 16:46 ` Marc
2005-10-02 16:46   ` Marc

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=200510050834.35493.marvin24@gmx.de \
    --to=marvin24@gmx.de \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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.