diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-06-25 00:19:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 13:10:25 +0200 |
commit | ada857082317e6883cfcf7deb4e0c54d3c447cb0 (patch) | |
tree | 0c87da9f4d6a1a96aa770ba6c54a80cfa088f9d2 /arch/x86/kernel/cpu/common_64.c | |
parent | af2b1c609ff52b6469d8e67696db98c93c348b0e (diff) | |
download | linux-ada857082317e6883cfcf7deb4e0c54d3c447cb0.tar.gz linux-ada857082317e6883cfcf7deb4e0c54d3c447cb0.tar.bz2 linux-ada857082317e6883cfcf7deb4e0c54d3c447cb0.zip |
x86: remove open-coded save/load segment operations
This removes a pile of buggy open-coded implementations of savesegment
and loadsegment.
(They are buggy because they don't have memory barriers to prevent
them from being reordered with respect to memory accesses.)
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/common_64.c')
-rw-r--r-- | arch/x86/kernel/cpu/common_64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index 39eaefbcec06..751850235291 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c @@ -480,7 +480,8 @@ void pda_init(int cpu) struct x8664_pda *pda = cpu_pda(cpu); /* Setup up data that may be needed in __get_free_pages early */ - asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); + loadsegment(fs, 0); + loadsegment(gs, 0); /* Memory clobbers used to order PDA accessed */ mb(); wrmsrl(MSR_GS_BASE, pda); |