aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/entry_32.S
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@fastmail.fm>2008-09-09 15:56:02 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-13 04:20:17 -0400
commit7643e9b936b4af31ba4851eb7d5b3a3bfad52502 (patch)
tree1443d0d87a7d7c213253b5b46412fa467e21d6c1 /arch/x86/kernel/entry_32.S
parent12394cf567d509f6ab5d94544e1f414b35286d9e (diff)
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.S15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 109792bc7cf..5a885855fc8 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -760,20 +760,9 @@ ENTRY(device_not_available)
760 RING0_INT_FRAME 760 RING0_INT_FRAME
761 pushl $-1 # mark this as an int 761 pushl $-1 # mark this as an int
762 CFI_ADJUST_CFA_OFFSET 4 762 CFI_ADJUST_CFA_OFFSET 4
763 SAVE_ALL 763 pushl $do_device_not_available
764 GET_CR0_INTO_EAX
765 testl $0x4, %eax # EM (math emulation bit)
766 jne device_not_available_emulate
767 preempt_stop(CLBR_ANY)
768 call math_state_restore
769 jmp ret_from_exception
770device_not_available_emulate:
771 pushl $0 # temporary storage for ORIG_EIP
772 CFI_ADJUST_CFA_OFFSET 4 764 CFI_ADJUST_CFA_OFFSET 4
773 call math_emulate 765 jmp error_code
774 addl $4, %esp
775 CFI_ADJUST_CFA_OFFSET -4
776 jmp ret_from_exception
777 CFI_ENDPROC 766 CFI_ENDPROC
778END(device_not_available) 767END(device_not_available)
779 768