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/3] add flag IRQF_NO_SUSPEND in 'struct irqactio

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Mon, 13 Jul 2009 16:46:52 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Lu, Guanqun" <guanqun.lu@xxxxxxxxx>
Delivery-date: Mon, 13 Jul 2009 01:49:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1247564671-3090-1-git-send-email-guanqun.lu@xxxxxxxxx>
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: <1247564671-3090-1-git-send-email-guanqun.lu@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoDb4UnwT8MfTOUTty2bpOvHm2YhwAI7f2w
Thread-topic: [Xen-devel] [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct irqaction'
Hi Jeremy,

Forget to mention, this series of patches are targeting for pv_ops dom0 host S3.

We have tried the host S3 branch (xen-tip/dom0/acpi) and find host S3 will hang 
at disable_nonboot_cpus. the root cause is that suspend_device_irqs () 
unfortunately will disable the irq of XEN_CALL_FUNCTION_SINGLE_VECTOR IPI and 
xen_timer_interrupt VIRQ, which however are required by disable_nonboot_cpus. 
To fix this issue, flag IRQF_NO_SUSPEND is added to Xen IPI and IRQF_TIMER is 
added to xen_timer_interrupt VIRQ, to notify suspend_device_irqs not to disable 
these irqs when suspend.

After applying this series of patches to xen-tip/dom0/acpi branch, and rebasing 
xen-tip/dom0/acpi to xen-tip/master, the pv_ops dom0 host S3 is working in our 
side.

Best Regards
Ke

>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Guanqun Lu
>Sent: Tuesday, July 14, 2009 5:44 PM
>To: xen-devel@xxxxxxxxxxxxxxxxxxx
>Cc: Lu, Guanqun
>Subject: [Xen-devel] [PATCH 1/3] add flag IRQF_NO_SUSPEND in 'struct
>irqaction'
>
>We currently only bypass IRQF_TIMER in '__disable_irq',
>but Xen specific IRQs should not be disabled either.
>This commit adds a new flag to accompolish this goal
>without being mixed up with IRQF_TIMER flag.
>
>Signed-off-by: Guanqun Lu <guanqun.lu@xxxxxxxxx>
>---
> include/linux/interrupt.h |    1 +
> kernel/irq/manage.c       |    3 ++-
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
>diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
>index 8a9613d..8ad2b6f 100644
>--- a/include/linux/interrupt.h
>+++ b/include/linux/interrupt.h
>@@ -58,6 +58,7 @@
> #define IRQF_PERCPU           0x00000400
> #define IRQF_NOBALANCING      0x00000800
> #define IRQF_IRQPOLL          0x00001000
>+#define IRQF_NO_SUSPEND               0x00002000
>
> typedef irqreturn_t (*irq_handler_t)(int, void *);
>
>diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>index 1516ab7..f814678 100644
>--- a/kernel/irq/manage.c
>+++ b/kernel/irq/manage.c
>@@ -165,7 +165,8 @@ static inline int setup_affinity(unsigned int irq, struct
>irq_desc *desc)
> void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
> {
>       if (suspend) {
>-              if (!desc->action || (desc->action->flags & IRQF_TIMER))
>+              if (!desc->action ||
>+                  (desc->action->flags & (IRQF_TIMER | IRQF_NO_SUSPEND)))
>                       return;
>               desc->status |= IRQ_SUSPENDED;
>       }
>--
>1.6.1.rc3
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel

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