diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-25 20:37:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-25 20:37:33 -0400 |
commit | 2f7c3a18a2dc79ddf7b83ae199b099a675e1adb2 (patch) | |
tree | c43795eb48dc102b25ef2bfd78dfc075ff93feaa /arch/x86/entry | |
parent | f89eae4ee7e075e576bd4b4d2db901023421a3be (diff) | |
parent | dc4fac84f8e66b147921ebdc385e767d5def7422 (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"Misc fixes: EFI, entry code, pkeys and MPX fixes, TASK_SIZE cleanups
and a tsc frequency table fix"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Switch from TASK_SIZE to TASK_SIZE_MAX in the page fault code
x86/fsgsbase/64: Use TASK_SIZE_MAX for FSBASE/GSBASE upper limits
x86/mm/mpx: Work around MPX erratum SKD046
x86/entry/64: Fix stack return address retrieval in thunk
x86/efi: Fix 7-parameter efi_call()s
x86/cpufeature, x86/mm/pkeys: Fix broken compile-time disabling of pkeys
x86/tsc: Add missing Cherrytrail frequency to the table
Diffstat (limited to 'arch/x86/entry')
-rw-r--r-- | arch/x86/entry/thunk_64.S | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S index 98df1fa8825c..027aec4a74df 100644 --- a/arch/x86/entry/thunk_64.S +++ b/arch/x86/entry/thunk_64.S | |||
@@ -8,16 +8,15 @@ | |||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include "calling.h" | 9 | #include "calling.h" |
10 | #include <asm/asm.h> | 10 | #include <asm/asm.h> |
11 | #include <asm/frame.h> | ||
12 | 11 | ||
13 | /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ | 12 | /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ |
14 | .macro THUNK name, func, put_ret_addr_in_rdi=0 | 13 | .macro THUNK name, func, put_ret_addr_in_rdi=0 |
15 | .globl \name | 14 | .globl \name |
16 | .type \name, @function | 15 | .type \name, @function |
17 | \name: | 16 | \name: |
18 | FRAME_BEGIN | 17 | pushq %rbp |
18 | movq %rsp, %rbp | ||
19 | 19 | ||
20 | /* this one pushes 9 elems, the next one would be %rIP */ | ||
21 | pushq %rdi | 20 | pushq %rdi |
22 | pushq %rsi | 21 | pushq %rsi |
23 | pushq %rdx | 22 | pushq %rdx |
@@ -29,8 +28,8 @@ | |||
29 | pushq %r11 | 28 | pushq %r11 |
30 | 29 | ||
31 | .if \put_ret_addr_in_rdi | 30 | .if \put_ret_addr_in_rdi |
32 | /* 9*8(%rsp) is return addr on stack */ | 31 | /* 8(%rbp) is return addr on stack */ |
33 | movq 9*8(%rsp), %rdi | 32 | movq 8(%rbp), %rdi |
34 | .endif | 33 | .endif |
35 | 34 | ||
36 | call \func | 35 | call \func |
@@ -65,7 +64,7 @@ restore: | |||
65 | popq %rdx | 64 | popq %rdx |
66 | popq %rsi | 65 | popq %rsi |
67 | popq %rdi | 66 | popq %rdi |
68 | FRAME_END | 67 | popq %rbp |
69 | ret | 68 | ret |
70 | _ASM_NOKPROBE(restore) | 69 | _ASM_NOKPROBE(restore) |
71 | #endif | 70 | #endif |