From 607899e17218b485a021c6ebb1cff771fd690eec Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 3 Apr 2005 18:19:34 -0700 Subject: [PATCH] x86_64: Fix segment constraints Use a register target for segment register saving Pointed out by H.J.Lu --- arch/x86_64/kernel/process.c | 4 ++-- 1 file 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) -- cgit 1.2.3-korg