aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin LaHaise <bcrl@kvack.org>2006-01-11 16:43:15 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:04:50 -0500
commit60917a3832547886549962ab9ee753253cf5e44c (patch)
treebf3726a5b0e238784ef6857a505fec5c16dcbee0
parent6e3fbee5f11a8135109b08bfcbc05a29eb4eabe8 (diff)
[PATCH] x86_64: don't save eflags in x86-64 switch_to()
As discussed, the flags register on x86-64 is saved and restored by the assembly code which sets up struct pt_regs, so we do not need to save and restore it in the inline assembler which already informs gcc that we're clobbering the flags. This patch has been sanity booted and works okay here. Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-x86_64/system.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h
index 1200ea2ea12f..a3bca7552e14 100644
--- a/include/asm-x86_64/system.h
+++ b/include/asm-x86_64/system.h
@@ -20,8 +20,8 @@
20#define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t" 20#define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
21 21
22/* frame pointer must be last for get_wchan */ 22/* frame pointer must be last for get_wchan */
23#define SAVE_CONTEXT "pushfq ; pushq %%rbp ; movq %%rsi,%%rbp\n\t" 23#define SAVE_CONTEXT "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
24#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popfq\n\t" 24#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
25 25
26#define __EXTRA_CLOBBER \ 26#define __EXTRA_CLOBBER \
27 ,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15" 27 ,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"