* [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
@ 2020-09-17 16:53 Fino Meng
2020-09-17 17:11 ` Meng, Fino
0 siblings, 1 reply; 8+ messages in thread
From: Fino Meng @ 2020-09-17 16:53 UTC (permalink / raw)
To: xenomai
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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 <asm/mmu_context.h>
#include <asm/processor.h>
+#ifdef IPIPE_X86_FPU_EAGER
+extern void fpu__initialize(struct fpu *fpu);
+#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);
#else
/* mark current thread as not owning the FPU anymore */
if (fpregs_active())
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
2020-09-17 16:53 [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream Fino Meng
@ 2020-09-17 17:11 ` Meng, Fino
2020-09-17 17:51 ` Philippe Gerum
0 siblings, 1 reply; 8+ messages in thread
From: Meng, Fino @ 2020-09-17 17:11 UTC (permalink / raw)
To: Fino Meng, xenomai
>Sent: Friday, September 18, 2020 12:53 AM
>
>Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
>Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
>---
> 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 <asm/mmu_context.h>
> #include <asm/processor.h>
>
>+#ifdef IPIPE_X86_FPU_EAGER
>+extern void fpu__initialize(struct fpu *fpu); #endif
>+
I sent the patch by "mutt -H 0001-cobalt-x86-adapt-fpu-code-with-Linux-kernel-upstream.patch", but seems the received
content is not match with my local patch:
+#ifdef IPIPE_X86_FPU_EAGER
+extern void fpu__initialize(struct fpu *fpu);
+#endif
+
However I failed to config git send-email, will continue to try tomorrow.
the 4 patches are for the Xenomai core part of kernel 5.4's porting.
> 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);
> #else
> /* mark current thread as not owning the FPU anymore */
> if (fpregs_active())
>--
>2.20.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
2020-09-17 17:11 ` Meng, Fino
@ 2020-09-17 17:51 ` Philippe Gerum
0 siblings, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2020-09-17 17:51 UTC (permalink / raw)
To: Meng, Fino; +Cc: Fino Meng, xenomai
Hi,
Meng, Fino via Xenomai <xenomai@xenomai.org> writes:
>>Sent: Friday, September 18, 2020 12:53 AM
>>
>>Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
>>Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
>>---
>> 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 <asm/mmu_context.h>
>> #include <asm/processor.h>
>>
>>+#ifdef IPIPE_X86_FPU_EAGER
>>+extern void fpu__initialize(struct fpu *fpu); #endif
>>+
>
> I sent the patch by "mutt -H 0001-cobalt-x86-adapt-fpu-code-with-Linux-kernel-upstream.patch", but seems the received
> content is not match with my local patch:
>
> +#ifdef IPIPE_X86_FPU_EAGER
> +extern void fpu__initialize(struct fpu *fpu);
> +#endif
> +
>
> However I failed to config git send-email, will continue to try tomorrow.
> the 4 patches are for the Xenomai core part of kernel 5.4's porting.
>
Make sure to post to xenomai@xenomai.org, not xenomai-owner@xenomai.org
in --to. You have been talking to Mailman so far...
--
Philippe.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
2020-09-18 13:04 ` Jan Kiszka
@ 2020-09-21 12:25 ` Fino Meng
0 siblings, 0 replies; 8+ messages in thread
From: Fino Meng @ 2020-09-21 12:25 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai
On Fri, Sep 18, 2020 at 03:04:06PM +0200, Jan Kiszka wrote:
> <no commit message>
>
> 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 <fino.meng@linux.intel.com>
> > Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
> > ---
> > 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 <asm/mmu_context.h>
> > #include <asm/processor.h>
> > +#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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
2020-09-18 6:29 Fino Meng
@ 2020-09-18 13:04 ` Jan Kiszka
2020-09-21 12:25 ` Fino Meng
0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2020-09-18 13:04 UTC (permalink / raw)
To: Fino Meng, xenomai
<no commit message>
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 <fino.meng@linux.intel.com>
> Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
> ---
> 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 <asm/mmu_context.h>
> #include <asm/processor.h>
>
> +#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?
> +#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).
> #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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
@ 2020-09-18 6:31 Fino Meng
0 siblings, 0 replies; 8+ messages in thread
From: Fino Meng @ 2020-09-18 6:31 UTC (permalink / raw)
To: xenomai, jan.kiszka, fino.meng
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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 <asm/mmu_context.h>
#include <asm/processor.h>
+#ifdef IPIPE_X86_FPU_EAGER
+extern void fpu__initialize(struct fpu *fpu);
+#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);
#else
/* mark current thread as not owning the FPU anymore */
if (fpregs_active())
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
@ 2020-09-18 6:29 Fino Meng
2020-09-18 13:04 ` Jan Kiszka
0 siblings, 1 reply; 8+ messages in thread
From: Fino Meng @ 2020-09-18 6:29 UTC (permalink / raw)
To: xenomai, jan.kiszka
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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 <asm/mmu_context.h>
#include <asm/processor.h>
+#ifdef IPIPE_X86_FPU_EAGER
+extern void fpu__initialize(struct fpu *fpu);
+#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);
#else
/* mark current thread as not owning the FPU anymore */
if (fpregs_active())
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream
@ 2020-09-18 5:56 Fino Meng
0 siblings, 0 replies; 8+ messages in thread
From: Fino Meng @ 2020-09-18 5:56 UTC (permalink / raw)
To: xenomai
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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 <asm/mmu_context.h>
#include <asm/processor.h>
+#ifdef IPIPE_X86_FPU_EAGER
+extern void fpu__initialize(struct fpu *fpu);
+#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);
#else
/* mark current thread as not owning the FPU anymore */
if (fpregs_active())
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-21 12:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 16:53 [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream Fino Meng
2020-09-17 17:11 ` Meng, Fino
2020-09-17 17:51 ` Philippe Gerum
2020-09-18 5:56 Fino Meng
2020-09-18 6:29 Fino Meng
2020-09-18 13:04 ` Jan Kiszka
2020-09-21 12:25 ` Fino Meng
2020-09-18 6:31 Fino Meng
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.