Skip to content

Commit

Permalink
s390: fix restore of invalid floating-point-control
Browse files Browse the repository at this point in the history
The fixup of the inline assembly to restore the floating-point-control
register needs to check for instruction address *after* the lfcp
instruction as the specification and data exceptions are suppresssing.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Jul 16, 2014
1 parent 666e68e commit 9f86745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/s390/include/asm/switch_to.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ static inline int restore_fp_ctl(u32 *fpc)
return 0;

asm volatile(
"0: lfpc %1\n"
" la %0,0\n"
" lfpc %1\n"
"0: la %0,0\n"
"1:\n"
EX_TABLE(0b,1b)
: "=d" (rc) : "Q" (*fpc), "0" (-EINVAL));
Expand Down

0 comments on commit 9f86745

Please sign in to comment.