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

[Xen-changelog] Fix SMP save/restore for 1 vcpu by adding suspend/resume functions for SMP.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID c8279f7c14e248363a495388e35225dfc43909af
# Parent  64639ab26b92c0f5ab24db469776dcf2617f253d
Fix SMP save/restore for 1 vcpu by adding suspend/resume functions for SMP.
We have to free_irq the irq vectors for the SMP ipi vectors.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 64639ab26b92 -r c8279f7c14e2 
linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Tue Aug  2 
19:06:10 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Tue Aug  2 
19:08:28 2005
@@ -1529,7 +1529,7 @@
 extern irqreturn_t smp_reschedule_interrupt(int, void *, struct pt_regs *);
 extern irqreturn_t smp_call_function_interrupt(int, void *, struct pt_regs *);
 
-void __init smp_intr_init(void)
+void smp_intr_init(void)
 {
        int cpu = smp_processor_id();
 
@@ -1546,3 +1546,24 @@
                           smp_call_function_interrupt,
                           SA_INTERRUPT, callfunc_name[cpu], NULL));
 }
+
+static void smp_intr_exit(void)
+{
+       int cpu = smp_processor_id();
+
+       free_irq(per_cpu(resched_irq, cpu), NULL);
+       unbind_ipi_from_irq(RESCHEDULE_VECTOR);
+
+       free_irq(per_cpu(callfunc_irq, cpu), NULL);
+       unbind_ipi_from_irq(CALL_FUNCTION_VECTOR);
+}
+
+void smp_suspend(void)
+{
+       smp_intr_exit();
+}
+
+void smp_resume(void)
+{
+       smp_intr_init();
+}
diff -r 64639ab26b92 -r c8279f7c14e2 
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Tue Aug  2 19:06:10 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Tue Aug  2 19:08:28 2005
@@ -91,6 +91,10 @@
 #define gnttab_resume()  do{}while(0)
 #endif
 
+#ifdef CONFIG_SMP
+    extern void smp_suspend(void);
+    extern void smp_resume(void);
+#endif
     extern void time_suspend(void);
     extern void time_resume(void);
     extern unsigned long max_pfn;
@@ -115,6 +119,10 @@
 
     time_suspend();
 
+#ifdef CONFIG_SMP
+    smp_suspend();
+#endif
+
     xenbus_suspend();
 
     ctrl_if_suspend();
@@ -157,6 +165,10 @@
     ctrl_if_resume();
 
     xenbus_resume();
+
+#ifdef CONFIG_SMP
+    smp_resume();
+#endif
 
     time_resume();
 

_______________________________________________
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®.