This adds FPU sharing support with a lazy context switching algorithm. Every thread is allowed to use FPU/SIMD registers. In fact, the compiler may insert FPU reg accesses in anycontext to optimize even non-FP code unless the -mgeneral-regs-only compiler flag is used, but Zephyr currently doesn't support such a build. It is therefore possible to do FP access in IRS as well with this patch although IRQs are then disabled to prevent nested IRQs in such cases. Because the thread object grows in size, some tests have to be adjusted. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
17 lines
328 B
C
17 lines
328 B
C
/*
|
|
* Copyright (c) BayLibre SAS
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_INCLUDE_ARM64_STRUCTS_H_
|
|
#define ZEPHYR_INCLUDE_ARM64_STRUCTS_H_
|
|
|
|
/* Per CPU architecture specifics */
|
|
struct _cpu_arch {
|
|
#ifdef CONFIG_FPU_SHARING
|
|
struct k_thread *fpu_owner;
|
|
#endif
|
|
};
|
|
|
|
#endif /* ZEPHYR_INCLUDE_ARM64_STRUCTS_H_ */
|