diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-06-25 00:19:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:25 -0400 |
commit | ada857082317e6883cfcf7deb4e0c54d3c447cb0 (patch) | |
tree | 0c87da9f4d6a1a96aa770ba6c54a80cfa088f9d2 /arch/x86/kernel/cpu | |
parent | af2b1c609ff52b6469d8e67696db98c93c348b0e (diff) |
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')
-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) | |||
480 | struct x8664_pda *pda = cpu_pda(cpu); | 480 | struct x8664_pda *pda = cpu_pda(cpu); |
481 | 481 | ||
482 | /* Setup up data that may be needed in __get_free_pages early */ | 482 | /* Setup up data that may be needed in __get_free_pages early */ |
483 | asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); | 483 | loadsegment(fs, 0); |
484 | loadsegment(gs, 0); | ||
484 | /* Memory clobbers used to order PDA accessed */ | 485 | /* Memory clobbers used to order PDA accessed */ |
485 | mb(); | 486 | mb(); |
486 | wrmsrl(MSR_GS_BASE, pda); | 487 | wrmsrl(MSR_GS_BASE, pda); |