Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HSZkI-0000uH-O3 for qemu-devel@nongnu.org; Sat, 17 Mar 2007 10:18:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HSZkF-0000i2-6g for qemu-devel@nongnu.org; Sat, 17 Mar 2007 10:18:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HSZkF-0000he-1z for qemu-devel@nongnu.org; Sat, 17 Mar 2007 09:18:55 -0500 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HSZj0-0005xL-3s for qemu-devel@nongnu.org; Sat, 17 Mar 2007 10:17:38 -0400 Received: from amd64.aurel32.net ([2001:618:400:fc13:216:3eff:fe00:1009]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HSZiu-0005Tf-Kg for qemu-devel@nongnu.org; Sat, 17 Mar 2007 15:17:32 +0100 Received: from aurel32 by amd64.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HSZiu-0004ab-BF for qemu-devel@nongnu.org; Sat, 17 Mar 2007 15:17:32 +0100 Date: Sat, 17 Mar 2007 15:17:32 +0100 From: Aurelien Jarno Message-ID: <20070317141732.GA17623@amd64.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [PATCH] [SPARC] SlavIO Counter-Timers fix 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 Hi all, Currently, the time on the SPARC sun4m target running Linux goes about 30% too fast. This is due to a bug in the SlavIO Counter-Timers emulation. When in system mode the counter must be reset when a new limit is written, but *not* when the current limit is read (which also clears the interrupt). The patch below fixes that. Bye, Aurelien Index: hw/slavio_timer.c =================================================================== RCS file: /sources/qemu/qemu/hw/slavio_timer.c,v retrieving revision 1.4 diff -u -d -p -r1.4 slavio_timer.c --- hw/slavio_timer.c 25 Jun 2006 18:15:31 -0000 1.4 +++ hw/slavio_timer.c 17 Mar 2007 14:07:31 -0000 @@ -131,7 +131,6 @@ static uint32_t slavio_timer_mem_readl(v if (s->mode != 1) { // clear irq pic_set_irq_cpu(s->irq, 0, s->cpu); - s->count_load_time = qemu_get_clock(vm_clock); s->reached = 0; return s->limit; } -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net