From: Philippe Gerum <rpm@xenomai.org>
To: Florian Bezdeka <florian.bezdeka@siemens.com>
Cc: xenomai@lists.linux.dev, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH Dovetail 6.16 v3 1/3] x86/fpu: dovetail: Fix FPU corruption
Date: Mon, 08 Sep 2025 14:37:26 +0200 [thread overview]
Message-ID: <87wm6986ih.fsf@xenomai.org> (raw)
In-Reply-To: <20250820-wip-flo-fixes-for-dovetail-6-15-v3-1-ae4a674d8e10@siemens.com> (Florian Bezdeka's message of "Fri, 05 Sep 2025 16:26:25 +0200")
Florian Bezdeka <florian.bezdeka@siemens.com> writes:
> diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
> index 77c4c632cef2..2fc72d622229 100644
> --- a/arch/x86/include/asm/thread_info.h
> +++ b/arch/x86/include/asm/thread_info.h
> @@ -237,10 +237,11 @@ static inline int arch_within_stack_frames(const void * const stack,
> #define TS_OFFSTAGE 0x0040 /* Thread is in-flight to OOB context */
> #define TS_OOBTRAP 0x0080 /* Handling a trap from OOB context */
>
> -#define _TLF_OOB TS_OOB
> -#define _TLF_DOVETAIL TS_DOVETAIL
> -#define _TLF_OFFSTAGE TS_OFFSTAGE
> -#define _TLF_OOBTRAP TS_OOBTRAP
> +#define _TLF_OOB TS_OOB
> +#define _TLF_DOVETAIL TS_DOVETAIL
> +#define _TLF_OFFSTAGE TS_OFFSTAGE
> +#define _TLF_OOBTRAP TS_OOBTRAP
> +#define _TLF_KERNEL_FPU_PREEMPTED 0x0100 /* Dovetail: kernel mode FPU section preempted by OOB */
>
The TS_* enumeration originates from the upstream implementation, so we
added our thread-synchronous flags there. The _TLF_* aliasing comes from
the Dovetail implementation, in order to get a common naming scheme
because not all archs would define TS_* flags. So we should keep it the
current way which is intended to prevent conflicting upstream addition
to go unnoticed, i.e. define TS_KERNEL_FPU_PREEMPTED then alias it to
_TLF_KERNEL_FPU_PREEMPTED.
The rest looks good to me.
--
Philippe.
next prev parent reply other threads:[~2025-09-08 12:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 14:26 [PATCH Dovetail 6.16 v3 0/3] Dovetail 6.16: Fix some regressions introduced during last forward port Florian Bezdeka
2025-09-05 14:26 ` [PATCH Dovetail 6.16 v3 1/3] x86/fpu: dovetail: Fix FPU corruption Florian Bezdeka
2025-09-08 12:37 ` Philippe Gerum [this message]
2025-09-08 12:53 ` Florian Bezdeka
2025-09-05 14:26 ` [PATCH Dovetail 6.16 v3 2/3] arm64: fpsimd: dovetail: Align with x86 implementation Florian Bezdeka
2025-09-08 12:38 ` Philippe Gerum
2025-09-05 14:26 ` [PATCH Dovetail 6.16 v3 3/3] irq_pipeline: Fix pipelining code for level triggered IRQs Florian Bezdeka
2025-09-08 12:40 ` Philippe Gerum
2025-09-08 9:20 ` [PATCH Dovetail 6.16 v3 0/3] Dovetail 6.16: Fix some regressions introduced during last forward port Florian Bezdeka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wm6986ih.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=florian.bezdeka@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=xenomai@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.