From: Jiri Slaby <jirislaby@gmail.com>
To: mingo@redhat.com
Cc: tglx@linutronix.de, hpa@zytor.com, pavel@suse.cz, rjw@sisk.pl,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
Brian Gerst <brgerst@gmail.com>, Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/1] x86_64: fix early_gdt_descr_base mangling
Date: Sat, 7 Feb 2009 18:40:02 +0100 [thread overview]
Message-ID: <1234028402-4747-1-git-send-email-jirislaby@gmail.com> (raw)
Commit 8c7e58e690ae60ab4215b025f433ed4af261e103
(x86: rework __per_cpu_load adjustments)
has broken resume on my machine. On every secondary_startup_64 invocation,
it adds initial_gs to early_gdt_descr_base.
Fix it by initializing it to per_cpu__gdt_page and adding to it.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
---
arch/x86/kernel/head_64.S | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index a0a2b5c..dadca8d 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -215,7 +215,8 @@ ENTRY(secondary_startup_64)
movq initial_gs(%rip), %rax
cmpl $0, per_cpu__cpu_number(%rax)
jne 1f
- addq %rax, early_gdt_descr_base(%rip)
+ addq $per_cpu__gdt_page, %rax
+ movq %rax, early_gdt_descr_base(%rip)
1:
#endif
/*
@@ -425,7 +426,7 @@ NEXT_PAGE(level2_spare_pgt)
early_gdt_descr:
.word GDT_ENTRIES*8-1
early_gdt_descr_base:
- .quad per_cpu__gdt_page
+ .quad 0
ENTRY(phys_base)
/* This must match the first entry in level2_kernel_pgt */
--
1.6.1.2
next reply other threads:[~2009-02-07 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 17:40 Jiri Slaby [this message]
2009-02-07 20:43 ` [PATCH 1/1] x86_64: fix early_gdt_descr_base mangling Brian Gerst
2009-02-07 20:48 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234028402-4747-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@suse.cz \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox