WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Avoid dynamic memory allocation duri

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Avoid dynamic memory allocation during AP startup.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 07:50:57 -0700
Delivery-date: Wed, 22 Oct 2008 07:53:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224585562 -3600
# Node ID 3ba06e8098cb3a5583dc5d38fc4f7138348bf897
# Parent  459f7ca6cf2abefab955945cd2c3eeace10be2a9
x86: Avoid dynamic memory allocation during AP startup.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/smpboot.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -r 459f7ca6cf2a -r 3ba06e8098cb xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Tue Oct 21 10:04:40 2008 +0100
+++ b/xen/arch/x86/smpboot.c    Tue Oct 21 11:39:22 2008 +0100
@@ -473,13 +473,6 @@ static void construct_percpu_idt(unsigne
 {
        unsigned char idt_load[10];
 
-       /* If IDT table exists since last hotplug, reuse it */
-       if (!idt_tables[cpu]) {
-               idt_tables[cpu] = xmalloc_array(idt_entry_t, IDT_ENTRIES);
-               memcpy(idt_tables[cpu], idt_table,
-                               IDT_ENTRIES*sizeof(idt_entry_t));
-       }
-
        *(unsigned short *)(&idt_load[0]) = (IDT_ENTRIES*sizeof(idt_entry_t))-1;
        *(unsigned long  *)(&idt_load[2]) = (unsigned long)idt_tables[cpu];
        __asm__ __volatile__ ( "lidt %0" : "=m" (idt_load) );
@@ -908,6 +901,12 @@ static int __devinit do_boot_cpu(int api
        }
 #endif
 
+       if (!idt_tables[cpu]) {
+               idt_tables[cpu] = xmalloc_array(idt_entry_t, IDT_ENTRIES);
+               memcpy(idt_tables[cpu], idt_table,
+                      IDT_ENTRIES*sizeof(idt_entry_t));
+       }
+
        /*
         * This grunge runs the startup process for
         * the targeted processor.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Avoid dynamic memory allocation during AP startup., Xen patchbot-unstable <=