diff options
author | Dave Martin <Dave.Martin@arm.com> | 2018-03-28 12:50:48 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-03-28 17:20:17 +0300 |
commit | 20b8547277a6e8ee1d928792c1b2782c9a2a6cf5 (patch) | |
tree | b7a84cdb011209b33c8f8df19f6dfadadc429433 /arch/arm64/kernel/signal32.c | |
parent | 7f170499f734c417290518aa50cac11953bf8161 (diff) | |
download | linux-20b8547277a6e8ee1d928792c1b2782c9a2a6cf5.tar.xz |
arm64: fpsimd: Split cpu field out from struct fpsimd_state
In preparation for using a common representation of the FPSIMD
state for tasks and KVM vcpus, this patch separates out the "cpu"
field that is used to track the cpu on which the state was most
recently loaded.
This will allow common code to operate on task and vcpu contexts
without requiring the cpu field to be stored at the same offset
from the FPSIMD register data in both cases. This should avoid the
need for messing with the definition of those parts of struct
vcpu_arch that are exposed in the KVM user ABI.
The resulting change is also convenient for grouping and defining
the set of thread_struct fields that are supposed to be accessible
to copy_{to,from}_user(), which includes user_fpsimd_state but
should exclude the cpu field. This patch does not amend the
usercopy whitelist to match: that will be addressed in a subsequent
patch.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
[will: inline fpsimd_flush_state for now]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/signal32.c')
-rw-r--r-- | arch/arm64/kernel/signal32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index 68f5e07b592b..374333703cbd 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c @@ -149,8 +149,7 @@ union __fpsimd_vreg { static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame) { - struct user_fpsimd_state const *fpsimd = - ¤t->thread.fpsimd_state.user_fpsimd; + struct user_fpsimd_state const *fpsimd = ¤t->thread.fpsimd_state; compat_ulong_t magic = VFP_MAGIC; compat_ulong_t size = VFP_STORAGE_SIZE; compat_ulong_t fpscr, fpexc; |