linux/arch/mips
Paul Burton 9791554b45 MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS
Userland code may be built using an ABI which permits linking to objects
that have more restrictive floating point requirements. For example,
userland code may be built to target the O32 FPXX ABI. Such code may be
linked with other FPXX code, or code built for either one of the more
restrictive FP32 or FP64. When linking with more restrictive code, the
overall requirement of the process becomes that of the more restrictive
code. The kernel has no way to know in advance which mode the process
will need to be executed in, and indeed it may need to change during
execution. The dynamic loader is the only code which will know the
overall required mode, and so it needs to have a means to instruct the
kernel to switch the FP mode of the process.

This patch introduces 2 new options to the prctl syscall which provide
such a capability. The FP mode of the process is represented as a
simple bitmask combining a number of mode bits mirroring those present
in the hardware. Userland can either retrieve the current FP mode of
the process:

  mode = prctl(PR_GET_FP_MODE);

or modify the current FP mode of the process:

  err = prctl(PR_SET_FP_MODE, new_mode);

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Matthew Fortune <matthew.fortune@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8899/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-02-12 12:30:29 +01:00
..
alchemy Please consider pulling the clk framework changes toward 3.19. It is 2014-12-20 16:42:36 -08:00
ar7
ath25 MIPS: ath25: add Wireless device support 2014-11-24 07:45:29 +01:00
ath79 MIPS: ath79: Read the initrd address from the firmware environment 2014-11-24 07:45:30 +01:00
bcm47xx MIPS: BCM47XX: Clean up nvram header 2014-11-24 07:45:08 +01:00
bcm63xx
bcm3384 MIPS: bcm3384: Initial commit of bcm3384 platform support 2014-11-24 07:45:13 +01:00
boot MIPS: elf2ecoff: Fix warning due to dead code. 2015-02-04 14:42:27 +01:00
cavium-octeon USB patches for 3.19-rc1 2014-12-14 14:57:16 -08:00
cobalt
configs PM: Eliminate CONFIG_PM_RUNTIME 2014-12-19 22:55:06 +01:00
dec
emma
fw MIPS: ARC: Use __noreturn / unreachable in ARC termination functions. 2015-01-13 16:04:27 +01:00
include MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS 2015-02-12 12:30:29 +01:00
jazz
jz4740 MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
kernel MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS 2015-02-12 12:30:29 +01:00
kvm
lantiq Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
lasat
lib MIPS: lib: memset: Clean up some MIPS{EL,EB} ifdefery 2014-11-24 07:45:42 +01:00
loongson Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
loongson1 MIPS: Loongson1B: Add a clockevent/clocksource using PWM Timer 2014-11-24 07:45:09 +01:00
math-emu MIPS: Support for hybrid FPRs 2014-11-24 07:45:07 +01:00
mm kernel: Provide READ_ONCE and ASSIGN_ONCE 2014-12-20 16:48:59 -08:00
mti-malta MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
mti-sead3 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
net mips: bpf: Fix broken BPF_MOD 2014-12-08 20:22:30 -05:00
netlogic
oprofile MIPS: oprofile: Backtrace: don't fail on leaf functions 2014-11-24 07:45:31 +01:00
paravirt
pci MIPS: Add struct pci_ops member names to initialization 2015-01-16 15:04:38 +01:00
pmcs-msp71xx
pnx833x
power
ralink Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rb532 MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
sgi-ip22
sgi-ip27 MIPS: IP27: Use __noreturn instead of open coded attributes in declarations. 2015-01-13 16:04:28 +01:00
sgi-ip32 MIPS: IP32: Use __noreturn instead of open coded attributes in declarations. 2015-01-13 16:04:28 +01:00
sibyte MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
sni
txx9 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vr41xx
Kbuild
Kbuild.platforms MIPS: ath25: add common parts 2014-11-24 07:45:26 +01:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
Kconfig.debug MIPS: Kconfig option to better exercise/debug hybrid FPRs 2014-11-24 07:45:08 +01:00
Makefile MIPS: IP22/IP32: Add line to arch/mips/Makefile archhelp about vmlinux.32 2014-11-24 07:45:33 +01:00