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-devel

RE: [Xen-devel] [PATCH 1 of 3] fix S3 suspend error

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>, "Lu, Guanqun" <guanqun.lu@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 1 of 3] fix S3 suspend error
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Mon, 23 Feb 2009 20:46:10 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Mon, 23 Feb 2009 04:47:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5C7D8DF.3178%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <b713518a241b6f6e07ed.1235402867@xxxxxxxxxxxxxxxxxxxxx> <C5C7D8DF.3178%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmViJ8XW4u06P9hSnyHMFu6bUbj2AAKxFsBAAAV/fA=
Thread-topic: [Xen-devel] [PATCH 1 of 3] fix S3 suspend error
>From: Keir Fraser
>Sent: Monday, February 23, 2009 8:39 PM
>
>On 23/02/2009 07:27, "Guanqun Lu" <guanqun.lu@xxxxxxxxx> wrote:
>
>> fix S3 suspend error.
>> 
>> invoke ioapic_pm_state_alloc() eariler,
>> thus avoiding check_lock() BUG_ON() in spin_lock().
>> 
>> Signed-off-by: Guanqun Lu <guanqun.lu@xxxxxxxxx>
>
>This one I think is a good idea anyway. The other two -- I 
>wonder why we do
>device suspend/resume with IRQs disabled? As far as I can tell 
>Linux does
>not do that. So would it be cleaner to move the device 
>suspend/resume hooks
>outside the IRQs-disabled region?
>

I can't ensure my understanding exactly matching latest Linux
S3 implementation which evolves quickly. But generally device
drivers typically are allowed with two callbacks, one being invoked
with irq enabled and the other with irq disabled, since some actions
have such requirement. On the other side, system device class,
such as ioapic, lapic, etc. are saved with irq disabled after other
external devices.

Xen owns a few devices with most as system class, so for 
simplicity interrupt is disabled from start. It's not worthy of touching
this flow for this simple spinlock issue, imo. :-)

Thanks,
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel