[Top] [All Lists]

Re: [PATCH] Alchemy: override loops_per_jiffy detection

To: Ralf Baechle <>
Subject: Re: [PATCH] Alchemy: override loops_per_jiffy detection
From: Manuel Lauss <>
Date: Thu, 27 Aug 2009 14:08:58 +0200
Cc: Linux-MIPS <>, Manuel Lauss <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8TDRdK6tXngO+lmQHv3aUgugzqYmWV4YsxfRAt8wgGQ=; b=sWlxMGiJzh1KlAKh8q6mK0cj+3eaiCfsR7BGCwWT+ShL2un1vejLkpYHFskB+a3S5N 0N8oUiTl/Z0KRYrG+9oIUPTQnwUYAVXRSzBQ9/BYD4UZUIvKFA6iN4VPwkGtddL+OgN/ oo814t6nraeN2Z5R+/8H6KJKaMjQxsmoJVnt4=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=N2DuICysKzzbhjRp/eDXQEnrN9YuaZ9IW7CdCoJ08qbClrWvlUL4xxC7ltOZ8FCMVN DW1WF/sqn2DFtlPCMhtrvF8Yv77TIsQLD7CSUeS5P4Atry4uU+/sbrAgWTqnpPMtNzjd IPw7A92M6utWSkQ+m8JBD6tbket1NRr5jNZmw=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
Hi Ralf,

On Thu, Aug 27, 2009 at 12:57 PM, Ralf Baechle<> wrote:
> On Sat, Aug 22, 2009 at 06:09:12PM +0200, Manuel Lauss wrote:
>> The loops_per_jiffy detection in generic calibrate_delay is a bit off
>> (by ~0.5% usually); calculate the correct value based on detected core
>> clock.  BogoMIPS value will now reflect cpu core clock correctly.
> It think this is pretty much solving a non-problem.

Pretty much, yeah, and it doesn't solve it completely either. With certain
frequencies the printed rate is wrong due to rouding ;-)

> Here's an even easier solution:
> #include <linux/jiffies.h>
> ...
>        preset_lpj = <loops_per_jiffie_value>;
> Avoid the change to Kconfig that eventually will become messy if other
> systems continue along this line.

Ah, much better.  I'll resend a tested new version in a few hours.

     Manuel Lauss

<Prev in Thread] Current Thread [Next in Thread>