]> www.infradead.org Git - users/jedix/linux-maple.git/commit
SPARC64: Fix bad FP register calculation
authorRob Gardner <rob.gardner@oracle.com>
Sun, 1 Nov 2015 23:51:34 +0000 (16:51 -0700)
committerAllen Pais <allen.pais@oracle.com>
Tue, 8 Nov 2016 10:18:38 +0000 (15:48 +0530)
commitcd68ca8b0ced6bcbde8d37c59a5906457c7e8fac
tree765f18c7e59b6f223b13f324d9c94b8396151bb0
parentc7a569f4be83c5bd392225ec9c603d7126759f75
SPARC64: Fix bad FP register calculation

An additional problem was found in handle_ldf_stq
after adding the fix for the SIGFPE on no-fault
load.  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] ! %f32 is mangled
This is corrected by basing the freg calculation on
the load size.

Orabug: 24942761

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
arch/sparc/kernel/unaligned_64.c