Re: [PATCH 15/15] mips: save/restore MSA context around signals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/27/2014 07:23 AM, Paul Burton wrote:
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.


Interesting.

This very much touches the userspace ABI of the kernel, so it merits very careful consideration.


Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
---
  arch/mips/include/asm/sigcontext.h      |   2 +
  arch/mips/include/uapi/asm/sigcontext.h |   8 ++
  arch/mips/kernel/asm-offsets.c          |   3 +
  arch/mips/kernel/r4k_fpu.S              | 213 ++++++++++++++++++++++++++++++++
  arch/mips/kernel/signal.c               |  71 +++++++++--
  arch/mips/kernel/signal32.c             |  71 +++++++++--
  6 files changed, 352 insertions(+), 16 deletions(-)

[...]
diff --git a/arch/mips/include/uapi/asm/sigcontext.h b/arch/mips/include/uapi/asm/sigcontext.h
index 6c9906f..681c176 100644
--- a/arch/mips/include/uapi/asm/sigcontext.h
+++ b/arch/mips/include/uapi/asm/sigcontext.h
@@ -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)
+

How is this going to interact with existing userspace applications?

Is the current behavior to use / manipulate sc_used_math?

How will USEDMATH_MSA interact with existing code?





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux