diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-01-27 10:23:11 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 18:09:10 -0400 |
commit | 1db1af84d6df99a8e5d6ddea8c7b5c1327c9a620 (patch) | |
tree | 72865fad6fa4bcfabe94ae3642a58bf28a533181 /arch/mips/Kconfig | |
parent | a5e9a69e2cb64c15246291fdc0e27134b9cdce37 (diff) |
MIPS: Basic MSA context switching support
This patch adds support for context switching the MSA vector registers.
These 128 bit vector registers are aliased with the FP registers - an
FP register accesses the least significant bits of the vector register
with which it is aliased (ie. the register with the same index). Due to
both this & the requirement that the scalar FPU must be 64-bit (FR=1) if
enabled at the same time as MSA the kernel will enable MSA & scalar FP
at the same time for tasks which use MSA. If we restore the MSA vector
context then we might as well enable the scalar FPU since the reason it
was left disabled was to allow for lazy FP context restoring - but we
just restored the FP context as it's a subset of the vector context. If
we restore the FP context and have previously used MSA then we have to
restore the whole vector context anyway (see comment in
enable_restore_fp_context for details) so similarly we might as well
enable MSA.
Thus if a task does not use MSA then it will continue to behave as
without this patch - the scalar FP context will be saved & restored as
usual. But if a task executes an MSA instruction then it will save &
restore the vector context forever more.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6431/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Kconfig')
-rw-r--r-- | arch/mips/Kconfig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index f627739eca49..50d854ce7f59 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -2090,10 +2090,11 @@ config CPU_HAS_MSA | |||
2090 | help | 2090 | help |
2091 | MIPS SIMD Architecture (MSA) introduces 128 bit wide vector registers | 2091 | MIPS SIMD Architecture (MSA) introduces 128 bit wide vector registers |
2092 | and a set of SIMD instructions to operate on them. When this option | 2092 | and a set of SIMD instructions to operate on them. When this option |
2093 | is enabled the kernel will support detection of the MSA ASE. If you | 2093 | is enabled the kernel will support allocating & switching MSA |
2094 | know that your kernel will only be running on CPUs which do not | 2094 | vector register contexts. If you know that your kernel will only be |
2095 | support MSA then you may wish to say N here to reduce the size of | 2095 | running on CPUs which do not support MSA or that your userland will |
2096 | your kernel. | 2096 | not be making use of it then you may wish to say N here to reduce |
2097 | the size & complexity of your kernel. | ||
2097 | 2098 | ||
2098 | If unsure, say Y. | 2099 | If unsure, say Y. |
2099 | 2100 | ||