From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hqv6c-0000Jl-Co for qemu-devel@nongnu.org; Wed, 23 May 2007 13:58:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hqv6b-0000JZ-8O for qemu-devel@nongnu.org; Wed, 23 May 2007 13:58:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hqv6b-0000JW-2m for qemu-devel@nongnu.org; Wed, 23 May 2007 13:58:37 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hqv6Z-0007cc-QY for qemu-devel@nongnu.org; Wed, 23 May 2007 13:58:36 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Timers Date: Wed, 23 May 2007 18:58:28 +0100 References: <200705230107.00962.paul@codesourcery.com> <20070523172550.GE3110@mvista.com> In-Reply-To: <20070523172550.GE3110@mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705231858.29299.paul@codesourcery.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 Cc: "George G. Davis" > > Nice idea! On Sparc the timer can be configured to work in 64-bit > > mode, so could the ptimer_get/set_count be changed to use 64-bit > > values? > > Perhaps the width could be made runtime configurable, e.g. 16, 24, 32, > 64-bits as required for a given system, since there are other targets > which may need differring widths (mind I haven't looked all too closely > at the code to see if it already handles this : ). Likewise, perhaps > up/down count can also be made runtime configurable, since, again, some > targets implement up counters. The logic is all the same in that > case, with just a difference in sign... I don't think there's any point. A 64-bit countdown timer is sufficient to implement everything, and I'd expect the overhead is going to minimal. Converting a count-down timer into a count-up timer is trivial. The ARM timers are actually count-up timers. Paul