Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2014 13:20:50 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273214 - in head/sys: amd64/vmm/intel modules/vmm
Message-ID:  <201410171320.s9HDKo53045297@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Oct 17 13:20:49 2014
New Revision: 273214
URL: https://svnweb.freebsd.org/changeset/base/273214

Log:
  Fix build to not bogusly always rebuild vmm.ko.
  
  Rename vmx_assym.s to vmx_assym.h to reflect that file's actual use
  and update vmx_support.S's include to match. Add vmx_assym.h to the
  SRCS to that it gets properly added to the dependency list. Add
  vmx_support.S to SRCS as well, so it gets built and needs fewer
  special-case goo. Remove now-redundant special-case goo. Finally,
  vmx_genassym.o doesn't need to depend on a hand expanded ${_ILINKS}
  explicitly, that's all taken care of by beforedepend.
  
  With these items fixed, we no longer build vmm.ko every single time
  through the modules on a KERNFAST build.
  
  Sponsored by: Netflix

Modified:
  head/sys/amd64/vmm/intel/vmx_support.S
  head/sys/modules/vmm/Makefile

Modified: head/sys/amd64/vmm/intel/vmx_support.S
==============================================================================
--- head/sys/amd64/vmm/intel/vmx_support.S	Fri Oct 17 12:06:48 2014	(r273213)
+++ head/sys/amd64/vmm/intel/vmx_support.S	Fri Oct 17 13:20:49 2014	(r273214)
@@ -29,7 +29,7 @@
 
 #include <machine/asmacros.h>
 
-#include "vmx_assym.s"
+#include "vmx_assym.h"
 
 #ifdef SMP
 #define	LK	lock ;

Modified: head/sys/modules/vmm/Makefile
==============================================================================
--- head/sys/modules/vmm/Makefile	Fri Oct 17 12:06:48 2014	(r273213)
+++ head/sys/modules/vmm/Makefile	Fri Oct 17 13:20:49 2014	(r273214)
@@ -2,7 +2,7 @@
 
 KMOD=	vmm
 
-SRCS=	opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h
+SRCS=	opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h vmx_assym.h
 
 CFLAGS+= -DVMM_KEEP_STATS -DSMP
 CFLAGS+= -I${.CURDIR}/../../amd64/vmm
@@ -38,6 +38,7 @@ SRCS+=	iommu.c		\
 SRCS+=	ept.c		\
 	vmcs.c		\
 	vmx_msr.c	\
+	vmx_support.S	\
 	vmx.c		\
 	vtd.c
 
@@ -45,21 +46,19 @@ SRCS+=	ept.c		\
 .PATH: ${.CURDIR}/../../amd64/vmm/amd
 SRCS+=	amdv.c
 
-OBJS=	vmx_support.o
+CLEANFILES=	vmx_assym.h vmx_genassym.o
 
-CLEANFILES=	vmx_assym.s vmx_genassym.o
-
-vmx_assym.s:    vmx_genassym.o
+vmx_assym.h:    vmx_genassym.o
 .if exists(@)
-vmx_assym.s:    @/kern/genassym.sh
+vmx_assym.h:    @/kern/genassym.sh
 .endif
 	sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET}
 
-vmx_support.o:	vmx_support.S vmx_assym.s
+vmx_support.o:
 	${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
 	    ${.IMPSRC} -o ${.TARGET}
 
-vmx_genassym.o: vmx_genassym.c @ machine x86
+vmx_genassym.o:
 	${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
 
 .include <bsd.kmod.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410171320.s9HDKo53045297>