diff options
author | Alexander van Heukelum <heukelum@fastmail.fm> | 2008-09-09 23:56:02 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-13 12:20:17 +0400 |
commit | 7643e9b936b4af31ba4851eb7d5b3a3bfad52502 (patch) | |
tree | 1443d0d87a7d7c213253b5b46412fa467e21d6c1 /arch/x86/kernel/entry_32.S | |
parent | 12394cf567d509f6ab5d94544e1f414b35286d9e (diff) | |
download | linux-7643e9b936b4af31ba4851eb7d5b3a3bfad52502.tar.xz |
i386: convert hardware exception 7 to an interrupt gate
Handle no coprocessor exception with interrupt initially off.
device_not_available in entry_32.S calls either math_state_restore
or math_emulate. This patch adds an extra indirection to be
able to re-enable interrupts explicitly in traps_32.c
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
-rw-r--r-- | arch/x86/kernel/entry_32.S | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 109792bc7cfa..5a885855fc88 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -760,20 +760,9 @@ ENTRY(device_not_available) RING0_INT_FRAME pushl $-1 # mark this as an int CFI_ADJUST_CFA_OFFSET 4 - SAVE_ALL - GET_CR0_INTO_EAX - testl $0x4, %eax # EM (math emulation bit) - jne device_not_available_emulate - preempt_stop(CLBR_ANY) - call math_state_restore - jmp ret_from_exception -device_not_available_emulate: - pushl $0 # temporary storage for ORIG_EIP + pushl $do_device_not_available CFI_ADJUST_CFA_OFFSET 4 - call math_emulate - addl $4, %esp - CFI_ADJUST_CFA_OFFSET -4 - jmp ret_from_exception + jmp error_code CFI_ENDPROC END(device_not_available) |