ia64/xen-unstable

changeset 15849:f779ee15c553

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@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Sep 07 10:18:54 2007 +0100 (2007-09-07)
parents 9cc5858c145d
children 05950e909ba6
files unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c	Fri Sep 07 09:48:35 2007 +0100
     1.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c	Fri Sep 07 10:18:54 2007 +0100
     1.3 @@ -18,6 +18,8 @@ struct ap_suspend_info {
     1.4   */
     1.5  static DEFINE_RWLOCK(suspend_lock);
     1.6  
     1.7 +#ifdef CONFIG_SMP
     1.8 +
     1.9  /*
    1.10   * Spinning prevents, for example, APs touching grant table entries while
    1.11   * the shared grant table is not mapped into the address space imemdiately
    1.12 @@ -43,6 +45,14 @@ static void ap_suspend(void *_info)
    1.13  	atomic_dec(&info->nr_spinning);
    1.14  }
    1.15  
    1.16 +#define initiate_ap_suspend(i)	smp_call_function(ap_suspend, i, 0, 0)
    1.17 +
    1.18 +#else /* !defined(CONFIG_SMP) */
    1.19 +
    1.20 +#define initiate_ap_suspend(i)	0
    1.21 +
    1.22 +#endif
    1.23 +
    1.24  static int bp_suspend(void)
    1.25  {
    1.26  	int suspend_cancelled;
    1.27 @@ -80,7 +90,7 @@ int __xen_suspend(int fast_suspend)
    1.28  
    1.29  	nr_cpus = num_online_cpus() - 1;
    1.30  
    1.31 -	err = smp_call_function(ap_suspend, &info, 0, 0);
    1.32 +	err = initiate_ap_suspend(&info);
    1.33  	if (err < 0) {
    1.34  		preempt_enable();
    1.35  		xenbus_suspend_cancel();