linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mattias Wallin <mattias.wallin@stericsson.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Saravana Kannan <skannan@codeaurora.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCHv5 1/3] ARM: Translate delay.S into (mostly) C
Date: Wed, 6 Apr 2011 10:49:20 +0200	[thread overview]
Message-ID: <4D9C2910.6020309@stericsson.com> (raw)
In-Reply-To: <1302047800-26720-2-git-send-email-sboyd@codeaurora.org>

On 04/06/2011 01:56 AM, Stephen Boyd wrote:
> +void __udelay(unsigned long usecs)
> +{
> +	__const_udelay(usecs * ((2199023*HZ)>>11));
This will overflow if HZ=1000.
If I remember correct I fixed it like this:
__const_udelay(usecs * ((2199023UL*HZ)>>11));

/Mattias Wallin

  reply	other threads:[~2011-04-06  8:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 23:56 [PATCHv5 0/3] Constant udelay() for SMP and non-SMP systems Stephen Boyd
2011-04-05 23:56 ` [PATCHv5 1/3] ARM: Translate delay.S into (mostly) C Stephen Boyd
2011-04-06  8:49   ` Mattias Wallin [this message]
2011-04-06 17:34     ` Stephen Boyd
2011-04-07  1:27     ` Saravana Kannan
2011-04-07  7:27       ` Mattias Wallin
2011-04-07  7:29   ` Mattias Wallin
2011-04-05 23:56 ` [PATCHv5 2/3] ARM: Allow machines to override __delay() Stephen Boyd
2011-04-07  7:30   ` Mattias Wallin
2011-04-05 23:56 ` [PATCHv5 3/3] ARM: Implement a timer based __delay() loop Stephen Boyd
2011-04-07  7:30   ` Mattias Wallin

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=4D9C2910.6020309@stericsson.com \
    --to=mattias.wallin@stericsson.com \
    --cc=akpm@linux-foundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sboyd@codeaurora.org \
    --cc=skannan@codeaurora.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).