|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.2-testing] x86: Avoid dynamic memory allocation d
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224587294 -3600
# Node ID 89a3b49e53a877145ba32d3df0fe164a65057ddd
# Parent bc01dd9f9da170d1c976ffc7bda288f498b6f0be
x86: Avoid dynamic memory allocation during AP startup.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset: 18670:3ba06e8098cb3a5583dc5d38fc4f7138348bf897
xen-unstable date: Tue Oct 21 11:39:22 2008 +0100
---
xen/arch/x86/smpboot.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff -r bc01dd9f9da1 -r 89a3b49e53a8 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c Tue Oct 21 12:07:51 2008 +0100
+++ b/xen/arch/x86/smpboot.c Tue Oct 21 12:08:14 2008 +0100
@@ -468,13 +468,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) );
@@ -858,6 +851,12 @@ static int __devinit do_boot_cpu(int api
store_NMI_vector(&nmi_high, &nmi_low);
smpboot_setup_warm_reset_vector(start_eip);
+
+ 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));
+ }
/*
* Starting actual IPI sequence...
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.2-testing] x86: Avoid dynamic memory allocation during AP startup.,
Xen patchbot-3.2-testing <=
|
|
|
|
|