From patchwork Mon Mar 4 22:00:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Li X-Patchwork-Id: 10838681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53B1B1390 for ; Mon, 4 Mar 2019 22:00:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40FC32B7BE for ; Mon, 4 Mar 2019 22:00:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34CD72B866; Mon, 4 Mar 2019 22:00:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5C642B7BE for ; Mon, 4 Mar 2019 22:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726080AbfCDWAi (ORCPT ); Mon, 4 Mar 2019 17:00:38 -0500 Received: from tomli.me ([153.92.126.73]:44100 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDWAi (ORCPT ); Mon, 4 Mar 2019 17:00:38 -0500 Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id 94d04484; Mon, 4 Mar 2019 22:00:35 +0000 (UTC) X-HELO: localhost.lan Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.lan) (2402:f000:1:1501:200:5efe:72f4:b31) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Mon, 04 Mar 2019 22:00:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=from:to:cc:subject:date:message-id:mime-version:content-transfer-encoding; s=1490979754; bh=uieIdADfuGnZgn/vvyEk/SEUq7QDCLA8JwWoh6XOsWk=; b=2EkGocQzGe0bGtC9WY5Z2e7uOGrZoC2Nc9i6mmD+UVEC/Ebe3Q+w1TqAk62ZHR100KQwGlNnWWuzU8y0AO0Odx6DfmYag2bO6RKwpttIRb2Kt4b9TuTJzk2/lSnu3aJ7Nv2VHYkc2EVUJ4In4Eh8kviemFy9BprUVDQXPTcTuFEby+yax0ClQRDlJbCHFGS7WRah2bsl7sJ9vjaiPZciTUmbIG2rVykOp0Dc9Ae8Q1vFc7i2esO9433HEg305SPNQdFDLMHuxIJfSkskvEy+WDixHI2iKVQoKw9t3qqKbVmRZwKX8gk4hvxXM6g4gswfxO+iNPElHehHu+eGL6FGHw== From: Yifeng Li To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Huacai Chen , Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, Yifeng Li Subject: [PATCH] mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction. Date: Tue, 5 Mar 2019 06:00:22 +0800 Message-Id: <20190304220022.20682-1-tomli@tomli.me> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Timekeeping IRQs from CS5536 MFGPT are routed to i8259, which then triggers the "cascade" IRQ on MIPS CPU. Without IRQF_NO_SUSPEND in cascade_irqaction, MFGPT interrupts will be masked in suspend mode, and the machine would be unable to resume once suspended. Previously, MIPS IRQs were not disabled properly, so the original code appeared to work. Commit a3e6c1eff5 (MIPS: IRQ: Fix disable_irq on CPU IRQs) uncovers the bug. To fix it, add IRQF_NO_SUSPEND to cascade_irqaction. This commit is functionally identical to 0add9c2f1cff ("MIPS: Loongson-3: Add IRQF_NO_SUSPEND to Cascade irqaction"), but it forgot to apply the same fix to Loongson2. Signed-off-by: Yifeng Li --- arch/mips/loongson64/lemote-2f/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/loongson64/lemote-2f/irq.c b/arch/mips/loongson64/lemote-2f/irq.c index 9e33e45aa17c..b213cecb8e3a 100644 --- a/arch/mips/loongson64/lemote-2f/irq.c +++ b/arch/mips/loongson64/lemote-2f/irq.c @@ -103,7 +103,7 @@ static struct irqaction ip6_irqaction = { static struct irqaction cascade_irqaction = { .handler = no_action, .name = "cascade", - .flags = IRQF_NO_THREAD, + .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND, }; void __init mach_init_irq(void)