From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXK6c-0004xO-TO for qemu-devel@nongnu.org; Sun, 24 Aug 2008 14:14:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXK6a-0004wA-LL for qemu-devel@nongnu.org; Sun, 24 Aug 2008 14:14:26 -0400 Received: from [199.232.76.173] (port=51560 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXK6a-0004vx-Ds for qemu-devel@nongnu.org; Sun, 24 Aug 2008 14:14:24 -0400 Received: from wf-out-1314.google.com ([209.85.200.170]:56870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXK6a-0003mz-7u for qemu-devel@nongnu.org; Sun, 24 Aug 2008 14:14:24 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1554343wfd.4 for ; Sun, 24 Aug 2008 11:14:23 -0700 (PDT) Message-ID: Date: Sun, 24 Aug 2008 21:14:23 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 6/6] Pass cpu speed into SM BIOS. In-Reply-To: <20080824113329.5652.94322.stgit@gleb-debian.qumranet.com.qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080824113258.5652.92531.stgit@gleb-debian.qumranet.com.qumranet.com> <20080824113329.5652.94322.stgit@gleb-debian.qumranet.com.qumranet.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 8/24/08, Gleb Natapov wrote: > +static uint32_t cpu_speed; 32 bits won't be enough when we get >4GHz CPUs. +static double get_freq(int divisor, unsigned int cpu) I'd use uint64_t and throw away the divisor and double math. On Sparc64, the frequency line in /proc/cpuinfo looks like: Cpu0ClkTck : 000000000ee6b280