[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix SMP_ALTERNATIVES to cope with discarded init data.



# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 5ead5ffa04c2b3bdbb52e3f2fb23942634f77a6d
# Parent  189c87adf876df8ed7b84afb5ac69e09465cdaf1


Fix SMP_ALTERNATIVES to cope with discarded init data.
Signed-off-by: steven.smith@xxxxxxxxxxxx

diff -r 189c87adf876 -r 5ead5ffa04c2 patches/linux-2.6.11/smp-alts.patch
--- a/patches/linux-2.6.11/smp-alts.patch       Wed Jul  6 10:46:29 2005
+++ b/patches/linux-2.6.11/smp-alts.patch       Wed Jul  6 18:33:27 2005
@@ -35,7 +35,7 @@
 diff -Naur linux-2.6.11/arch/i386/kernel/smpalts.c 
linux-2.6.11.post/arch/i386/kernel/smpalts.c
 --- linux-2.6.11/arch/i386/kernel/smpalts.c    1970-01-01 01:00:00.000000000 
+0100
 +++ linux-2.6.11.post/arch/i386/kernel/smpalts.c       2005-06-16 
11:23:39.300902424 +0100
-@@ -0,0 +1,76 @@
+@@ -0,0 +1,85 @@
 +#include <linux/kernel.h>
 +#include <asm/system.h>
 +#include <asm/smp_alt.h>
@@ -58,6 +58,7 @@
 +
 +extern struct smp_alternative_record __start_smp_alternatives_table,
 +  __stop_smp_alternatives_table;
++extern unsigned long __init_begin, __init_end;
 +
 +void prepare_for_smp(void)
 +{
@@ -69,6 +70,10 @@
 +              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
 +              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
 +              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
 +              if (r->repl->feature != (unsigned char)-1 &&
 +                  boot_cpu_has(r->repl->feature)) {
 +                      memcpy(r->targ_start,
@@ -101,6 +106,10 @@
 +              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
 +              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
 +              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
 +              memcpy(r->targ_start,
 +                     r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
 +                     r->repl->up_size);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.