Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlpxF-0002Sv-SO for qemu-devel@nongnu.org; Fri, 03 Oct 2008 15:04:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlpxF-0002Sd-2S for qemu-devel@nongnu.org; Fri, 03 Oct 2008 15:04:45 -0400 Received: from [199.232.76.173] (port=34837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlpxE-0002SZ-Sz for qemu-devel@nongnu.org; Fri, 03 Oct 2008 15:04:44 -0400 Received: from savannah.gnu.org ([199.232.41.3]:38253 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlpxE-0001px-9b for qemu-devel@nongnu.org; Fri, 03 Oct 2008 15:04:44 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KlpxD-00026U-N9 for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:04:43 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KlpxD-00026Q-Ao for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:04:43 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Fri, 03 Oct 2008 19:04:43 +0000 Subject: [Qemu-devel] [5408] Rearrange tick functions 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 Revision: 5408 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5408 Author: blueswir1 Date: 2008-10-03 19:04:42 +0000 (Fri, 03 Oct 2008) Log Message: ----------- Rearrange tick functions Modified Paths: -------------- trunk/hw/sun4u.c trunk/target-sparc/cpu.h trunk/target-sparc/helper.c trunk/target-sparc/op_helper.c Modified: trunk/hw/sun4u.c =================================================================== --- trunk/hw/sun4u.c 2008-10-03 19:02:42 UTC (rev 5407) +++ trunk/hw/sun4u.c 2008-10-03 19:04:42 UTC (rev 5408) @@ -309,6 +309,21 @@ cpu_interrupt(env, CPU_INTERRUPT_TIMER); } +void cpu_tick_set_count(void *opaque, uint64_t count) +{ + ptimer_set_count(opaque, -count); +} + +uint64_t cpu_tick_get_count(void *opaque) +{ + return -ptimer_get_count(opaque); +} + +void cpu_tick_set_limit(void *opaque, uint64_t limit) +{ + ptimer_set_limit(opaque, -limit, 0); +} + static const int ide_iobase[2] = { 0x1f0, 0x170 }; static const int ide_iobase2[2] = { 0x3f6, 0x376 }; static const int ide_irq[2] = { 14, 15 }; Modified: trunk/target-sparc/cpu.h =================================================================== --- trunk/target-sparc/cpu.h 2008-10-03 19:02:42 UTC (rev 5407) +++ trunk/target-sparc/cpu.h 2008-10-03 19:04:42 UTC (rev 5408) @@ -501,4 +501,11 @@ /* sum4m.c, sun4u.c */ void cpu_check_irqs(CPUSPARCState *env); +#ifdef TARGET_SPARC64 +/* sun4u.c */ +void cpu_tick_set_count(void *opaque, uint64_t count); +uint64_t cpu_tick_get_count(void *opaque); +void cpu_tick_set_limit(void *opaque, uint64_t limit); #endif + +#endif Modified: trunk/target-sparc/helper.c =================================================================== --- trunk/target-sparc/helper.c 2008-10-03 19:02:42 UTC (rev 5407) +++ trunk/target-sparc/helper.c 2008-10-03 19:04:42 UTC (rev 5408) @@ -1412,34 +1412,3 @@ #endif cpu_fprintf(f, "fsr: 0x%08x\n", env->fsr); } - -#ifdef TARGET_SPARC64 -#if !defined(CONFIG_USER_ONLY) -#include "qemu-common.h" -#include "hw/irq.h" -#include "qemu-timer.h" -#endif - -void helper_tick_set_count(void *opaque, uint64_t count) -{ -#if !defined(CONFIG_USER_ONLY) - ptimer_set_count(opaque, -count); -#endif -} - -uint64_t helper_tick_get_count(void *opaque) -{ -#if !defined(CONFIG_USER_ONLY) - return -ptimer_get_count(opaque); -#else - return 0; -#endif -} - -void helper_tick_set_limit(void *opaque, uint64_t limit) -{ -#if !defined(CONFIG_USER_ONLY) - ptimer_set_limit(opaque, -limit, 0); -#endif -} -#endif Modified: trunk/target-sparc/op_helper.c =================================================================== --- trunk/target-sparc/op_helper.c 2008-10-03 19:02:42 UTC (rev 5407) +++ trunk/target-sparc/op_helper.c 2008-10-03 19:04:42 UTC (rev 5408) @@ -3086,3 +3086,27 @@ } #endif +#ifdef TARGET_SPARC64 +void helper_tick_set_count(void *opaque, uint64_t count) +{ +#if !defined(CONFIG_USER_ONLY) + cpu_tick_set_count(opaque, count); +#endif +} + +uint64_t helper_tick_get_count(void *opaque) +{ +#if !defined(CONFIG_USER_ONLY) + return cpu_tick_get_count(opaque); +#else + return 0; +#endif +} + +void helper_tick_set_limit(void *opaque, uint64_t limit) +{ +#if !defined(CONFIG_USER_ONLY) + cpu_tick_set_limit(opaque, limit); +#endif +} +#endif