linux-mips
[Top] [All Lists]

Re: [PATCH] fix mdelay(1) for 64bit kernel with HZ == 1000

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] fix mdelay(1) for 64bit kernel with HZ == 1000
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 5 Dec 2005 14:35:30 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <20051130.133326.126937941.nemoto@toshiba-tops.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20051130.133326.126937941.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Wed, Nov 30, 2005 at 01:33:26PM +0900, Atsushi Nemoto wrote:

> mdelay(1) (i.e. udelay(1000)) does not work correctly due to overflow.
> 
> 1000 * 0x004189374BC6A7f0 = 0x10000000000000180 (>= 2**64)
> 
> 0x004189374BC6A7ef (0x004189374BC6A7f0 - 1) is OK and it is exactly
> same as catchall case (0x8000000000000000UL / (500000 / HZ)).
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Applied.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] fix mdelay(1) for 64bit kernel with HZ == 1000, Ralf Baechle <=