Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113556
b: refs/heads/master
c: a28680b
h: refs/heads/master
v: v3
  • Loading branch information
Alexander van Heukelum authored and Ingo Molnar committed Oct 13, 2008
1 parent 1664106 commit fca21af
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fcbede3fdfbd83d8de97296286f5a9ff5a8f371
refs/heads/master: a28680b4b821a262fd3b5e57a28c148b5f9e662a
36 changes: 21 additions & 15 deletions trunk/arch/x86/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,18 +452,12 @@ static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr)
* the correct behaviour even in the presence of the asynchronous
* IRQ13 behaviour
*/
asmlinkage void do_coprocessor_error(struct pt_regs *regs)
void math_error(void __user *ip)
{
void __user *ip = (void __user *)(regs->ip);
struct task_struct *task;
siginfo_t info;
unsigned short cwd, swd;

conditional_sti(regs);
if (!user_mode(regs) &&
kernel_math_error(regs, "kernel x87 math error", 16))
return;

/*
* Save the info for the exception handler and clear the error.
*/
Expand Down Expand Up @@ -516,23 +510,26 @@ asmlinkage void do_coprocessor_error(struct pt_regs *regs)
force_sig_info(SIGFPE, &info, task);
}

asmlinkage void do_coprocessor_error(struct pt_regs *regs, long error_code)
{
conditional_sti(regs);
if (!user_mode(regs) &&
kernel_math_error(regs, "kernel x87 math error", 16))
return;
math_error((void __user *)regs->ip);
}

asmlinkage void bad_intr(void)
{
printk("bad interrupt");
}

asmlinkage void do_simd_coprocessor_error(struct pt_regs *regs)
static void simd_math_error(void __user *ip)
{
void __user *ip = (void __user *)(regs->ip);
struct task_struct *task;
siginfo_t info;
unsigned short mxcsr;

conditional_sti(regs);
if (!user_mode(regs) &&
kernel_math_error(regs, "kernel simd math error", 19))
return;

/*
* Save the info for the exception handler and clear the error.
*/
Expand Down Expand Up @@ -575,7 +572,16 @@ asmlinkage void do_simd_coprocessor_error(struct pt_regs *regs)
force_sig_info(SIGFPE, &info, task);
}

asmlinkage void do_spurious_interrupt_bug(struct pt_regs *regs)
asmlinkage void do_simd_coprocessor_error(struct pt_regs *regs, long error_code)
{
conditional_sti(regs);
if (!user_mode(regs) &&
kernel_math_error(regs, "kernel simd math error", 19))
return;
simd_math_error((void __user *)regs->ip);
}

asmlinkage void do_spurious_interrupt_bug(struct pt_regs *regs, long error_code)
{
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/include/asm-x86/traps.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ asmlinkage void double_fault(void);
asmlinkage void do_int3(struct pt_regs *, long);
asmlinkage void do_stack_segment(struct pt_regs *, long);
asmlinkage void do_debug(struct pt_regs *, unsigned long);
asmlinkage void do_coprocessor_error(struct pt_regs *);
asmlinkage void do_simd_coprocessor_error(struct pt_regs *);
asmlinkage void do_spurious_interrupt_bug(struct pt_regs *);
asmlinkage void do_coprocessor_error(struct pt_regs *, long);
asmlinkage void do_simd_coprocessor_error(struct pt_regs *, long);
asmlinkage void do_spurious_interrupt_bug(struct pt_regs *, long);

asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);

Expand Down

0 comments on commit fca21af

Please sign in to comment.