diff options
author | Andi Kleen <ak@muc.de> | 2005-04-03 18:19:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-03 18:19:34 -0700 |
commit | 607899e17218b485a021c6ebb1cff771fd690eec (patch) | |
tree | 16629afbabf7a5b712d48f31b8bfe59c907b3e5a | |
parent | d21ca622e8b80559aba9c012905aa77d1ce13ee8 (diff) |
[PATCH] x86_64: Fix segment constraints
Use a register target for segment register saving
Pointed out by H.J.Lu
-rw-r--r-- | arch/x86_64/kernel/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 171931ea7eaae..9922d2ba24a37 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -483,7 +483,7 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * */ { unsigned fsindex; - asm volatile("movl %%fs,%0" : "=g" (fsindex)); + asm volatile("movl %%fs,%0" : "=r" (fsindex)); /* segment register != 0 always requires a reload. also reload when it has changed. when prev process used 64bit base always reload @@ -504,7 +504,7 @@ struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct * } { unsigned gsindex; - asm volatile("movl %%gs,%0" : "=g" (gsindex)); + asm volatile("movl %%gs,%0" : "=r" (gsindex)); if (unlikely(gsindex | next->gsindex | prev->gs)) { load_gs_index(next->gsindex); if (gsindex) |