All of lore.kernel.org
 help / color / mirror / Atom feed
From: richardcochran@gmail.com (Richard Cochran)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND] ixp4xx: clockevent set_next_event fix
Date: Tue, 14 Feb 2012 13:01:53 +0100	[thread overview]
Message-ID: <20120214120153.GA9808@localhost.localdomain> (raw)
In-Reply-To: <4F3A2F79.6050806@flytronic.pl>

On Tue, Feb 14, 2012 at 10:55:05AM +0100, Micha?? Wr??bel wrote:
> IXP43x Developer's Manual [17.4.3] and IXP4[56]x Developer's Manual
> [18.4.3] say that for predictable operation the timer needs to be
> stopped before writing a new value into the reload register. Indeed,
> tests on IXP435 show that writing a new value into the reload register
> without stopping the timer first has no immediate effect on the timer.
> This makes hrtimers started through hrtimer_start() to be delayed until
> the currently earliest hrtimer expires.
> 
> IXP42x Developer's Manual [14.3] says that the timer will be reloaded
> immediately on setting the timer reload register, so the bug probably
> doesn't occur on those CPUs. However, stopping the timer shouldn't have
> any negative side effects, so it should be safe to apply it
> machine-wide.

Unless you test this out and confirm that it works for all IXP4xx, I
would prefer to see a specific timer function for the 43x instead.

Thanks,
Richard


> 
> Signed-off-by: Micha?? Wr??bel <michal.wrobel@flytronic.pl>
> ---
>  arch/arm/mach-ixp4xx/common.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> The previous patch had a mistake in the description - wrong reference to
> "General-Purpose Timers" section in IXP42x Developer's Manual.
> 
> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
> index 3841ab4..fd37c83 100644
> --- a/arch/arm/mach-ixp4xx/common.c
> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -434,6 +434,7 @@ static int ixp4xx_set_next_event(unsigned long evt,
>  {
>  	unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK;
>  
> +	*IXP4XX_OSRT1 = 0;
>  	*IXP4XX_OSRT1 = (evt & ~IXP4XX_OST_RELOAD_MASK) | opts;
>  
>  	return 0;
> -- 
> 1.7.5.4
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2012-02-14 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 17:49 [PATCH] ixp4xx: clockevent set_next_event fix Michał Wróbel
2012-02-14  9:55 ` [PATCH RESEND] " Michał Wróbel
2012-02-14 12:01   ` Richard Cochran [this message]
2012-02-14 12:21     ` Michał Wróbel
2012-02-14 14:47       ` [PATCH RESEND] ixp4xx: clockevent set_next_event fix (TESTERS NEEDED) Michał Wróbel

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=20120214120153.GA9808@localhost.localdomain \
    --to=richardcochran@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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.