All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Refactor: module: sys_funcs.c: create a init_fpu() define for kernels 4.1 and up
@ 2017-11-09 15:42 Eyal Moscovici
  2017-11-09 15:42 ` [PATCH 2/2] module: sys_funcs.c: init_fpu(): add definition for kernel 4.14 " Eyal Moscovici
  2017-11-09 16:19 ` [PATCH 1/2] Refactor: module: sys_funcs.c: create a init_fpu() define for kernels 4.1 " Eyal Moscovici
  0 siblings, 2 replies; 4+ messages in thread
From: Eyal Moscovici @ 2017-11-09 15:42 UTC (permalink / raw)
  To: kvm, pbonzini, rkrcmar, liran.alon; +Cc: idan.brown, Eyal Moscovici

This is done in preparation for kernel 4.14 where the name of the function
changed again.
---
 module/sys_funcs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/sys_funcs.c b/module/sys_funcs.c
index 7d5282f..6676463 100644
--- a/module/sys_funcs.c
+++ b/module/sys_funcs.c
@@ -53,6 +53,10 @@
 #include <asm-generic/set_memory.h>
 #endif
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4,2,0)
+#define init_fpu(current)	fpu__activate_curr(&current->thread.fpu);
+#endif
+
 #include <hvx_ioctls.h>
 #include <hvx_host_iface.h>
 #include <hvx_version.h>
@@ -1215,12 +1219,8 @@ static void hvx_cpu_ioctl_prerun(struct hvx_iface_cpu *cpu_iface)
 
 	pr_debug("CPU-%d: start prerun\n", hvx_run->cpu_id);
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(4,2,0)
-	fpu__activate_curr(&current->thread.fpu);
-#else
 	/* Save host FPU state and set cr0.ts */
 	init_fpu(current);
-#endif
 
 	/* Make sure host doesn't run with cr4.pge bit set */
 	BUG_ON(native_read_cr4() & X86_CR4_PGE);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-09 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 15:42 [PATCH 1/2] Refactor: module: sys_funcs.c: create a init_fpu() define for kernels 4.1 and up Eyal Moscovici
2017-11-09 15:42 ` [PATCH 2/2] module: sys_funcs.c: init_fpu(): add definition for kernel 4.14 " Eyal Moscovici
2017-11-09 16:19   ` Eyal Moscovici
2017-11-09 16:19 ` [PATCH 1/2] Refactor: module: sys_funcs.c: create a init_fpu() define for kernels 4.1 " Eyal Moscovici

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.