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

[Xen-changelog] [xen-unstable] PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1189156734 -3600
# Node ID f779ee15c553212762780edaf105a5d68f920758
# Parent  9cc5858c145d490fc7d8672524a3b375b3cc7a3c
PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.

smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.

Based on an original patch by:
 Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
 Signed-off-by: Robert Phillips <rphillips@xxxxxxxxxxxxxxx>

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

diff -r 9cc5858c145d -r f779ee15c553 
unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
--- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Fri Sep 
07 09:48:35 2007 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Fri Sep 
07 10:18:54 2007 +0100
@@ -17,6 +17,8 @@ struct ap_suspend_info {
  * while the BSP is re-initializing it after restore.
  */
 static DEFINE_RWLOCK(suspend_lock);
+
+#ifdef CONFIG_SMP
 
 /*
  * Spinning prevents, for example, APs touching grant table entries while
@@ -42,6 +44,14 @@ static void ap_suspend(void *_info)
        mb();
        atomic_dec(&info->nr_spinning);
 }
+
+#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0)
+
+#else /* !defined(CONFIG_SMP) */
+
+#define initiate_ap_suspend(i) 0
+
+#endif
 
 static int bp_suspend(void)
 {
@@ -80,7 +90,7 @@ int __xen_suspend(int fast_suspend)
 
        nr_cpus = num_online_cpus() - 1;
 
-       err = smp_call_function(ap_suspend, &info, 0, 0);
+       err = initiate_ap_suspend(&info);
        if (err < 0) {
                preempt_enable();
                xenbus_suspend_cancel();

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