diff options
author | Rob Gardner <rob.gardner@oracle.com> | 2015-10-30 22:36:23 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-04 15:00:49 -0500 |
commit | cae9af6a820b47d3e5e0da4edf23cf6fa69b18d8 (patch) | |
tree | 2fbeac9dfdcb152b65dda84aaf7331d53a291bce /arch/sparc/include/asm | |
parent | d618382ba5f1a4905db63f4980bf7b0a5826de9d (diff) | |
download | linux-stable-cae9af6a820b47d3e5e0da4edf23cf6fa69b18d8.tar.gz linux-stable-cae9af6a820b47d3e5e0da4edf23cf6fa69b18d8.tar.bz2 linux-stable-cae9af6a820b47d3e5e0da4edf23cf6fa69b18d8.zip |
sparc64: Don't restrict fp regs for no-fault loads
The function handle_ldf_stq() deals with no-fault ASI
loads and stores, but restricts fp registers to quad
word regs (ie, %f0, %f4 etc). This is valid for the
STQ case, but unnecessarily restricts loads, which
may be single precision, double, or quad. This results
in SIGFPE being raised for this instruction when the
source address is invalid:
ldda [%g1] ASI_PNF, %f2
but not for this one:
ldda [%g1] ASI_PNF, %f4
The validation check for quad register is moved to
within the STQ block so that loads are not affected
by the check.
An additional problem is that the calculation for freg
is incorrect when a single precision load is being
handled. This causes %f1 to be seen as %f32 etc,
and the incorrect register ends up being overwritten.
This code sequence demonstrates the problem:
ldd [%g1], %f32 ! g1 = valid address
lda [%i3] ASI_PNF, %f1 ! i3 = invalid address
std %f32, [%g1]
This is corrected by basing the freg calculation on
the load size.
Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm')
0 files changed, 0 insertions, 0 deletions