From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eyal Moscovici Subject: Re: [PATCH 1/2] Refactor: module: sys_funcs.c: create a init_fpu() define for kernels 4.1 and up Date: Thu, 9 Nov 2017 18:19:17 +0200 Message-ID: References: <1510242176-24122-1-git-send-email-eyal.moscovici@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: idan.brown@oracle.com To: kvm@vger.kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, liran.alon@oracle.com Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:25675 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753762AbdKIQT2 (ORCPT ); Thu, 9 Nov 2017 11:19:28 -0500 In-Reply-To: <1510242176-24122-1-git-send-email-eyal.moscovici@oracle.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: Please ignore these patches. Was sent by a mistaken git-send-email command. I'm very sorry for that. On 09/11/17 17:42, Eyal Moscovici wrote: > 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 > #endif > > +#if LINUX_VERSION_CODE > KERNEL_VERSION(4,2,0) > +#define init_fpu(current) fpu__activate_curr(¤t->thread.fpu); > +#endif > + > #include > #include > #include > @@ -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(¤t->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);