Skip to content
Commit 32365e64 authored by Janet Liu's avatar Janet Liu Committed by Catalin Marinas
Browse files

arm64: fix bug for reloading FPSIMD state after CPU hotplug.



Now FPSIMD don't handle HOTPLUG_CPU. This introduces bug after cpu down/up process.

After cpu down/up process, the FPSMID hardware register is default value, not any
process's fpsimd context. when CPU_DEAD set cpu's fpsimd_state to NULL, it will force
to load the fpsimd context for the thread, to avoid the chance to skip to load the context.
If process A is the last user process on CPU N before cpu down, and the first user process
on the same CPU N after cpu up, A's fpsimd_state.cpu is the current cpu id,
and per_cpu(fpsimd_last_state) points A's fpsimd_state, so kernel will not reload the
context during it return to user space.

Signed-off-by: default avatarJanet Liu <janet.liu@spreadtrum.com>
Signed-off-by: default avatarXiongshan An <xiongshan.an@spreadtrum.com>
Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@spreadtrum.com>
[catalin.marinas@arm.com: some mostly cosmetic clean-ups]
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 6eb6c801
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment