From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EE651DDC07; Mon, 22 Sep 2025 09:49:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758534551; cv=none; b=jHVsydlnrj4nsWxdmXFZNGdYECrTvIl1cP+BqzbUQL1ZGGczGCvQbvJq+VEYSSe8ckFLUxYFATQUI2nrBLIZX80fvF80gSMqLfC2EABzqQylyLVjTDYE1QaiMZRMYN/c+0WbkTnh41+ee1pn1vImFRnkEi6fn1fjRtMTg3nKFiw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758534551; c=relaxed/simple; bh=Q8hjHHI92FUJG/Q9OirXfeSxmjvtPo3DNGshQrBVLfo=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=jJMD0KnTvJt4rnV7si5C59R/7+uKOwlC9HQgTjcbyIHFeAZuZABRZUaqHViKiaFQ0BGmAzui8dnBfW0gEJK5RPvHkBG3MDRfd7Y1mxRZDSstpmqwNH6l/36JQ+j9ee6+1avf5f5NJvTWl7vHdWyeAjE4xvy6NaMv6x2yJeSttiE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lChbdvKP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lChbdvKP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3E83C4CEF0; Mon, 22 Sep 2025 09:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758534551; bh=Q8hjHHI92FUJG/Q9OirXfeSxmjvtPo3DNGshQrBVLfo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lChbdvKP8hZRmrL0wTHisczsxZTG4Yzmtzn6kTQt7pTg+Ufu96TVo8/PbnezqCuzl +0VXq8AzRrULvqbM04A7vS0f4NTSf6K67gyw0DZAlG34kxcr+esudGqmzOnvq4JUp/ j5g3neL9X3hIN5RiuttjwsRajrgn/U1dy0G8MxKmUq6HTqzBIOd+Sw8VgkTgG/fpFE wcUAEKaBaKXwosnzGa9qgsQkifbJBQA2qLgKVm7gVZqMWwyTjWHjCn/O2QE1GO3UEP QHWZTHWWQ731ef5RZj3qfRHG8MiCJ8AuOjvfLneTrMhCqLTbhMo0+dk611gM1IhSV0 aWsfVuIAcmIQw== 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.98.2) (envelope-from ) id 1v0dAS-00000008MKt-3Twz; Mon, 22 Sep 2025 09:49:08 +0000 Date: Mon, 22 Sep 2025 10:49:08 +0100 Message-ID: <86h5wu24x7.wl-maz@kernel.org> From: Marc Zyngier To: Marek Vasut Cc: linux-pci@vger.kernel.org, Duy Nguyen , Thuan Nguyen , stable@vger.kernel.org, Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Bjorn Helgaas , Geert Uytterhoeven , Lorenzo Pieralisi , Magnus Damm , Manivannan Sadhasivam , Rob Herring , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: rcar-host: Convert struct rcar_msi mask_lock into raw spinlock In-Reply-To: <20250909162707.13927-2-marek.vasut+renesas@mailbox.org> References: <20250909162707.13927-1-marek.vasut+renesas@mailbox.org> <20250909162707.13927-2-marek.vasut+renesas@mailbox.org> 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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: marek.vasut+renesas@mailbox.org, linux-pci@vger.kernel.org, duy.nguyen.rh@renesas.com, thuan.nguyen-hong@banvien.com.vn, stable@vger.kernel.org, kwilczynski@kernel.org, bhelgaas@google.com, geert+renesas@glider.be, lpieralisi@kernel.org, magnus.damm@gmail.com, mani@kernel.org, robh@kernel.org, yoshihiro.shimoda.uh@renesas.com, linux-renesas-soc@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 09 Sep 2025 17:26:25 +0100, Marek Vasut wrote: > > The rcar_msi_irq_unmask() function may be called from a PCI driver > request_threaded_irq() function. This triggers kernel/irq/manage.c > __setup_irq() which locks raw spinlock &desc->lock descriptor lock > and with that descriptor lock held, calls rcar_msi_irq_unmask(). > > Since the &desc->lock descriptor lock is a raw spinlock , and the > rcar_msi .mask_lock is not a raw spinlock, this setup triggers > 'BUG: Invalid wait context' with CONFIG_PROVE_RAW_LOCK_NESTING=y . > > Use scoped_guard() to simplify the locking. > > Fixes: 83ed8d4fa656 ("PCI: rcar: Convert to MSI domains") > Reported-by: Duy Nguyen > Reported-by: Thuan Nguyen > Cc: stable@vger.kernel.org > Signed-off-by: Marek Vasut Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.