Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4358a7fe authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Joonwoo Park
Browse files

arm64: add abstractions for FPSIMD state manipulation



There are two tacit assumptions in the FPSIMD handling code that will no longer
hold after the next patch that optimizes away some FPSIMD state restores:
. the FPSIMD registers of this CPU contain the userland FPSIMD state of
  task 'current';
. when switching to a task, its FPSIMD state will always be restored from
  memory.

This patch adds the following functions to abstract away from straight FPSIMD
register file saves and restores:
- fpsimd_preserve_current_state -> ensure current's FPSIMD state is saved
- fpsimd_update_current_state -> replace current's FPSIMD state

Where necessary, the signal handling and fork code are updated to use the above
wrappers instead of poking into the FPSIMD registers directly.

Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Git-commit: c51f92693c35c141cf7d9b7e2fcbb81128324eb4
[joonwoop@codeaurora.org: fixed trivial merge conflict.]
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent a6d06a68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment