Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1832454ybb; Sun, 29 Mar 2020 14:43:08 -0700 (PDT) X-Google-Smtp-Source: ADFU+vur9mGfA4JVTObX+s20W9F4oBcPlsrZlQQtq3YoYFCYzjAfP/+c7CECH7c90L4KKxf6Aq7S X-Received: by 2002:aca:da57:: with SMTP id r84mr5528990oig.79.1585518187746; Sun, 29 Mar 2020 14:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585518187; cv=none; d=google.com; s=arc-20160816; b=IiuUfrZu3EjHnQ4NxyVGUeU4RTy0HZZCN0+ThcJAEqNVZeb+3Vf3MMig+ilzJDURS1 NUZjWYWkoot8gxr0Yk1vWOWG6WH3tzZB+h4OxT01uL5SW/jDJ25JePf8nf3N1RT2xKw4 CJPpMfJdqHGM87bNz3jVeeFJRhp3j8NEYkZBIVlhzQxAMNbEM3CxW403+4493x6Cbaj5 iQ94mrOYdUTXiOesjHFk6YaoiR1Eybn1KijzVBiS4rzxT7/6uEENlcwlbQRczZthoz+a gO+iyavQftYgYnO3rMOnlenJfGKqz48gMprTaOzEnEw8zLnUXM9XrUitqok4sXhmREmc B67w== 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=EuVamNyda1wvzwFm8eZbcsdeB7B/v2pFRqbrlunnTEQ=; b=urn391SVgialTnZodHYWdFRJWYNY4mPK1sY7OIa8Yy7lo15HFbbEwFAew+TF0BwU5F mMpFrnDVO4s8OkR4k1NlnL5VOEkqFTxG0nzQpfj1UuqxBL6IlW9aB1S/Vn9+R2kPpOBL bqRzTJ+U3LXoZJb5RAqIIzOWTfLvn+HdCdbeYoDjKnF4laeJ7TDc55hb0Xbu4SrgOAgl sAngBFkc7nrs34R/5K4Gd9IcDQUgDigcZlJtrnlsI1iavtUnKvxA+uBW7pCg9wFr833W g64WIt/JX5PpXUb36jiptVouc7OJUv540/bT2+NsEHEbkoNpnZe+Jpevxdah2YjdNQ5P YYGg== 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 s139si5100414oih.7.2020.03.29.14.42.55; Sun, 29 Mar 2020 14:43:07 -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 S1729108AbgC2U1j (ORCPT + 99 others); Sun, 29 Mar 2020 16:27:39 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57011 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728814AbgC2U00 (ORCPT ); Sun, 29 Mar 2020 16:26:26 -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 1jIeVi-0001SD-DO; Sun, 29 Mar 2020 22:26:22 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 131BB1C0451; Sun, 29 Mar 2020 22:26:18 +0200 (CEST) Date: Sun, 29 Mar 2020 20:26:17 -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: Handle chained IRQs properly Cc: Sungbo Eo , Marc Zyngier , x86 , LKML In-Reply-To: <20200319023448.1479701-1-mans0n@gorani.run> References: <20200319023448.1479701-1-mans0n@gorani.run> MIME-Version: 1.0 Message-ID: <158551357771.28353.5299492062729078367.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: 486562da598c59e9f835b551d7cf19507de2d681 Gitweb: https://git.kernel.org/tip/486562da598c59e9f835b551d7cf19507de2d681 Author: Sungbo Eo AuthorDate: Thu, 19 Mar 2020 11:34:48 +09:00 Committer: Marc Zyngier CommitterDate: Thu, 19 Mar 2020 08:37:44 irqchip/versatile-fpga: Handle chained IRQs properly Enclose the chained handler with chained_irq_{enter,exit}(), so that the muxed interrupts get properly acked. This patch also fixes a reboot bug on OX820 SoC, where the jiffies timer interrupt is never acked. The kernel waits a clock tick forever in calibrate_delay_converge(), which leads to a boot hang. Fixes: c41b16f8c9d9 ("ARM: integrator/versatile: consolidate FPGA IRQ handling code") Signed-off-by: Sungbo Eo Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200319023448.1479701-1-mans0n@gorani.run --- drivers/irqchip/irq-versatile-fpga.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 928858d..70e2cff 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -68,12 +69,16 @@ static void fpga_irq_unmask(struct irq_data *d) static void fpga_irq_handle(struct irq_desc *desc) { + struct irq_chip *chip = irq_desc_get_chip(desc); struct fpga_irq_data *f = irq_desc_get_handler_data(desc); - u32 status = readl(f->base + IRQ_STATUS); + u32 status; + + chained_irq_enter(chip, desc); + status = readl(f->base + IRQ_STATUS); if (status == 0) { do_bad_IRQ(desc); - return; + goto out; } do { @@ -82,6 +87,9 @@ static void fpga_irq_handle(struct irq_desc *desc) status &= ~(1 << irq); generic_handle_irq(irq_find_mapping(f->domain, irq)); } while (status); + +out: + chained_irq_exit(chip, desc); } /*