Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp378376ybg; Thu, 19 Mar 2020 01:16:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv/cn34qrr5s/3AzlHCaVqyMXUa+/bJOtWdN4Gxa/nl/gzB4Z+9F4A6fa1DpVS87T6ROLul X-Received: by 2002:a54:440d:: with SMTP id k13mr1494596oiw.72.1584605764383; Thu, 19 Mar 2020 01:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584605764; cv=none; d=google.com; s=arc-20160816; b=Q+laFJ1YZoy1VsFIYDDMB0DeKnr3/Bk/Ahz5G9Ei5vjNG4d0/+fyHj6uH0F8RSag+Z ziaemutVL9g8QUmiLMaID68CrwOSw0bXsdggFa12iO4dcdqaxzRqZ74m/+UKd9jDkqRB YQ6+KVV5CckK24NxudfjNG1iATor8tASLeGZWtZIFBrpnn0u/C6zmpV6KEN+7CQUDVsS lVR5z0KP9dNO8GJDE+2uFS+BS1hdQoIXruLzg++jD87HJi1t0g9GHTEaJvRrRPwv+5z+ NP8f7qCvUNdsDmxc2jNuNI3jMxXkD0aiWsCwgffNUojlyIic0oMryrXLAWtmIly+g3Jv 1l9w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rjeQJtst2T6i2m2bmZKswd/k9BXvMflb7UrV/wjEqqA=; b=wxSOHSH4kfE6HCcodh2G++kKIAlOYp1vbEX5xFcQoJ9vvXz3JHkUpfV2w+srLaP+zA YXW+5CnHwBjRwlJUq+Ox9JPR40rt0EgGAxxRbeBP1HnrxBMecYH1hpJkUBbp96CN0ijY i57BXR1OAOPsMNRJIaHHzBK1pO/cCGgWVCnwXlKqjzvakRoDYxp/qrWCbukK8Ye1mu/Y bjdnMRLAd3VQQqGTn0Q496QeCIXeiI65ynLdiA24l7xhHzW2FHoHwxZt9hLgM01FiSfm SmVJAgmUlUDXTiwV8OKCj2blXTIUUhXjcODlIgNyHOoj8xUM7AIkx26fXY7yC4DV8fFu jTNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gorani.run header.s=MBO0001 header.b=xESSd49P; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gorani.run Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j192si658197oih.233.2020.03.19.01.15.51; Thu, 19 Mar 2020 01:16:04 -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=@gorani.run header.s=MBO0001 header.b=xESSd49P; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gorani.run Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgCSIOn (ORCPT + 99 others); Thu, 19 Mar 2020 04:14:43 -0400 Received: from mout-u-204.mailbox.org ([91.198.250.253]:21842 "EHLO mout-u-204.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgCSIOk (ORCPT ); Thu, 19 Mar 2020 04:14:40 -0400 X-Greylist: delayed 507 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Mar 2020 04:14:39 EDT Received: by mout-u-204.mailbox.org (Postfix, from userid 51) id 48jfcM4JnmzQlG0; Thu, 19 Mar 2020 08:05:18 +0000 (UTC) Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 48jGln33z3zQlFx; Wed, 18 Mar 2020 18:11:17 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gorani.run; s=MBO0001; t=1584551476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rjeQJtst2T6i2m2bmZKswd/k9BXvMflb7UrV/wjEqqA=; b=xESSd49PLCdfXlqlQWuJ+m4wfH0gYPY4nAy0F2G3ZYImoo0HugUoRXJVig5pRYeeeqrvhc PxKCJ6Z1g05HxUHMF6Vjh1rx9JtYgEQ6zAOqZwtqtyPhHhZ1QiNWpD2nt76YGR9HjZnc7D 4XtPN0QmKyRe/gMmVy5m9F07e5iU/I0iqD6DaFyJJgNZf59AjByqNn+rLr5Rwneuubcp99 Rw3S9SIaMhEAk68OmLaj5W4fHr69yhOLSVFKaTTNFJCyB0jJT9aAhUBOrkt35fFqXrvunZ 5lPXEbqeIVegUx10nJlGqZwthV7sOP0Y1wfGnGzpX2VmT+xbiqseuVPWCOcaHQ== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id dDnmRVvElgnL; Wed, 18 Mar 2020 18:11:14 +0100 (CET) From: Sungbo Eo To: linux-oxnas@groups.io, Linus Walleij , Thomas Gleixner , Jason Cooper , Marc Zyngier , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sungbo Eo , Neil Armstrong Subject: [PATCH] irqchip/versatile-fpga: Handle chained IRQs properly Date: Thu, 19 Mar 2020 02:09:04 +0900 Message-Id: <20200318170904.1461278-1-mans0n@gorani.run> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Sungbo Eo Cc: Neil Armstrong --- drivers/irqchip/irq-versatile-fpga.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 928858dada75..08faab2fec3e 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,15 @@ 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); + chained_irq_enter(chip, desc); + if (status == 0) { do_bad_IRQ(desc); - return; + goto out; } do { @@ -82,6 +86,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.25.1