MIPS: Save/restore MSA context around signals
This patch extends sigcontext in order to hold the most significant 64 bits of each vector register in addition to the MSA control & status register. The least significant 64 bits are already saved as the scalar FP context. This makes things a little awkward since the least & most significant 64 bits of each vector register are not contiguous in memory. Thus the copy_u & insert instructions are used to transfer the values of the most significant 64 bits via GP registers. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6533/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
a8ad136789
commit
eec43a224c
@@ -12,6 +12,10 @@
|
||||
#include <linux/types.h>
|
||||
#include <asm/sgidefs.h>
|
||||
|
||||
/* Bits which may be set in sc_used_math */
|
||||
#define USEDMATH_FP (1 << 0)
|
||||
#define USEDMATH_MSA (1 << 1)
|
||||
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
|
||||
/*
|
||||
@@ -37,6 +41,8 @@ struct sigcontext {
|
||||
unsigned long sc_lo2;
|
||||
unsigned long sc_hi3;
|
||||
unsigned long sc_lo3;
|
||||
unsigned long long sc_msaregs[32]; /* Most significant 64 bits */
|
||||
unsigned long sc_msa_csr;
|
||||
};
|
||||
|
||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
|
||||
@@ -70,6 +76,8 @@ struct sigcontext {
|
||||
__u32 sc_used_math;
|
||||
__u32 sc_dsp;
|
||||
__u32 sc_reserved;
|
||||
__u64 sc_msaregs[32];
|
||||
__u32 sc_msa_csr;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user