From: Zachary Amsden <zach@vmware.com>
To: Andi Kleen <ak@suse.de>
Cc: virtualization@lists.osdl.org, Linus Torvalds <torvalds@osdl.org>,
Jeffrey Sheldon <jeffshel@vmware.com>,
Ole Agesen <agesen@vmware.com>, Shai Fultheim <shai@scalex86.org>,
Andrew Morton <akpm@odsl.org>, Jack Lo <jlo@vmware.com>,
Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Chris Wright <chrisw@osdl.org>, Martin Bligh <mbligh@mbligh.org>,
Pratap Subrahmanyam <pratap@vmware.com>,
Christopher Li <chrisl@vmware.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>, Andi Kleen <ak@muc.de>
Subject: Re: [PATCH 3/3] Gdt hotplug
Date: Wed, 28 Sep 2005 16:04:28 -0700 [thread overview]
Message-ID: <433B217C.2050407@vmware.com> (raw)
In-Reply-To: <200509290015.02973.ak@suse.de>
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
Andi Kleen wrote:
>On Wednesday 28 September 2005 23:44, Zachary Amsden wrote:
>
>
>>As suggested by Andi Kleen, don't allocate a GDT page if there is already
>>one present. Needed for CPU hotplug.
>>
>>
>
>Did I really suggest that? I think I suggested checking the return
>value of gfp. Also get_zeroed_page() is slightly cleaner than GFP_ZERO.
>
>
Then I think this looks better all around.
[-- Attachment #2: gdt-hotplug --]
[-- Type: text/plain, Size: 1093 bytes --]
As suggested by Andi Kleen, don't allocate a GDT page if there is already one
present. Needed for CPU hotplug.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.14-rc2/arch/i386/kernel/smpboot.c
===================================================================
--- linux-2.6.14-rc2.orig/arch/i386/kernel/smpboot.c 2005-09-28 15:49:26.000000000 -0700
+++ linux-2.6.14-rc2/arch/i386/kernel/smpboot.c 2005-09-28 16:00:55.000000000 -0700
@@ -874,6 +874,12 @@ static int __devinit do_boot_cpu(int api
unsigned long start_eip;
unsigned short nmi_high = 0, nmi_low = 0;
+ if (!cpu_gdt_descr[cpu].address &&
+ !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+ printk("Failed to allocate GDT for CPU %d\n", cpu);
+ return 1;
+ }
+
++cpucount;
/*
@@ -898,8 +904,6 @@ static int __devinit do_boot_cpu(int api
* This grunge runs the startup process for
* the targeted processor.
*/
- cpu_gdt_descr[cpu].address = __get_free_page(GFP_KERNEL|__GFP_ZERO);
-
atomic_set(&init_deasserted, 0);
Dprintk("Setting warm reset code and vector.\n");
prev parent reply other threads:[~2005-09-28 23:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 21:44 [PATCH 3/3] Gdt hotplug Zachary Amsden
2005-09-28 22:15 ` Andi Kleen
2005-09-28 22:20 ` Chris Wright
2005-09-28 23:04 ` Zachary Amsden [this message]
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=433B217C.2050407@vmware.com \
--to=zach@vmware.com \
--cc=agesen@vmware.com \
--cc=ak@muc.de \
--cc=ak@suse.de \
--cc=akpm@odsl.org \
--cc=chrisl@vmware.com \
--cc=chrisw@osdl.org \
--cc=hpa@zytor.com \
--cc=jeffshel@vmware.com \
--cc=jlo@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.org \
--cc=mingo@elte.hu \
--cc=pratap@vmware.com \
--cc=shai@scalex86.org \
--cc=torvalds@osdl.org \
--cc=virtualization@lists.osdl.org \
--cc=zwane@arm.linux.org.uk \
/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