diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-06-11 02:57:42 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-06-11 02:57:42 -0400 |
commit | d3efbdd6c5e8c823b732df26a355ec931ccab374 (patch) | |
tree | 097cd487ffc3005ca4d1deabf01a3f3562609438 /arch/sh/math-emu/math.c | |
parent | a1e2833d13db6c2f0456b20338f66c0b248f5367 (diff) |
sh: Fix up the math-emu build.
math-emu wasn't converted for the trap_no/errno_code changes,
get it building again.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/math-emu/math.c')
-rw-r--r-- | arch/sh/math-emu/math.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c index a38e1eed9e77..ac2d7abd2567 100644 --- a/arch/sh/math-emu/math.c +++ b/arch/sh/math-emu/math.c | |||
@@ -507,6 +507,7 @@ static int ieee_fpe_handler(struct pt_regs *regs) | |||
507 | unsigned short insn = *(unsigned short *)regs->pc; | 507 | unsigned short insn = *(unsigned short *)regs->pc; |
508 | unsigned short finsn; | 508 | unsigned short finsn; |
509 | unsigned long nextpc; | 509 | unsigned long nextpc; |
510 | siginfo_t info; | ||
510 | int nib[4] = { | 511 | int nib[4] = { |
511 | (insn >> 12) & 0xf, | 512 | (insn >> 12) & 0xf, |
512 | (insn >> 8) & 0xf, | 513 | (insn >> 8) & 0xf, |
@@ -559,9 +560,11 @@ static int ieee_fpe_handler(struct pt_regs *regs) | |||
559 | ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); | 560 | ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); |
560 | set_tsk_thread_flag(tsk, TIF_USEDFPU); | 561 | set_tsk_thread_flag(tsk, TIF_USEDFPU); |
561 | } else { | 562 | } else { |
562 | tsk->thread.trap_no = 11; | 563 | info.si_signo = SIGFPE; |
563 | tsk->thread.error_code = 0; | 564 | info.si_errno = 0; |
564 | force_sig(SIGFPE, tsk); | 565 | info.si_code = FPE_FLTINV; |
566 | info.si_addr = (void __user *)regs->pc; | ||
567 | force_sig_info(SIGFPE, &info, tsk); | ||
565 | } | 568 | } |
566 | 569 | ||
567 | regs->pc = nextpc; | 570 | regs->pc = nextpc; |
@@ -576,14 +579,17 @@ asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5, | |||
576 | struct pt_regs regs) | 579 | struct pt_regs regs) |
577 | { | 580 | { |
578 | struct task_struct *tsk = current; | 581 | struct task_struct *tsk = current; |
582 | siginfo_t info; | ||
579 | 583 | ||
580 | if (ieee_fpe_handler (®s)) | 584 | if (ieee_fpe_handler (®s)) |
581 | return; | 585 | return; |
582 | 586 | ||
583 | regs.pc += 2; | 587 | regs.pc += 2; |
584 | tsk->thread.trap_no = 11; | 588 | info.si_signo = SIGFPE; |
585 | tsk->thread.error_code = 0; | 589 | info.si_errno = 0; |
586 | force_sig(SIGFPE, tsk); | 590 | info.si_code = FPE_FLTINV; |
591 | info.si_addr = (void __user *)regs.pc; | ||
592 | force_sig_info(SIGFPE, &info, tsk); | ||
587 | } | 593 | } |
588 | 594 | ||
589 | /** | 595 | /** |