[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73c1f2160902071243t1c00ad1fqf1ae286995f1c1d9@mail.gmail.com>
Date: Sat, 7 Feb 2009 15:43:14 -0500
From: Brian Gerst <brgerst@...il.com>
To: Jiri Slaby <jirislaby@...il.com>
Cc: mingo@...hat.com, tglx@...utronix.de, hpa@...or.com, pavel@...e.cz,
rjw@...k.pl, linux-kernel@...r.kernel.org,
Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 1/1] x86_64: fix early_gdt_descr_base mangling
On Sat, Feb 7, 2009 at 12:40 PM, Jiri Slaby <jirislaby@...il.com> wrote:
> 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@...il.com>
> Cc: Brian Gerst <brgerst@...il.com>
> Cc: Tejun Heo <tj@...nel.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
The add of the load address isn't done on UP, so this breaks it.
Actually, hold off on this patch. I see a better way of handling this.
--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists