From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751368AbdHAHne (ORCPT ); Tue, 1 Aug 2017 03:43:34 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43656 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbdHAHnd (ORCPT ); Tue, 1 Aug 2017 03:43:33 -0400 Date: Tue, 1 Aug 2017 09:43:27 +0200 (CEST) From: Thomas Gleixner To: Tomi Sarvela cc: LKML , x86@kernel.org, Peter Zijlstra , Martin Peres , "Rafael J. Wysocki" , Marc Zyngier , jeffy.chen@rock-chips.com Subject: Re: [PATCH] x86/hpet: Cure interface abuse in the resume path In-Reply-To: <05930667-0196-4393-85e3-8360ac69028f@intel.com> Message-ID: References: <05930667-0196-4393-85e3-8360ac69028f@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Aug 2017, Tomi Sarvela wrote: > On 31/07/17 23:07, Thomas Gleixner wrote: > > The HPET resume path abuses irq_domain_[de]activate_irq() to restore the > > MSI message in the HPET chip for the boot CPU on resume and it relies on an > > implementation detail of the interrupt core code, which magically makes the > > HPET unmask call invoked via a irq_disable/enable pair. This worked as long > > as the irq code did unconditionally invoke the unmask() callback. With the > > recent changes which keep track of the masked state to avoid expensive > > hardware access, this does not longer work. As a consequence the HPET timer > > interrupts are not unmasked which breaks resume as the boot CPU waits > > forever that a timer interrupt arrives. > > > > Make the restore of the MSI message explicit and invoke the unmask() > > function directly. While at it get rid of the pointless affinity setting as > > nothing can change the affinity of the interrupt and the vector across > > suspend/resume. The restore of the MSI message reestablishes the previous > > affinity setting which is the correct one. > > > > Fixes: bf22ff45bed6 ("genirq: Avoid unnecessary low level irq function > > calls") > > Reported-by: Martin Peres > > Reported-by: Tomi Sarvela > > Signed-off-by: Thomas Gleixner > > Cc: jeffy.chen@rock-chips.com > > Cc: Marc Zyngier > > Cc: Peter Ziljstra > > Cc: "Rafael J. Wysocki" > > Tested-by: Tomi Sarvela > > Tested only on the regressed Eagle Lake testhost. This patch fixes the > suspend/resume issue. Tomi, can you please do me a favor? Use plain 4.13-rc3 (without that patch) and add the following on the kernel command line: 'nohpet'. Boot the machine and capture and provide the output of # dmesg # cat /proc/interrupts # cat /proc/timer_list Then try the suspend cycle again. Thanks, tglx