Skip to content

Commit

Permalink
s390/traps: simplify data exception handler
Browse files Browse the repository at this point in the history
Simplify conditions and remove unnecessary variable in data exception
handler.

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
Vasily Gorbik authored and Heiko Carstens committed Jun 15, 2019
1 parent 39c7dcb commit b4e3133
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions arch/s390/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,11 @@ void vector_exception(struct pt_regs *regs)

void data_exception(struct pt_regs *regs)
{
int signal = 0;

save_fpu_regs();
if (current->thread.fpu.fpc & FPC_DXC_MASK)
signal = SIGFPE;
else
signal = SIGILL;
if (signal == SIGFPE)
do_fp_trap(regs, current->thread.fpu.fpc);
else if (signal)
do_trap(regs, signal, ILL_ILLOPN, "data exception");
else
do_trap(regs, SIGILL, ILL_ILLOPN, "data exception");
}

void space_switch_exception(struct pt_regs *regs)
Expand Down

0 comments on commit b4e3133

Please sign in to comment.