|
Lines 686-696
Link Here
|
| 686 |
* the correct behaviour even in the presence of the asynchronous |
686 |
* the correct behaviour even in the presence of the asynchronous |
| 687 |
* IRQ13 behaviour |
687 |
* IRQ13 behaviour |
| 688 |
*/ |
688 |
*/ |
| 689 |
void math_error(void *rip) |
689 |
asmlinkage void do_coprocessor_error(struct pt_regs * regs) |
| 690 |
{ |
690 |
{ |
|
|
691 |
void *rip = (void *)regs->rip; |
| 691 |
struct task_struct * task; |
692 |
struct task_struct * task; |
| 692 |
siginfo_t info; |
693 |
siginfo_t info; |
| 693 |
unsigned short cwd, swd; |
694 |
unsigned short cwd, swd; |
|
|
695 |
|
| 696 |
conditional_sti(regs); |
| 697 |
if ((regs->cs & 3) == 0) { |
| 698 |
const struct exception_table_entry *fixup; |
| 699 |
fixup = search_exception_tables(regs->rip); |
| 700 |
if (fixup) { |
| 701 |
regs->rip = fixup->fixup; |
| 702 |
return; |
| 703 |
} |
| 704 |
notify_die(DIE_GPF, "kernel math error", regs, 0, 16, SIGFPE); |
| 705 |
die("kernel math error", regs, 0); |
| 706 |
} |
| 707 |
|
| 694 |
/* |
708 |
/* |
| 695 |
* Save the info for the exception handler and clear the error. |
709 |
* Save the info for the exception handler and clear the error. |
| 696 |
*/ |
710 |
*/ |
|
Lines 740-762
Link Here
|
| 740 |
force_sig_info(SIGFPE, &info, task); |
754 |
force_sig_info(SIGFPE, &info, task); |
| 741 |
} |
755 |
} |
| 742 |
|
756 |
|
| 743 |
asmlinkage void do_coprocessor_error(struct pt_regs * regs) |
|
|
| 744 |
{ |
| 745 |
conditional_sti(regs); |
| 746 |
math_error((void *)regs->rip); |
| 747 |
} |
| 748 |
|
| 749 |
asmlinkage void bad_intr(void) |
757 |
asmlinkage void bad_intr(void) |
| 750 |
{ |
758 |
{ |
| 751 |
printk("bad interrupt"); |
759 |
printk("bad interrupt"); |
| 752 |
} |
760 |
} |
| 753 |
|
761 |
|
| 754 |
static inline void simd_math_error(void *rip) |
762 |
asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs) |
| 755 |
{ |
763 |
{ |
|
|
764 |
void *rip = (void *)regs->rip; |
| 756 |
struct task_struct * task; |
765 |
struct task_struct * task; |
| 757 |
siginfo_t info; |
766 |
siginfo_t info; |
| 758 |
unsigned short mxcsr; |
767 |
unsigned short mxcsr; |
| 759 |
|
768 |
|
|
|
769 |
conditional_sti(regs); |
| 770 |
if ((regs->cs & 3) == 0) { |
| 771 |
const struct exception_table_entry *fixup; |
| 772 |
fixup = search_exception_tables(regs->rip); |
| 773 |
if (fixup) { |
| 774 |
regs->rip = fixup->fixup; |
| 775 |
return; |
| 776 |
} |
| 777 |
notify_die(DIE_GPF, "kernel simd error", regs, 0, 16, SIGFPE); |
| 778 |
die("kernel simd error", regs, 0); |
| 779 |
} |
| 780 |
|
| 760 |
/* |
781 |
/* |
| 761 |
* Save the info for the exception handler and clear the error. |
782 |
* Save the info for the exception handler and clear the error. |
| 762 |
*/ |
783 |
*/ |
|
Lines 799-810
Link Here
|
| 799 |
force_sig_info(SIGFPE, &info, task); |
820 |
force_sig_info(SIGFPE, &info, task); |
| 800 |
} |
821 |
} |
| 801 |
|
822 |
|
| 802 |
asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs) |
|
|
| 803 |
{ |
| 804 |
conditional_sti(regs); |
| 805 |
simd_math_error((void *)regs->rip); |
| 806 |
} |
| 807 |
|
| 808 |
asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs) |
823 |
asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs) |
| 809 |
{ |
824 |
{ |
| 810 |
} |
825 |
} |