From owner-svn-src-all@freebsd.org Fri Feb 10 07:38:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BCDBCD1E7E; Fri, 10 Feb 2017 07:38:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 478901778; Fri, 10 Feb 2017 07:38:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A7cdiH026915; Fri, 10 Feb 2017 07:38:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A7cdjJ026914; Fri, 10 Feb 2017 07:38:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702100738.v1A7cdjJ026914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 10 Feb 2017 07:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313539 - stable/11/lib/libc/x86/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 07:38:40 -0000 Author: ngie Date: Fri Feb 10 07:38:39 2017 New Revision: 313539 URL: https://svnweb.freebsd.org/changeset/base/313539 Log: MFC r312418,r312422: r312418: 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 r312422: Only conditionally add in hyperv support if we're building amd64 This unbreaks the build because the assembly is written for x64. Pointyhat to: ngie Modified: stable/11/lib/libc/x86/sys/Makefile.inc stable/11/lib/libc/x86/sys/__vdso_gettc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/x86/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/x86/sys/Makefile.inc Fri Feb 10 07:32:40 2017 (r313538) +++ stable/11/lib/libc/x86/sys/Makefile.inc Fri Feb 10 07:38:39 2017 (r313539) @@ -4,3 +4,7 @@ SRCS+= \ __vdso_gettc.c + +.if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" +CFLAGS+= -DWANT_HYPERV +.endif Modified: stable/11/lib/libc/x86/sys/__vdso_gettc.c ============================================================================== --- stable/11/lib/libc/x86/sys/__vdso_gettc.c Fri Feb 10 07:32:40 2017 (r313538) +++ stable/11/lib/libc/x86/sys/__vdso_gettc.c Fri Feb 10 07:38:39 2017 (r313539) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __amd64__ +#ifdef WANT_HYPERV #include #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 * return (ENOSYS); } -#endif /* __amd64__ */ +#endif /* WANT_HYPERV */ #pragma weak __vdso_gettc int @@ -246,7 +246,7 @@ __vdso_gettc(const struct vdso_timehands 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();