Re: [PATCH v2 3/3] testsuite/switchtest: Add support for Dovetail >= 6.19
Jan Kiszka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
On 20.02.26 12:27, Florian Bezdeka wrote:
> The background for this reworking is a recent change to Linux in 6.19:
>
> commit 4fa617cc6851 ("arm64/fpsimd: Allocate kernel mode FP/SIMD
> buffers on the stack")
>
> expects all (non-preemtable) users to provide a buffer that is used
> in case the calling task is scheduled out. NULL is only allowed when
> preemption is disabled.
>
> preempt_disable() has no impact on OOB tasks, so when an OOB task is
> scheduled out the fpsimd code tries to save the FPU regs to NULL, which
> (obviously) triggered a fault.
>
> To be able to provide a struct user_fpsimd_state located on the stack
> the complete FPU usage has to move into one function, now called
> arch_cobalt_in_kernel_fpu_usage() and implemented by all architectures.
> arm64 needs two implementations to stay compatible with older kernels.
Can't we keep the test logic and the FPU setup/teardown split? What if
we provide a wrapper for allocating a state on the stack of the calling
function that - where needed - is then used by setup/teardown? It looks
a bit strange to that "rt_sync" event inside the FPU abstraction.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center