Skip to content

Commit

Permalink
x86-64: Simplify loading initial_gs
Browse files Browse the repository at this point in the history
Load initial_gs as two 32-bit values instead of splitting a 64-bit value.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1279371808-24804-3-git-send-email-brgerst@gmail.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
Brian Gerst authored and H. Peter Anvin committed Jul 22, 2010
1 parent cfaa71e commit 650fb43
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ ENTRY(secondary_startup_64)
* init data section till per cpu areas are set up.
*/
movl $MSR_GS_BASE,%ecx
movq initial_gs(%rip),%rax
movq %rax,%rdx
shrq $32,%rdx
movl initial_gs(%rip),%eax
movl initial_gs+4(%rip),%edx
wrmsr

/* esi is pointer to real mode structure with interesting info.
Expand Down

0 comments on commit 650fb43

Please sign in to comment.