svn commit: r249833 - in projects/amd64_xen_pv/sys/amd64: amd64 include

Cherry G. Mathew cherry at FreeBSD.org
Wed Apr 24 06:40:49 UTC 2013


Author: cherry
Date: Wed Apr 24 06:40:48 2013
New Revision: 249833
URL: http://svnweb.freebsd.org/changeset/base/249833

Log:
  Add a non-inline stub function for assembler code.
  
  Approved by: gibbs(implicit)

Modified:
  projects/amd64_xen_pv/sys/amd64/amd64/fpu.c
  projects/amd64_xen_pv/sys/amd64/include/fpu.h

Modified: projects/amd64_xen_pv/sys/amd64/amd64/fpu.c
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/amd64/fpu.c	Wed Apr 24 06:38:49 2013	(r249832)
+++ projects/amd64_xen_pv/sys/amd64/amd64/fpu.c	Wed Apr 24 06:40:48 2013	(r249833)
@@ -1010,3 +1010,16 @@ fpu_save_area_reset(struct savefpu *fsa)
 
 	bcopy(fpu_initialstate, fsa, cpu_max_ext_state_size);
 }
+
+#ifdef XEN
+#include <machine/xen/xen-os.h>
+#include <xen/hypervisor.h>
+
+/* Wrapper for the hypervisor version which is inline */
+/* XXX: This is all pretty sub-optimal at the moment */
+void
+fpu_taskswitch(int set)
+{
+	HYPERVISOR_fpu_taskswitch(set);
+}
+#endif

Modified: projects/amd64_xen_pv/sys/amd64/include/fpu.h
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/include/fpu.h	Wed Apr 24 06:38:49 2013	(r249832)
+++ projects/amd64_xen_pv/sys/amd64/include/fpu.h	Wed Apr 24 06:40:48 2013	(r249833)
@@ -77,6 +77,9 @@ int	is_fpu_kern_thread(u_int flags);
 struct savefpu	*fpu_save_area_alloc(void);
 void	fpu_save_area_free(struct savefpu *fsa);
 void	fpu_save_area_reset(struct savefpu *fsa);
+#ifdef XEN
+void	fpu_taskswitch(int set);
+#endif
 
 /*
  * Flags for fpu_kern_alloc_ctx(), fpu_kern_enter() and fpu_kern_thread().


More information about the svn-src-projects mailing list