aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/ia32/ia32entry.S6
-rw-r--r--arch/x86/include/asm/calling.h8
-rw-r--r--arch/x86/kernel/entry_64.S2
3 files changed, 7 insertions, 9 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index c1870dddd322..c5435dcea15c 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -143,7 +143,7 @@ ENTRY(ia32_sysenter_target)
143 CFI_REL_OFFSET rip,0 143 CFI_REL_OFFSET rip,0
144 pushq_cfi %rax 144 pushq_cfi %rax
145 cld 145 cld
146 SAVE_ARGS 0,0,1 146 SAVE_ARGS 0,1,0
147 /* no need to do an access_ok check here because rbp has been 147 /* no need to do an access_ok check here because rbp has been
148 32bit zero extended */ 148 32bit zero extended */
1491: movl (%rbp),%ebp 1491: movl (%rbp),%ebp
@@ -289,7 +289,7 @@ ENTRY(ia32_cstar_target)
289 * disabled irqs and here we enable it straight after entry: 289 * disabled irqs and here we enable it straight after entry:
290 */ 290 */
291 ENABLE_INTERRUPTS(CLBR_NONE) 291 ENABLE_INTERRUPTS(CLBR_NONE)
292 SAVE_ARGS 8,1,1 292 SAVE_ARGS 8,0,0
293 movl %eax,%eax /* zero extension */ 293 movl %eax,%eax /* zero extension */
294 movq %rax,ORIG_RAX-ARGOFFSET(%rsp) 294 movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
295 movq %rcx,RIP-ARGOFFSET(%rsp) 295 movq %rcx,RIP-ARGOFFSET(%rsp)
@@ -419,7 +419,7 @@ ENTRY(ia32_syscall)
419 cld 419 cld
420 /* note the registers are not zero extended to the sf. 420 /* note the registers are not zero extended to the sf.
421 this could be a problem. */ 421 this could be a problem. */
422 SAVE_ARGS 0,0,1 422 SAVE_ARGS 0,1,0
423 GET_THREAD_INFO(%r10) 423 GET_THREAD_INFO(%r10)
424 orl $TS_COMPAT,TI_status(%r10) 424 orl $TS_COMPAT,TI_status(%r10)
425 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) 425 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10)
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h
index b67e06c4710e..b0b7d90d3054 100644
--- a/arch/x86/include/asm/calling.h
+++ b/arch/x86/include/asm/calling.h
@@ -85,22 +85,20 @@ For 32-bit we have the following conventions - kernel is built with
85#define ARGOFFSET R11 85#define ARGOFFSET R11
86#define SWFRAME ORIG_RAX 86#define SWFRAME ORIG_RAX
87 87
88 .macro SAVE_ARGS addskip=0, norcx=0, nor891011=0 88 .macro SAVE_ARGS addskip=0, save_rcx=1, save_r891011=1
89 subq $9*8+\addskip, %rsp 89 subq $9*8+\addskip, %rsp
90 CFI_ADJUST_CFA_OFFSET 9*8+\addskip 90 CFI_ADJUST_CFA_OFFSET 9*8+\addskip
91 movq_cfi rdi, 8*8 91 movq_cfi rdi, 8*8
92 movq_cfi rsi, 7*8 92 movq_cfi rsi, 7*8
93 movq_cfi rdx, 6*8 93 movq_cfi rdx, 6*8
94 94
95 .if \norcx 95 .if \save_rcx
96 .else
97 movq_cfi rcx, 5*8 96 movq_cfi rcx, 5*8
98 .endif 97 .endif
99 98
100 movq_cfi rax, 4*8 99 movq_cfi rax, 4*8
101 100
102 .if \nor891011 101 .if \save_r891011
103 .else
104 movq_cfi r8, 3*8 102 movq_cfi r8, 3*8
105 movq_cfi r9, 2*8 103 movq_cfi r9, 2*8
106 movq_cfi r10, 1*8 104 movq_cfi r10, 1*8
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 8a445a0c989e..e5ece6b6e716 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -473,7 +473,7 @@ ENTRY(system_call_after_swapgs)
473 * and short: 473 * and short:
474 */ 474 */
475 ENABLE_INTERRUPTS(CLBR_NONE) 475 ENABLE_INTERRUPTS(CLBR_NONE)
476 SAVE_ARGS 8,1 476 SAVE_ARGS 8,0
477 movq %rax,ORIG_RAX-ARGOFFSET(%rsp) 477 movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
478 movq %rcx,RIP-ARGOFFSET(%rsp) 478 movq %rcx,RIP-ARGOFFSET(%rsp)
479 CFI_REL_OFFSET rip,RIP-ARGOFFSET 479 CFI_REL_OFFSET rip,RIP-ARGOFFSET