Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1400976ybz; Thu, 16 Apr 2020 08:31:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJN87lNXP4iLYjZPyrH3hEOr51QIw8pflQ1FaUZcpmpQzNkGJ11ODR29U5FuVnNXlQDXEJi X-Received: by 2002:aa7:c64a:: with SMTP id z10mr30754205edr.126.1587051092431; Thu, 16 Apr 2020 08:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587051092; cv=none; d=google.com; s=arc-20160816; b=Dk0J8MJ2+9dB7idMkZTggPaAHcq11yH1O24AFQiih0FqXPB07VxEIOJIMAczUhxHUW 2UQeex1JkkMo/duWYhAv0EbsclYF/+5/efH6Q1qXSDoAHvrhmltGNr1IXF53R3uBMINv Sx78y7ANoAsxfrl7Uq6IbX4bbqhW5I6FwThQo3t7iVEyM4HCcI8fUK6NFb+8k8O67EYt xwoENRHTCmaxge1Jmr0Z7FaMfLpe8pH6CLK3pxZJmBXxBFPPzMEQIpO8d88imHcnMr1Z o+7DjxgqKARu30JBd/c7Rud7aRQ5C1fzpxhohByPnGxebk/nS2z2tZ6sJiIXHkZleRdf P4yw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hxlmTsEl2WCBaG2m+2jn1BcOgrk9vuaQdEtyVugSxYY=; b=oUghG/5ql8RMc8Ny56t2PtL63oyCN5iDpjrMpK+tIcWUGVghC1OgHyn/WGdyyAT9sa TU3tUukAbu60b0+oyYWg1r8mL0nxXI7/JNDD9PA/VNPny5LW8rJqyU4GQGSJ9hOb97JT 8VhwPcv6hWjNhGa5gfLZyCJYbkXZEhUvwrzzGAAefEbGEfdtzZ2VuiyZkoJPwYtdu97l pUJu3x6sI9iDk+a6kvdp9Jsb+Wuvu4vjBI61SQq9hEGeZ3LZ/idOKP7TicomyyZNqcR8 13pLqVb20r/7ztLYenC27SyP1rq3O41xfIF77OyXpiPaeKfp3RbdOXjQiho+xZFAbksm 3wRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KfxOS3sU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si8525319edn.425.2020.04.16.08.30.50; Thu, 16 Apr 2020 08:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KfxOS3sU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633694AbgDPP2l (ORCPT + 99 others); Thu, 16 Apr 2020 11:28:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:57344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898421AbgDPNoC (ORCPT ); Thu, 16 Apr 2020 09:44:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F1CDB2076D; Thu, 16 Apr 2020 13:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044641; bh=7RdBcKbcSA8txvE3ou1/hXYhwhq2DHXO8rive13W17M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KfxOS3sUxLoquHCNZ54SKnJ4yAGCHd9tTM3TYCBOGQMltF97kO7S2+Oz5AAkGMksX U3aIF4xoRFhKp8mD0NqYJUz/HbvDh3X81EsEqQtbmMkSbgTU9BwM1w78I2Gq9MTWBY vjkbUnwSJ3Ch5KD339GomVw+X+52Y7/ka/M5obHI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sungbo Eo , Marc Zyngier , Sasha Levin Subject: [PATCH 5.4 040/232] irqchip/versatile-fpga: Handle chained IRQs properly Date: Thu, 16 Apr 2020 15:22:14 +0200 Message-Id: <20200416131320.890660320@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131316.640996080@linuxfoundation.org> References: <20200416131316.640996080@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sungbo Eo [ Upstream commit 486562da598c59e9f835b551d7cf19507de2d681 ] 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 Signed-off-by: Sasha Levin --- 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 928858dada756..70e2cfff8175f 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); } /* -- 2.20.1