diff options
author | Tejun Heo <tj@kernel.org> | 2009-02-09 22:17:39 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-10 00:39:14 +0100 |
commit | d315760ffa261c15ff92699ac6f514112543d7ca (patch) | |
tree | 3f7d185cf97a06e6686521a23a1c78d1809a51c4 /arch/x86/include/asm/math_emu.h | |
parent | ae6af41f5a4841f06eb92bc86ad020ad44ae2a30 (diff) | |
download | blackbird-op-linux-d315760ffa261c15ff92699ac6f514112543d7ca.tar.gz blackbird-op-linux-d315760ffa261c15ff92699ac6f514112543d7ca.zip |
x86: fix math_emu register frame access
do_device_not_available() is the handler for #NM and it declares that
it takes a unsigned long and calls math_emu(), which takes a long
argument and surprisingly expects the stack frame starting at the zero
argument would match struct math_emu_info, which isn't true regardless
of configuration in the current code.
This patch makes do_device_not_available() take struct pt_regs like
other exception handlers and initialize struct math_emu_info with
pointer to it and pass pointer to the math_emu_info to math_emulate()
like normal C functions do. This way, unless gcc makes a copy of
struct pt_regs in do_device_not_available(), the register frame is
correctly accessed regardless of kernel configuration or compiler
used.
This doesn't fix all math_emu problems but it at least gets it
somewhat working.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/math_emu.h')
-rw-r--r-- | arch/x86/include/asm/math_emu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/math_emu.h b/arch/x86/include/asm/math_emu.h index 302492c77956..031f6266f425 100644 --- a/arch/x86/include/asm/math_emu.h +++ b/arch/x86/include/asm/math_emu.h @@ -11,8 +11,8 @@ struct math_emu_info { long ___orig_eip; union { - struct pt_regs regs; - struct kernel_vm86_regs vm86; + struct pt_regs *regs; + struct kernel_vm86_regs *vm86; }; }; #endif /* _ASM_X86_MATH_EMU_H */ |