Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1844168ybb; Sat, 21 Mar 2020 07:06:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsNNfvZDAsUHMqqFsLERU0Dv0h833k7efsOW5cSJ3jEA2fXvMyd1QDOZZXPt5gn6H2Gsc9F X-Received: by 2002:aca:c78d:: with SMTP id x135mr10301173oif.51.1584799588754; Sat, 21 Mar 2020 07:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584799588; cv=none; d=google.com; s=arc-20160816; b=Xe9PGCxK53wy8lyv8GlVbqQRgK+/drzthMWF7nmuDCTXBhhGs7JIkdNQ9pIA6yOWW8 FrL3WwzDc1AjC883zxZ+MMGLFEoAxCxzrVF+uCa1186eZ6RIoFeUGG5HQyt5685EvCZI vIt4M3vJgn9VvmoTbnvN3PRcFG77GSj6CoIGHk8h7e+WL4x7ZWOPtsib5p6cCtvd87h1 Fo7TGzNlEjZMsriCb1LyVDlbpQsCE+OlRoMeDVEOiIwEGEuh69Xbdk0oXZphyL9dlhXD oy9oD6seiieW94abOvyzONyrMqyg/yrL6Ch9SnGaxg7QZcmnZDO9Tf1bCAPGCNk/cSci H0Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=CRxsoTyFNrDYh1i5Lfdccs8gihcswjyb0QohhZpfr9A=; b=SN/Y2XozTUdLmeNO2RtXeUU7rp44Mt4oBx3URzGCgNGKCojucUIyoyRlzwDZ8peocP te9t4tmqRaK2f9jDMhxXTJcLGjPjOaErKWynLUXg9BhF2qhmfH0Mwtdq4iEK/TzHV8RZ PeMUIdbEyET7KJQbSQxKvB4Hhp9zR1rdeKYHsSoVvYtb1MBExyBEWfdc6YU/iYG7mkeV EeVWz8G0ziQdymfi1qcz4XgBkDlig1EDmVoHZ+Y0TwaQEgjopZTHN+oDtyqFzPeD1PF8 IE+rcQyLz2yFPMKKqt/pZT4PGg/MokmfsmT4Pu/oV0qmSZ8Ayu0B46Q8GIEGHDNvUchm Rq6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Viee7yhY; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x188si4438345oig.140.2020.03.21.07.06.17; Sat, 21 Mar 2020 07:06:28 -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=@kernel.org header.s=default header.b=Viee7yhY; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727313AbgCUOFE (ORCPT + 99 others); Sat, 21 Mar 2020 10:05:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:53122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbgCUOFE (ORCPT ); Sat, 21 Mar 2020 10:05:04 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 916B320757; Sat, 21 Mar 2020 14:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584799503; bh=2LYqxlJLALkKFlpvVEGc+tjKLuBtfj/ozo9eACQKvaw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Viee7yhYqu5DhM3KRxgC7BOYKsHKq2eVJ3mZWlwBmROgY//CXPk6aiRd+kdVMPlfl bQWwtGOskyltOReYv3sK1c/ZZ+aZUm6WpLLUcOluQJk0uRVtwhvRmNZh9V71h0QrpB 8bzoBozpXhJ/VbzRA7/M2wjTBafP9GpHyylNWXUw= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jFekH-00EVV7-Sn; Sat, 21 Mar 2020 14:05:02 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 21 Mar 2020 14:05:01 +0000 From: Marc Zyngier To: Sungbo Eo Cc: linux-oxnas@groups.io, Linus Walleij , Thomas Gleixner , Jason Cooper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , Daniel Golle Subject: Re: [PATCH] irqchip/versatile-fpga: Apply clear-mask earlier In-Reply-To: <20200321133842.2408823-1-mans0n@gorani.run> References: <20200321133842.2408823-1-mans0n@gorani.run> Message-ID: <4c8b67a7912b2863db99ff4e765fdb8b@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.10 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: mans0n@gorani.run, linux-oxnas@groups.io, linus.walleij@linaro.org, tglx@linutronix.de, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, narmstrong@baylibre.com, daniel@makrotopia.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-03-21 13:38, Sungbo Eo wrote: > 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 > Cc: Neil Armstrong > Cc: Daniel Golle > --- > 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 70e2cfff8175..f1386733d3bc 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 You're on a roll! ;-) Queued for 5.7. Thanks, M. -- Jazz is not dead. It just smells funny...