From 05bc962b373f5f41c5659d0287e3cf0d2973cc89 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 7 Sep 2007 10:18:54 +0100 Subject: 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 Signed-off-by: Robert Phillips Signed-off-by: Keir Fraser --- unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'unmodified_drivers') diff --git a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c index 33c468d594..2c225b76ac 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c +++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c @@ -18,6 +18,8 @@ struct ap_suspend_info { */ static DEFINE_RWLOCK(suspend_lock); +#ifdef CONFIG_SMP + /* * Spinning prevents, for example, APs touching grant table entries while * the shared grant table is not mapped into the address space imemdiately @@ -43,6 +45,14 @@ static void ap_suspend(void *_info) 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) { int suspend_cancelled; @@ -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(); -- cgit v1.2.3