Commit 7252c4c3 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar

x86/entry/32: Rename 'error_code' to 'common_exception'

The 'error_code' label is awkwardly named, especially when it shows up
in a stack trace.  Move it to its own local function and rename it to
'common_exception', analagous to the existing 'common_interrupt'.

This also makes related stack traces more sensible.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nilay Vaish <nilayvaish@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/cca1734a93e52799556d946281b32468f9b93950.1474480779.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 1b00255f
...@@ -529,7 +529,7 @@ restore_all: ...@@ -529,7 +529,7 @@ restore_all:
ENTRY(iret_exc ) ENTRY(iret_exc )
pushl $0 # no error code pushl $0 # no error code
pushl $do_iret_error pushl $do_iret_error
jmp error_code jmp common_exception
.previous .previous
_ASM_EXTABLE(.Lirq_return, iret_exc) _ASM_EXTABLE(.Lirq_return, iret_exc)
...@@ -660,7 +660,7 @@ ENTRY(coprocessor_error) ...@@ -660,7 +660,7 @@ ENTRY(coprocessor_error)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_coprocessor_error pushl $do_coprocessor_error
jmp error_code jmp common_exception
END(coprocessor_error) END(coprocessor_error)
ENTRY(simd_coprocessor_error) ENTRY(simd_coprocessor_error)
...@@ -674,14 +674,14 @@ ENTRY(simd_coprocessor_error) ...@@ -674,14 +674,14 @@ ENTRY(simd_coprocessor_error)
#else #else
pushl $do_simd_coprocessor_error pushl $do_simd_coprocessor_error
#endif #endif
jmp error_code jmp common_exception
END(simd_coprocessor_error) END(simd_coprocessor_error)
ENTRY(device_not_available) ENTRY(device_not_available)
ASM_CLAC ASM_CLAC
pushl $-1 # mark this as an int pushl $-1 # mark this as an int
pushl $do_device_not_available pushl $do_device_not_available
jmp error_code jmp common_exception
END(device_not_available) END(device_not_available)
#ifdef CONFIG_PARAVIRT #ifdef CONFIG_PARAVIRT
...@@ -695,59 +695,59 @@ ENTRY(overflow) ...@@ -695,59 +695,59 @@ ENTRY(overflow)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_overflow pushl $do_overflow
jmp error_code jmp common_exception
END(overflow) END(overflow)
ENTRY(bounds) ENTRY(bounds)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_bounds pushl $do_bounds
jmp error_code jmp common_exception
END(bounds) END(bounds)
ENTRY(invalid_op) ENTRY(invalid_op)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_invalid_op pushl $do_invalid_op
jmp error_code jmp common_exception
END(invalid_op) END(invalid_op)
ENTRY(coprocessor_segment_overrun) ENTRY(coprocessor_segment_overrun)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_coprocessor_segment_overrun pushl $do_coprocessor_segment_overrun
jmp error_code jmp common_exception
END(coprocessor_segment_overrun) END(coprocessor_segment_overrun)
ENTRY(invalid_TSS) ENTRY(invalid_TSS)
ASM_CLAC ASM_CLAC
pushl $do_invalid_TSS pushl $do_invalid_TSS
jmp error_code jmp common_exception
END(invalid_TSS) END(invalid_TSS)
ENTRY(segment_not_present) ENTRY(segment_not_present)
ASM_CLAC ASM_CLAC
pushl $do_segment_not_present pushl $do_segment_not_present
jmp error_code jmp common_exception
END(segment_not_present) END(segment_not_present)
ENTRY(stack_segment) ENTRY(stack_segment)
ASM_CLAC ASM_CLAC
pushl $do_stack_segment pushl $do_stack_segment
jmp error_code jmp common_exception
END(stack_segment) END(stack_segment)
ENTRY(alignment_check) ENTRY(alignment_check)
ASM_CLAC ASM_CLAC
pushl $do_alignment_check pushl $do_alignment_check
jmp error_code jmp common_exception
END(alignment_check) END(alignment_check)
ENTRY(divide_error) ENTRY(divide_error)
ASM_CLAC ASM_CLAC
pushl $0 # no error code pushl $0 # no error code
pushl $do_divide_error pushl $do_divide_error
jmp error_code jmp common_exception
END(divide_error) END(divide_error)
#ifdef CONFIG_X86_MCE #ifdef CONFIG_X86_MCE
...@@ -755,7 +755,7 @@ ENTRY(machine_check) ...@@ -755,7 +755,7 @@ ENTRY(machine_check)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl machine_check_vector pushl machine_check_vector
jmp error_code jmp common_exception
END(machine_check) END(machine_check)
#endif #endif
...@@ -763,7 +763,7 @@ ENTRY(spurious_interrupt_bug) ...@@ -763,7 +763,7 @@ ENTRY(spurious_interrupt_bug)
ASM_CLAC ASM_CLAC
pushl $0 pushl $0
pushl $do_spurious_interrupt_bug pushl $do_spurious_interrupt_bug
jmp error_code jmp common_exception
END(spurious_interrupt_bug) END(spurious_interrupt_bug)
#ifdef CONFIG_XEN #ifdef CONFIG_XEN
...@@ -1028,7 +1028,7 @@ return_to_handler: ...@@ -1028,7 +1028,7 @@ return_to_handler:
ENTRY(trace_page_fault) ENTRY(trace_page_fault)
ASM_CLAC ASM_CLAC
pushl $trace_do_page_fault pushl $trace_do_page_fault
jmp error_code jmp common_exception
END(trace_page_fault) END(trace_page_fault)
#endif #endif
...@@ -1036,7 +1036,10 @@ ENTRY(page_fault) ...@@ -1036,7 +1036,10 @@ ENTRY(page_fault)
ASM_CLAC ASM_CLAC
pushl $do_page_fault pushl $do_page_fault
ALIGN ALIGN
error_code: jmp common_exception
END(page_fault)
common_exception:
/* the function address is in %gs's slot on the stack */ /* the function address is in %gs's slot on the stack */
pushl %fs pushl %fs
pushl %es pushl %es
...@@ -1065,7 +1068,7 @@ error_code: ...@@ -1065,7 +1068,7 @@ error_code:
movl %esp, %eax # pt_regs pointer movl %esp, %eax # pt_regs pointer
call *%edi call *%edi
jmp ret_from_exception jmp ret_from_exception
END(page_fault) END(common_exception)
ENTRY(debug) ENTRY(debug)
/* /*
...@@ -1182,14 +1185,14 @@ END(int3) ...@@ -1182,14 +1185,14 @@ END(int3)
ENTRY(general_protection) ENTRY(general_protection)
pushl $do_general_protection pushl $do_general_protection
jmp error_code jmp common_exception
END(general_protection) END(general_protection)
#ifdef CONFIG_KVM_GUEST #ifdef CONFIG_KVM_GUEST
ENTRY(async_page_fault) ENTRY(async_page_fault)
ASM_CLAC ASM_CLAC
pushl $do_async_page_fault pushl $do_async_page_fault
jmp error_code jmp common_exception
END(async_page_fault) END(async_page_fault)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment