Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2013 06:40:48 +0000 (UTC)
From:      "Cherry G. Mathew" <cherry@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r249833 - in projects/amd64_xen_pv/sys/amd64: amd64 include
Message-ID:  <201304240640.r3O6emrs099372@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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().



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