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] Fix SMP save/restore for 1 vcpu by adding suspend/resume

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix SMP save/restore for 1 vcpu by adding suspend/resume functions for SMP.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Aug 2005 15:08:13 -0400
Delivery-date: Tue, 02 Aug 2005 19:09:00 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix SMP save/restore for 1 vcpu by adding suspend/resume functions for SMP., Xen patchbot -unstable <=