linux-mips
[Top] [All Lists]

Re: [PATCH v2] MIPS: Add a high resolution sched_clock() via cnt32_to_63

To: wuzhangjin@gmail.com
Subject: Re: [PATCH v2] MIPS: Add a high resolution sched_clock() via cnt32_to_63().
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Sun, 22 Nov 2009 14:55:07 +0300
Cc: Ingo Molnar <mingo@elte.hu>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, Thomas Gleixner <tglx@linutronix.de>, Michal Simek <monstr@monstr.eu>, linux-kernel@vger.kernel.org
In-reply-to: <1258888086.4548.52.camel@falcon.domain.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <dae45f23b5d34f64fc60a445015e7dfe05aa0d07.1258875717.git.wuzhangjin@gmail.com> <20091122081328.GB24558@elte.hu> <1258888086.4548.52.camel@falcon.domain.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Hello.

Wu Zhangjin wrote:

+static void __maybe_unused setup_sched_clock_update(unsigned long tclk)
+{
+       unsigned long data;
+
+       data = (0xffffffffUL / tclk / 2 - 2) * HZ;

Because the MIPS c0 count's frequency is half of the cpu frequency(Hi, Ralf, 
does every MIPS c0 count meet this feature?),

  No, e.g. Alchemy's C0 Count ticks at full CPU speed.

WBR, Sergei



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