Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3029157rwb; Mon, 3 Oct 2022 08:44:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fCPQbFGTwGiWm/JLCeWChI4mtOIBFIyqQvdLT9Yh8R+D7WZ11yx6lzlAirdrbBBi82jFb X-Received: by 2002:a62:6347:0:b0:531:c5a7:b209 with SMTP id x68-20020a626347000000b00531c5a7b209mr23163977pfb.60.1664811855035; Mon, 03 Oct 2022 08:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664811855; cv=none; d=google.com; s=arc-20160816; b=BoMCcvTMxiK/PBZx/ZwJqjNjE8RDHJ+yZCFPyDM2elWaqw/QmQzHzLxpiC0GeIYApk BT7mPhYg/TLMmlheCf4zAyUzBlDAbeVdsgKoTeln4Z1KAsqj696LY/5/rXBI0wmwIek2 7XKDo8bDeynDFUpskvEJ1GzuoHtK5VVHYR4exeB8Ktr0lWMNNhRPVEOloEoWmIk+Dxsg 1yM4sBR6OFD5RI1WvvdPD/xm7NzB81wwY2r5aiUGPfECcg3veT/KTZ+VHxeyb+H+NYJG YCwA0ZAuUbDpzzF2eUCsawm/IGCyLGCZbggTNPD90V9ZVAtOaOtx9CWiSugNF2KUfImX QJSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=km7y+u1+8y0rEZE+GJxumFqlJqdb1qOL9odrRvZD1ro=; b=lXKOe6g/X2LBY2mrbhI8JhN3ZKlaK2oMkTc4scOi1mmSjFCahX9xCU/1ouNmD7l4bl ZfCYCa6mvTXu7YHPbhnZYPRiWSpd3cigFwxHMXuD/hHJlwiz/sGFR3QwSTAb68iAHLFh bWGQq0WZHZkyx63ijj2c4sugxdNRBinudbvX013EFN5qsubaDTOZ7L2f10pto/FoFFGS TS8b0+lsJHR8MdH6Yi82CXQ4Wgvj1CVl8bPWl2lzQv/blIE/0QEqnxjWlai+20Wo97Qt m+/DNchEqJpY5ADs0gIQaQdN4Ev/sJt3jG/ohaKz/hnZOGG0hybcySxGNk3OnOlJUgc6 o+/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBfjbu3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a635312000000b0043941e55335si10367822pgb.842.2022.10.03.08.44.02; Mon, 03 Oct 2022 08:44:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBfjbu3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230134AbiJCP2Q (ORCPT + 99 others); Mon, 3 Oct 2022 11:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiJCP2P (ORCPT ); Mon, 3 Oct 2022 11:28:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C7096410 for ; Mon, 3 Oct 2022 08:28:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A8BF661053 for ; Mon, 3 Oct 2022 15:28:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12E8FC433C1; Mon, 3 Oct 2022 15:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664810893; bh=m9WGrVnUN7ntsy9LkSqU88tht2yXhOCMyHJs4NJXAI8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NBfjbu3NMpOmBcxOxSe9w5r+TCMQYDKZnlBgekTec3Qt1AVWayrvjFwigTy4ukEH/ NbL4uZjnS/BBzL+fHrA4jcUwkXeGrgdVRvxGXQabvmCVfjsuXxVVkMMFGVX0S6eTK4 XpLxFWt0Sx6Ox0QKhlQ4J+VqcRW6HL1mLPvkAa0Uc0pyWG9C9O1w4afjuENEqozo2o U7b5OVra5bWRkgt7wEY7Y5S40ybPFvTdf0lh5QOJSvA6xubSEmuRsyXv5lZarJHyAF DVrbZlIMXK94s+tnfQTCmpG671zj7+IMbpBATzsfwZKLWMrIiQw/9/J5UxGjyJvEVL NLyMlkocAXB7g== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ofNMY-00EKWH-S4; Mon, 03 Oct 2022 16:28:10 +0100 Date: Mon, 03 Oct 2022 16:28:10 +0100 Message-ID: <864jwlapv9.wl-maz@kernel.org> From: Marc Zyngier To: Vladimir Oltean Cc: Arnd Bergmann , Lee Jones , Thomas Gleixner , "linux-kernel@vger.kernel.org" , Rasmus Villemoes , "Z.Q. Hou" , Biwen Li , Sean Anderson Subject: Re: [PATCH v4] irqchip/ls-extirq: fix invalid wait context by avoiding to use regmap In-Reply-To: <20221003094542.tlh6xoee77akuubn@skbuf> References: <20220728144254.175385-1-vladimir.oltean@nxp.com> <20220818141309.ifl3kddmxojqc2jl@skbuf> <20221003094542.tlh6xoee77akuubn@skbuf> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vladimir.oltean@nxp.com, arnd@arndb.de, lee.jones@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, zhiqiang.hou@nxp.com, biwen.li@nxp.com, sean.anderson@seco.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 03 Oct 2022 10:45:43 +0100, Vladimir Oltean wrote: > > Hi Marc, Arnd, > > On Thu, Aug 18, 2022 at 05:13:09PM +0300, Vladimir Oltean wrote: > > Hi, > > > > On Thu, Jul 28, 2022 at 05:42:54PM +0300, Vladimir Oltean wrote: > > > The irqchip->irq_set_type method is called by __irq_set_trigger() under > > > the desc->lock raw spinlock. > > > > > > The ls-extirq implementation, ls_extirq_irq_set_type(), uses an MMIO > > > regmap created by of_syscon_register(), which uses plain spinlocks > > > (the kind that are sleepable on RT). > > > > > > Therefore, this is an invalid locking scheme for which we get a kernel > > > splat stating just that ("[ BUG: Invalid wait context ]"), because the > > > context in which the plain spinlock may sleep is atomic due to the raw > > > spinlock. We need to go raw spinlocks all the way. > > > > > > Make this driver ioremap its INTPCR register on its own, and stop > > > relying on syscon to provide a regmap. Since the regmap we got from > > > syscon belonged to the parent and the newly ioremapped region belongs > > > just to us, the offset to the INTPCR register is now 0, because of the > > > address translation that takes place through the device tree. > > > > > > One complication, due to the fact that this driver uses IRQCHIP_DECLARE > > > rather than traditional platform devices with probe and remove methods, > > > is that we cannot use devres, so we need to implement a full-blown > > > cleanup procedure on the error path. > > > > > > Fixes: 0dcd9f872769 ("irqchip: Add support for Layerscape external interrupt lines") > > > Signed-off-by: Vladimir Oltean > > > --- > > > > Just checking in on this patch to make sure it hasn't been forgotten. > > Is there something else I need to do such that this patch gets accepted? No, it just went under the radar. I would have liked an ack from Rasmus, but this has been there for long enough. I'll queue this as a fix for 6.1. Thanks, M. -- Without deviation from the norm, progress is not possible.