]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it
authorJulien Grall <julien.grall@arm.com>
Tue, 21 May 2019 17:21:38 +0000 (18:21 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Jun 2019 12:17:30 +0000 (13:17 +0100)
commite11ab4032750238cb777fd7cfd4b19061fff0030
tree5ba2f0513a106313eb6881669a7694480090585d
parent1db2970d4a46ad1784e498a687cdc416fa87b9d7
arm64/fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it

The only external user of fpsimd_save() and fpsimd_flush_cpu_state() is
the KVM FPSIMD code.

A following patch will introduce a mechanism to acquire owernship of the
FPSIMD/SVE context for performing context management operations. Rather
than having to export the new helpers to get/put the context, we can just
introduce a new function to combine fpsimd_save() and
fpsimd_flush_cpu_state().

This has also the advantage to remove any external call of fpsimd_save()
and fpsimd_flush_cpu_state(), so they can be turned static.

Lastly, the new function can also be used in the PM notifier.

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/fpsimd.h
arch/arm64/kernel/fpsimd.c
arch/arm64/kvm/fpsimd.c