diff --git a/sys/arch/amd64/amd64/cpufunc.S b/sys/arch/amd64/amd64/cpufunc.S index eece9d28d6ea..14da5358ed2e 100644 --- a/sys/arch/amd64/amd64/cpufunc.S +++ b/sys/arch/amd64/amd64/cpufunc.S @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.11 2008/05/10 16:12:32 ad Exp $ */ +/* $NetBSD: cpufunc.S,v 1.12 2008/05/10 16:21:41 ad Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -221,10 +221,12 @@ NENTRY(cpu_counter) rdtsc shlq $32, %rdx orq %rdx, %rax + addq CPUVAR(CC_SKEW), %rax ret NENTRY(cpu_counter32) rdtsc + addl CPUVAR(CC_SKEW), %eax ret NENTRY(rdpmc) diff --git a/sys/arch/i386/i386/cpufunc.S b/sys/arch/i386/i386/cpufunc.S index 46e072e817d5..ce2449d67f10 100644 --- a/sys/arch/i386/i386/cpufunc.S +++ b/sys/arch/i386/i386/cpufunc.S @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.10 2008/05/10 16:12:32 ad Exp $ */ +/* $NetBSD: cpufunc.S,v 1.11 2008/05/10 16:21:41 ad Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.10 2008/05/10 16:12:32 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.11 2008/05/10 16:21:41 ad Exp $"); #include "opt_xen.h" @@ -143,11 +143,14 @@ END(wrmsr_locked) ENTRY(cpu_counter) rdtsc + addl CPUVAR(CC_SKEW), %eax + adcl CPUVAR(CC_SKEW+4), %edx ret END(cpu_counter) ENTRY(cpu_counter32) rdtsc + addl CPUVAR(CC_SKEW), %eax ret END(cpu_counter32)