Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1840094ybb; Sun, 29 Mar 2020 14:58:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtkuXqViU+5QS3PwvqCq7sD9Yfa0E1WX74bT9qicQr7ZGnSe0dJKh0b+nspN665ljNYQJHC X-Received: by 2002:aca:5652:: with SMTP id k79mr5864544oib.15.1585519101246; Sun, 29 Mar 2020 14:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585519101; cv=none; d=google.com; s=arc-20160816; b=S3GePGjfrZmLGcMA+UwG3iiigdHcqv6OyKDbhjAGe+JYl0ms0+AjueTu09oSg3hRGu bhstvfC5d+rWA+kTd3CDNKNolYyHHcUMhdlsaY1ZJeAsQ9FGwPI6Ec8/y79INhaCP7kn ZdGLdeB6Li+lB+VaF2pG3/vdlHhp3oXMy9oHrktggSHiXr7HgXNbNGSbfCBwC9lzBzFB xYsg5j0wpJ5joUTLsSLxNDAXIEZtle0oBqUc+l8sRdTHCVCXs8BTHlItUOHJl0OWjcef sfJnoKQx3dnGZibCRJtnPEKXvme14AoDegtxlLhJ0LpY2ER3GIda2CSGzHyp8dJbSzB5 edIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=TEBRaM5lQJ+l1gRWIlbTrVYkMD9Jqr1Nz+J/7uJJwa4=; b=LNMg/ozPAOVfArXCjrLkEesTrL5e3KSRt0T6str/Wy0h0WR2U44z+2Sn/K9pjQ4k3Z hZRhOMpPZkmjoUzYdimt3ZgZcn6BaGnW++4jof/H+aK65sFCcPBVdQFs2xW909bcIDqe kvxuTvOQjs8HsPkKW/7ur4+aHAvBNsBanqfdRHcDC9XFekcEU6sTnFwB5tKYvwjVvNmg osLEku07L8e2Gxh0pj1ajFRoV53iBmuHLnc/Ac7mPMyqXm4AX9dSZKKGb9ZpO9lr8IWJ il8xuUX2NTuu8hJ1jDP+thsklRijeGOo0ZYGArJxWlgfCMFIdwDjdwnnonfClSd2xdoW PyCA== ARC-Authentication-Results: i=1; mx.google.com; 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 b16si5104184oop.83.2020.03.29.14.57.59; Sun, 29 Mar 2020 14:58:21 -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; 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 S1729154AbgC2U2A (ORCPT + 99 others); Sun, 29 Mar 2020 16:28:00 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56972 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728596AbgC2U0V (ORCPT ); Sun, 29 Mar 2020 16:26:21 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jIeVc-0001Oa-QA; Sun, 29 Mar 2020 22:26:16 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id C203F1C04DF; Sun, 29 Mar 2020 22:26:13 +0200 (CEST) Date: Sun, 29 Mar 2020 20:26:13 -0000 From: "tip-bot2 for Sungbo Eo" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/versatile-fpga: Apply clear-mask earlier Cc: Sungbo Eo , Marc Zyngier , Linus Walleij , stable@vger.kernel.org, x86 , LKML In-Reply-To: <20200321133842.2408823-1-mans0n@gorani.run> References: <20200321133842.2408823-1-mans0n@gorani.run> MIME-Version: 1.0 Message-ID: <158551357344.28353.6406366846018523575.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 6a214a28132f19ace3d835a6d8f6422ec80ad200 Gitweb: https://git.kernel.org/tip/6a214a28132f19ace3d835a6d8f6422ec80ad200 Author: Sungbo Eo AuthorDate: Sat, 21 Mar 2020 22:38:42 +09:00 Committer: Marc Zyngier CommitterDate: Sun, 22 Mar 2020 11:52:16 irqchip/versatile-fpga: Apply clear-mask earlier Clear its own IRQs before the parent IRQ get enabled, so that the remaining IRQs do not accidentally interrupt the parent IRQ controller. This patch also fixes a reboot bug on OX820 SoC, where the remaining rps-timer IRQ raises a GIC interrupt that is left pending. After that, the rps-timer IRQ is cleared during driver initialization, and there's no IRQ left in rps-irq when local_irq_enable() is called, which evokes an error message "unexpected IRQ trap". Fixes: bdd272cbb97a ("irqchip: versatile FPGA: support cascaded interrupts from DT") Signed-off-by: Sungbo Eo Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200321133842.2408823-1-mans0n@gorani.run --- drivers/irqchip/irq-versatile-fpga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 70e2cff..f138673 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -212,6 +212,9 @@ int __init fpga_irq_of_init(struct device_node *node, if (of_property_read_u32(node, "valid-mask", &valid_mask)) valid_mask = 0; + writel(clear_mask, base + IRQ_ENABLE_CLEAR); + writel(clear_mask, base + FIQ_ENABLE_CLEAR); + /* Some chips are cascaded from a parent IRQ */ parent_irq = irq_of_parse_and_map(node, 0); if (!parent_irq) { @@ -221,9 +224,6 @@ int __init fpga_irq_of_init(struct device_node *node, fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); - writel(clear_mask, base + IRQ_ENABLE_CLEAR); - writel(clear_mask, base + FIQ_ENABLE_CLEAR); - /* * On Versatile AB/PB, some secondary interrupts have a direct * pass-thru to the primary controller for IRQs 20 and 22-31 which need