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

[Xen-changelog] [xen-unstable] x86: Fix S3 resume for HPET MSI IRQ case

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix S3 resume for HPET MSI IRQ case
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 15 Feb 2011 00:35:25 -0800
Delivery-date: Tue, 15 Feb 2011 00:36:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Wei Gang <gang.wei@xxxxxxxxx>
# Date 1297680072 0
# Node ID af84691a6cf9423a445f471af02b36b76ddf5314
# Parent  218b5fa834aa91b83e83d18d4b88e53b9788c2e3
x86: Fix S3 resume for HPET MSI IRQ case

Jan Beulich found that for S3 resume on platforms without ARAT feature
but with MSI capable HPET, request_irq() will be called in
hpet_setup_msi_irq() for irq already setup(no release_irq() called
during S3 suspend), so that always falling back to using
legacy_hpet_event.

Fix it by conditional calling request_irq() for 4.1. Planned to split
the S3 resume path from booting path post 4.1, as Jan suggested.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hpet.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff -r 218b5fa834aa -r af84691a6cf9 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Mon Feb 14 10:39:34 2011 +0000
+++ b/xen/arch/x86/hpet.c       Mon Feb 14 10:41:12 2011 +0000
@@ -367,12 +367,20 @@ static int hpet_setup_msi_irq(unsigned i
     int ret;
     struct msi_msg msg;
     struct hpet_event_channel *ch = &hpet_events[irq_to_channel(irq)];
-
-    irq_desc[irq].handler = &hpet_msi_type;
-    ret = request_irq(irq, hpet_interrupt_handler,
-                      0, "HPET", ch);
-    if ( ret < 0 )
-        return ret;
+    irq_desc_t *desc = irq_to_desc(irq);
+
+    if ( desc->handler == &no_irq_type )
+    {
+        desc->handler = &hpet_msi_type;
+        ret = request_irq(irq, hpet_interrupt_handler,
+                          0, "HPET", ch);
+        if ( ret < 0 )
+            return ret;
+    }
+    else if ( desc->handler != &hpet_msi_type )
+    {
+        return -EINVAL;
+    }
 
     msi_compose_msg(NULL, irq, &msg);
     hpet_msi_write(irq, &msg);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Fix S3 resume for HPET MSI IRQ case, Xen patchbot-unstable <=