zephyr/arch
Nicolas Pitre b8d24ffb45 arm64: mitigate FPU-in-exception usage side effects
Every va_start() currently triggers a FPU access trap if FPU is not
already used. This is due to the fact that va_start() must copy FPU
registers that are used for float argument passing into the va_list
object. Flushing the FPU context to its owner and granting access to
the current thread is wasteful if this is only for va_start(),
especially since in most cases there are simply no FP arguments
being passed by the caller.

This is made even worse with exception code (syscalls, IRQ handlers,
etc.) where the exception code has to be resumed with interrupts
disabled upon FPU access as there is no provision for preserving an
interrupted exception mode's FPU context.

Fix those issues by simply simulating the sequence of STR instructions
that the va_start() generates without actually granting FPU access.
We limit ourselves only to exception context to keep changes to a
minimum for now.

This also allows for reverting the ARM64 exception in the nested IRQ
test as it now works properly even if FPU_SHARING is enabled.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-05-21 04:52:44 -05:00
..
arc cache: Rename sys_{dcache,icache}_* to sys_{data,instr}_cache_* 2021-05-08 07:00:33 +02:00
arm arch: arm: cortex_m: z_arm_mpu_init: fix D-Cache invalidation 2021-05-18 11:39:26 -05:00
arm64 arm64: mitigate FPU-in-exception usage side effects 2021-05-21 04:52:44 -05:00
common arch: common: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
nios2 arch: nios2: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
posix arch: replace power/power.h with pm/pm.h 2021-05-05 18:35:49 -04:00
riscv arch: riscv: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
sparc arch: sparc: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
x86 arch/x86: Correct multiboot interpretation when building for EFI 2021-05-15 15:30:02 -04:00
xtensa xtensa: fix booting secondary cores on the dummy thread 2021-05-03 17:13:01 -04:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig cache: Introduce external cache controller system support 2021-05-08 07:00:33 +02:00