From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 21 Sep 2020 20:25:34 +0800 From: Fino Meng Subject: Re: [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream Message-ID: <20200921122533.GA19127@linux.intel.com> References: <20200918062935.8410-1-fino.meng@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai@xenomai.org On Fri, Sep 18, 2020 at 03:04:06PM +0200, Jan Kiszka wrote: > > > When I'm asking questions on the code, there was a need for a commit > message. > > On 18.09.20 08:29, Fino Meng wrote: > > Signed-off-by: Fino Meng > > Signed-off-by: Mingliang Hu > > --- > > kernel/cobalt/arch/x86/thread.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c > > index ba807ac1e..c33ad832f 100644 > > --- a/kernel/cobalt/arch/x86/thread.c > > +++ b/kernel/cobalt/arch/x86/thread.c > > @@ -26,6 +26,10 @@ > > #include > > #include > > +#ifdef IPIPE_X86_FPU_EAGER > > +extern void fpu__initialize(struct fpu *fpu); > > This will go along with ipipe for 5.4 patching that function to be > non-static again, right? looks like should use "void fpstate_init(union fpregs_state *state)" to replace "void fpu__initialize(struct fpu *fpu)", the former is still a API in header file. > > +#endif > > + > > static struct kmem_cache *xstate_cache; > > #ifdef IPIPE_X86_FPU_EAGER > > @@ -472,7 +476,7 @@ void xnarch_leave_root(struct xnthread *root) > > #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) > > /* restore current's fpregs */ > > __cpu_invalidate_fpregs_state(); > > - switch_fpu_finish(¤t->thread.fpu, smp_processor_id()); > > + switch_fpu_finish(¤t->thread.fpu); > > That is not correct for < 5.2 (5f409e20b794). preparing V2 patches while fixing the smokey tests. BR fino > > #else > > /* mark current thread as not owning the FPU anymore */ > > if (fpregs_active()) > > > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux