diff options
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 89434d439605..09e7145484c5 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -64,32 +64,6 @@ | |||
64 | #ifdef CONFIG_FTRACE | 64 | #ifdef CONFIG_FTRACE |
65 | #ifdef CONFIG_DYNAMIC_FTRACE | 65 | #ifdef CONFIG_DYNAMIC_FTRACE |
66 | ENTRY(mcount) | 66 | ENTRY(mcount) |
67 | |||
68 | subq $0x38, %rsp | ||
69 | movq %rax, (%rsp) | ||
70 | movq %rcx, 8(%rsp) | ||
71 | movq %rdx, 16(%rsp) | ||
72 | movq %rsi, 24(%rsp) | ||
73 | movq %rdi, 32(%rsp) | ||
74 | movq %r8, 40(%rsp) | ||
75 | movq %r9, 48(%rsp) | ||
76 | |||
77 | movq 0x38(%rsp), %rdi | ||
78 | subq $MCOUNT_INSN_SIZE, %rdi | ||
79 | |||
80 | .globl mcount_call | ||
81 | mcount_call: | ||
82 | call ftrace_stub | ||
83 | |||
84 | movq 48(%rsp), %r9 | ||
85 | movq 40(%rsp), %r8 | ||
86 | movq 32(%rsp), %rdi | ||
87 | movq 24(%rsp), %rsi | ||
88 | movq 16(%rsp), %rdx | ||
89 | movq 8(%rsp), %rcx | ||
90 | movq (%rsp), %rax | ||
91 | addq $0x38, %rsp | ||
92 | |||
93 | retq | 67 | retq |
94 | END(mcount) | 68 | END(mcount) |
95 | 69 | ||
@@ -275,9 +249,9 @@ ENTRY(native_usergs_sysret64) | |||
275 | ENTRY(ret_from_fork) | 249 | ENTRY(ret_from_fork) |
276 | CFI_DEFAULT_STACK | 250 | CFI_DEFAULT_STACK |
277 | push kernel_eflags(%rip) | 251 | push kernel_eflags(%rip) |
278 | CFI_ADJUST_CFA_OFFSET 4 | 252 | CFI_ADJUST_CFA_OFFSET 8 |
279 | popf # reset kernel eflags | 253 | popf # reset kernel eflags |
280 | CFI_ADJUST_CFA_OFFSET -4 | 254 | CFI_ADJUST_CFA_OFFSET -8 |
281 | call schedule_tail | 255 | call schedule_tail |
282 | GET_THREAD_INFO(%rcx) | 256 | GET_THREAD_INFO(%rcx) |
283 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) | 257 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) |
@@ -667,6 +641,13 @@ END(stub_rt_sigreturn) | |||
667 | SAVE_ARGS | 641 | SAVE_ARGS |
668 | leaq -ARGOFFSET(%rsp),%rdi # arg1 for handler | 642 | leaq -ARGOFFSET(%rsp),%rdi # arg1 for handler |
669 | pushq %rbp | 643 | pushq %rbp |
644 | /* | ||
645 | * Save rbp twice: One is for marking the stack frame, as usual, and the | ||
646 | * other, to fill pt_regs properly. This is because bx comes right | ||
647 | * before the last saved register in that structure, and not bp. If the | ||
648 | * base pointer were in the place bx is today, this would not be needed. | ||
649 | */ | ||
650 | movq %rbp, -8(%rsp) | ||
670 | CFI_ADJUST_CFA_OFFSET 8 | 651 | CFI_ADJUST_CFA_OFFSET 8 |
671 | CFI_REL_OFFSET rbp, 0 | 652 | CFI_REL_OFFSET rbp, 0 |
672 | movq %rsp,%rbp | 653 | movq %rsp,%rbp |
@@ -932,6 +913,9 @@ END(spurious_interrupt) | |||
932 | .if \ist | 913 | .if \ist |
933 | movq %gs:pda_data_offset, %rbp | 914 | movq %gs:pda_data_offset, %rbp |
934 | .endif | 915 | .endif |
916 | .if \irqtrace | ||
917 | TRACE_IRQS_OFF | ||
918 | .endif | ||
935 | movq %rsp,%rdi | 919 | movq %rsp,%rdi |
936 | movq ORIG_RAX(%rsp),%rsi | 920 | movq ORIG_RAX(%rsp),%rsi |
937 | movq $-1,ORIG_RAX(%rsp) | 921 | movq $-1,ORIG_RAX(%rsp) |
@@ -1058,7 +1042,8 @@ KPROBE_ENTRY(error_entry) | |||
1058 | je error_kernelspace | 1042 | je error_kernelspace |
1059 | error_swapgs: | 1043 | error_swapgs: |
1060 | SWAPGS | 1044 | SWAPGS |
1061 | error_sti: | 1045 | error_sti: |
1046 | TRACE_IRQS_OFF | ||
1062 | movq %rdi,RDI(%rsp) | 1047 | movq %rdi,RDI(%rsp) |
1063 | CFI_REL_OFFSET rdi,RDI | 1048 | CFI_REL_OFFSET rdi,RDI |
1064 | movq %rsp,%rdi | 1049 | movq %rsp,%rdi |
@@ -1232,7 +1217,7 @@ ENTRY(simd_coprocessor_error) | |||
1232 | END(simd_coprocessor_error) | 1217 | END(simd_coprocessor_error) |
1233 | 1218 | ||
1234 | ENTRY(device_not_available) | 1219 | ENTRY(device_not_available) |
1235 | zeroentry math_state_restore | 1220 | zeroentry do_device_not_available |
1236 | END(device_not_available) | 1221 | END(device_not_available) |
1237 | 1222 | ||
1238 | /* runs on exception stack */ | 1223 | /* runs on exception stack */ |