Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2469965imm; Mon, 28 May 2018 08:41:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK821Uwnwfpios/cqWy4aPJWrrmYgttA2izcA2NiVFJI9S/vxHxkazDAr/rcJPrKT8+25g2 X-Received: by 2002:a63:7b1e:: with SMTP id w30-v6mr7458756pgc.402.1527522065524; Mon, 28 May 2018 08:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527522065; cv=none; d=google.com; s=arc-20160816; b=Qm6+DGR8/PXGZswwGyN9gPSg5leQWDNmwlFR25Me1rF7b7ylA3tWjSr8YmpA2umXbW 6uh0ETkmlVO76EPbsx8of5zuROM5i4BW1hsoyOoN8iGV66Q/CdQCcBo+K+atgHqn/WMj T5uKoR7hyGaqw4r1bhzrC9oeDN/dV5uAJfAd82VAHXmbS7zAnDdsZyw4h2DzrgrIgYSA 5HdVME6CZGvwwToapAZBteC0egAdSuk6LlpVpACjTXFRzimpE/dWiPOpVYTS+7kRU7Ls K1fwMs4KqgdS9/YO/oZUq4drO5oRejkerMWOuZpBMLpYgAe5roRihfFFcURvdQtIfJUD sY3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=E8s16LtsX10f4nkNWatuWCMH0/MKc18CHLGMspHYdKw=; b=vYY8++YY+X6YPDwGzvuy106wnnV+o+URQLzzUUQBDb9HH6rPjBeXlywBoUcjTux8jU 1jOy6sz8/kx7joapXD5IV3Xx0PYmYxyNYoNRW8TFOKRcxIy2EDokkJlCQZH7lL6Um969 CBSPBfbhdZMvnDkFPe6oAAEyE4d3lweu3Se5aSBJWJm6QSvQyrkvDJ4272ag7Ax+LDL2 0PKGZrD5q0f2GUMTlGfrlzhqtfFp9pBRcEVLKP6qf8KkGszN5vUm82xs0KQN+1e5yKkE eMIr0L4TSPmxKNfpD/RmiY/CZi/wPsG2WK87uutdCvG5enHzutLFe+vlriqD4q9QznvV v4Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lj3d5LoQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi10-v6si28006276plb.399.2018.05.28.08.40.50; Mon, 28 May 2018 08:41:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lj3d5LoQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034708AbeE1PkW (ORCPT + 99 others); Mon, 28 May 2018 11:40:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030799AbeE1KRt (ORCPT ); Mon, 28 May 2018 06:17:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DCAD6208A5; Mon, 28 May 2018 10:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502668; bh=qW5BmIZbbcP7gCrtz9BevlDHcCRgV4WiwYa0nuYKWts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lj3d5LoQeXELVbTsgTn1GXbMd8K1jZivR1Se5sxZmKX/GMUffmkiJydmaVTjUEf0S KnXcxLSD4rvGAmdkdMYtWMPwyieeeZdDQtJ/+2SofHqBaQNxP0y0/WXVeGwVw8dX24 E1cmE7J9gVMRvhbCidPPuhC6EN0ameWsFLQjsE6o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , Tero Kristo , Tony Lindgren , Sasha Levin Subject: [PATCH 4.4 086/268] ARM: OMAP3: Fix prm wake interrupt for resume Date: Mon, 28 May 2018 12:01:00 +0200 Message-Id: <20180528100211.934409600@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100202.045206534@linuxfoundation.org> References: <20180528100202.045206534@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tony Lindgren [ Upstream commit d3be6d2a08bd26580562d9714d3d97ea9ba22c73 ] For platform_suspend_ops, the finish call is too late to re-enable wake irqs and we need re-enable wake irqs on wake call instead. Otherwise noirq resume for devices has already happened. And then dev_pm_disarm_wake_irq() has already disabled the dedicated wake irqs when the interrupt triggers and the wake irq is never handled. For devices that are already in PM runtime suspended state when we enter suspend this means that a possible wake irq will never trigger. And this can lead into a situation where a device has a pending padconf wake irq, and the device will stay unresponsive to any further wake irqs. This issue can be easily reproduced by setting serial console log level to zero, letting the serial console idle, and suspend the system from an ssh terminal. Then try to wake up the system by typing to the serial console. Note that this affects only omap3 PRM interrupt as that's currently the only omap variant that does anything in omap_pm_wake(). In general, for the wake irqs to work, the interrupt must have either IRQF_NO_SUSPEND or IRQF_EARLY_RESUME set for it to trigger before dev_pm_disarm_wake_irq() disables the wake irqs. Reported-by: Grygorii Strashko Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap2/pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -231,7 +231,7 @@ static void omap_pm_end(void) cpu_idle_poll_ctrl(false); } -static void omap_pm_finish(void) +static void omap_pm_wake(void) { if (cpu_is_omap34xx()) omap_prcm_irq_complete(); @@ -241,7 +241,7 @@ static const struct platform_suspend_ops .begin = omap_pm_begin, .end = omap_pm_end, .enter = omap_pm_enter, - .finish = omap_pm_finish, + .wake = omap_pm_wake, .valid = suspend_valid_only_mem, };