summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/asm/clock.h
diff options
context:
space:
mode:
authorjohnlev <none@none>2007-09-18 15:46:43 -0700
committerjohnlev <none@none>2007-09-18 15:46:43 -0700
commit843e19887f64dde75055cf8842fc4db2171eff45 (patch)
tree4ab8a445a86736e31e88b22413d080cc29f89aa0 /usr/src/uts/intel/asm/clock.h
parent3d318c665ed0c4b4170851459cc58b3386bfec9b (diff)
downloadillumos-joyent-843e19887f64dde75055cf8842fc4db2171eff45.tar.gz
PSARC 2006/260 Solaris on Xen
PSARC 2007/155 IPv4 Network Configuration Enhancements for Xen Guest Domains 6424124 panic in intr_thread->av_dispatch_autovect->atomic_add_ptr 6496858 mdb could use a memory-based IO backend 6515319 workaround for 6491065 needs to be removed from elfextract.c 6518807 snv_nightly: SUNWcakr pkgck error 6551858 PSARC 2006/260 Solaris on Xen 6584697 Can't boot Xen / Solaris dom0 if root is using ZFS 6593429 usr/src/cmd/devfsadm isn't linting properly 6600359 mdb_kvm_intrframe() is unused 6600750 can remove 'u' workaround from zlib 6601465 /dev/lofictl needs to accept kernel ioctl 6604043 Erronous ASSERT in sdev_vnops.c ASSERT(VTOSDEV(vp)->sdev_attrvp); --HG-- rename : usr/src/common/util/memset.h => deleted_files/usr/src/common/util/memset.h rename : usr/src/uts/common/krtld/mapfile => deleted_files/usr/src/uts/common/krtld/mapfile rename : usr/src/uts/i86pc/boot/boot_keyboard.h => deleted_files/usr/src/uts/i86pc/boot/boot_keyboard.h rename : usr/src/uts/intel/io/i8254.c => usr/src/uts/i86pc/io/microfind.c rename : usr/src/uts/i86pc/cpunex/Makefile => usr/src/uts/intel/cpunex/Makefile rename : usr/src/uts/i86pc/io/cpunex.c => usr/src/uts/intel/io/cpunex.c
Diffstat (limited to 'usr/src/uts/intel/asm/clock.h')
-rw-r--r--usr/src/uts/intel/asm/clock.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/usr/src/uts/intel/asm/clock.h b/usr/src/uts/intel/asm/clock.h
index 6effcbc30a..bb855499ed 100644
--- a/usr/src/uts/intel/asm/clock.h
+++ b/usr/src/uts/intel/asm/clock.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -49,7 +48,9 @@ extern __inline__ void unlock_hres_lock(void)
: "cc");
}
-extern __inline__ hrtime_t tsc_read(void)
+#if defined(__xpv)
+
+extern __inline__ hrtime_t __rdtsc_insn(void)
{
#if defined(__amd64)
uint32_t lobits, hibits;
@@ -70,6 +71,25 @@ extern __inline__ hrtime_t tsc_read(void)
#endif
}
+#else /* __xpv */
+
+/*
+ * rdtsc may not exist on 32-bit, so we don't have an inline for it.
+ */
+#if defined(__amd64)
+extern __inline__ hrtime_t tsc_read(void)
+{
+ uint32_t lobits, hibits;
+
+ __asm__ __volatile__(
+ "rdtsc"
+ : "=a" (lobits), "=d" (hibits));
+ return (lobits | ((hrtime_t)hibits << 32));
+}
+#endif /* __amd64 */
+
+#endif /* __xpv */
+
#endif /* !__lint && __GNUC__ */
#ifdef __cplusplus