ia64/xen-unstable

changeset 18676:459f7ca6cf2a

pv-on-hvm: Avoid rwlock livelock on save/restore.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Oct 21 10:04:40 2008 +0100 (2008-10-21)
parents dacc54242a63
children 3ba06e8098cb
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	Tue Oct 21 09:53:34 2008 +0100
     1.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c	Tue Oct 21 10:04:40 2008 +0100
     1.3 @@ -11,12 +11,6 @@ struct ap_suspend_info {
     1.4  	atomic_t nr_spinning;
     1.5  };
     1.6  
     1.7 -/*
     1.8 - * Use a rwlock to protect the hypercall page from being executed in AP context
     1.9 - * while the BSP is re-initializing it after restore.
    1.10 - */
    1.11 -static DEFINE_RWLOCK(suspend_lock);
    1.12 -
    1.13  #ifdef CONFIG_SMP
    1.14  
    1.15  /*
    1.16 @@ -33,12 +27,8 @@ static void ap_suspend(void *_info)
    1.17  	atomic_inc(&info->nr_spinning);
    1.18  	mb();
    1.19  
    1.20 -	while (info->do_spin) {
    1.21 +	while (info->do_spin)
    1.22  		cpu_relax();
    1.23 -		read_lock(&suspend_lock);
    1.24 -		HYPERVISOR_yield();
    1.25 -		read_unlock(&suspend_lock);
    1.26 -	}
    1.27  
    1.28  	mb();
    1.29  	atomic_dec(&info->nr_spinning);
    1.30 @@ -61,9 +51,7 @@ static int bp_suspend(void)
    1.31  	suspend_cancelled = HYPERVISOR_suspend(0);
    1.32  
    1.33  	if (!suspend_cancelled) {
    1.34 -		write_lock(&suspend_lock);
    1.35  		platform_pci_resume();
    1.36 -		write_unlock(&suspend_lock);
    1.37  		gnttab_resume();
    1.38  		irq_resume();
    1.39  	}