aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/x86/sys/__vdso_gettc.c
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-01-19 17:03:45 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-01-19 17:03:45 +0000
commitab9bd41a5aad31e664eaa6340ab7f46c1a3a5c42 (patch)
tree0cf0a1f85822128f44b87b65fa360d33ce7c84f9 /lib/libc/x86/sys/__vdso_gettc.c
parent3e9662dcb42e81a4d82ba2330822620c2a3eee13 (diff)
downloadsrc-ab9bd41a5aad31e664eaa6340ab7f46c1a3a5c42.tar.gz
src-ab9bd41a5aad31e664eaa6340ab7f46c1a3a5c42.zip
Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV
The effect at runtime is negligible as the hyperv timer isn't available except when hyperv is loaded. This is a prerequisite for conditionalizing the header build/install out of the build MFC after: 3 weeks Reviewed by: sephe Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9242
Notes
Notes: svn path=/head/; revision=312418
Diffstat (limited to 'lib/libc/x86/sys/__vdso_gettc.c')
-rw-r--r--lib/libc/x86/sys/__vdso_gettc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c
index 723db6e0874e..bf46a10e48b7 100644
--- a/lib/libc/x86/sys/__vdso_gettc.c
+++ b/lib/libc/x86/sys/__vdso_gettc.c
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
#include <dev/acpica/acpi_hpet.h>
-#ifdef __amd64__
+#ifdef WANT_HYPERV
#include <dev/hyperv/hyperv.h>
#endif
#include "libc_private.h"
@@ -158,7 +158,7 @@ __vdso_init_hpet(uint32_t u)
munmap((void *)new_map, PAGE_SIZE);
}
-#ifdef __amd64__
+#ifdef WANT_HYPERV
#define HYPERV_REFTSC_DEVPATH "/dev/" HYPERV_REFTSC_DEVNAME
@@ -217,7 +217,7 @@ __vdso_hyperv_tsc(struct hyperv_reftsc *tsc_ref, u_int *tc)
return (ENOSYS);
}
-#endif /* __amd64__ */
+#endif /* WANT_HYPERV */
#pragma weak __vdso_gettc
int
@@ -246,7 +246,7 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc)
return (ENOSYS);
*tc = *(volatile uint32_t *)(map + HPET_MAIN_COUNTER);
return (0);
-#ifdef __amd64__
+#ifdef WANT_HYPERV
case VDSO_TH_ALGO_X86_HVTSC:
if (hyperv_ref_tsc == NULL)
__vdso_init_hyperv_tsc();