From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KszE0-0007JE-0b for qemu-devel@nongnu.org; Thu, 23 Oct 2008 08:23:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KszDv-0007GX-Q6 for qemu-devel@nongnu.org; Thu, 23 Oct 2008 08:23:35 -0400 Received: from [199.232.76.173] (port=51713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KszDv-0007GQ-IW for qemu-devel@nongnu.org; Thu, 23 Oct 2008 08:23:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54702) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KszDo-0006J8-ND for qemu-devel@nongnu.org; Thu, 23 Oct 2008 08:23:31 -0400 From: Glauber Costa Date: Thu, 23 Oct 2008 12:19:07 -0200 Message-Id: <1224771556-11146-24-git-send-email-glommer@redhat.com> In-Reply-To: <1224771556-11146-1-git-send-email-glommer@redhat.com> References: <1224771556-11146-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 23/32] move cpu_get_time_fast to kqemu.c 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: jan.kiszka@siemens.com, aliguori@us.ibm.com, jes@sgi.com, avi@qumranet.com, dmitry.baryshkov@siemens.com remove it from generic code Signed-off-by: Glauber Costa --- kqemu.c | 7 +++++++ target-i386/cpu.h | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/kqemu.c b/kqemu.c index 5ca0f76..16ebe7d 100644 --- a/kqemu.c +++ b/kqemu.c @@ -90,6 +90,13 @@ uint8_t *modified_ram_pages_table; int qpi_io_memory; uint32_t kqemu_comm_base; /* physical address of the QPI communication page */ +static inline int cpu_get_time_fast(void) +{ + int low, high; + asm volatile("rdtsc" : "=a" (low), "=d" (high)); + return low; +} + #define cpuid(index, eax, ebx, ecx, edx) \ asm volatile ("cpuid" \ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \ diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 8a2d797..6310529 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -726,15 +726,6 @@ void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); #define X86_DUMP_FPU 0x0001 /* dump FPU state too */ #define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */ -#ifdef USE_KQEMU -static inline int cpu_get_time_fast(void) -{ - int low, high; - asm volatile("rdtsc" : "=a" (low), "=d" (high)); - return low; -} -#endif - #define TARGET_PAGE_BITS 12 #define CPUState CPUX86State -- 1.5.5.1