From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCH] x86/xen: resume timer irqs early Date: Thu, 7 Aug 2014 18:16:25 +0100 Message-ID: <1407431785-21394-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFRIs-0003EL-MS for xen-devel@lists.xenproject.org; Thu, 07 Aug 2014 17:16:38 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Boris Ostrovsky , David Vrabel List-Id: xen-devel@lists.xenproject.org If the timer irqs are resumed during device resume it is possible in certain circumstances for the resume to hang early on, before device interrupts are resumed. It is not entirely clear what is occuring the point of the hang but I think a task necessary for the resume calls schedule_timeout(), waiting for a timer interrupt (which never arrives). This failure may require specific tasks to be running on the other VCPUs to trigger (processes are not frozen during a suspend/resume if PREEMPT is disabled). Add IRQF_EARLY_RESUME to the timer interrupts so they are resumed in syscore_resume(). Also add IRQF_NO_SUSPEND as it is not necessary to suspend the timer interrupts and IRQF_FORCE_RESUME was already set. Signed-off-by: David Vrabel --- arch/x86/xen/time.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 7b78f88..90dd311 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -443,8 +443,10 @@ void xen_setup_timer(int cpu) name = ""; irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt, - IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER| - IRQF_FORCE_RESUME, + IRQF_PERCPU | IRQF_NOBALANCING + | IRQF_TIMER + | IRQF_NO_SUSPEND | IRQF_FORCE_RESUME + | IRQF_EARLY_RESUME, name, NULL); (void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX); -- 1.7.10.4