Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp706866lqb; Wed, 29 May 2024 08:17:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJoMMe6xPbfXR2Ar8rof2JiBHEC4NZ17ovCN+3WOfIqwxu4/z8Hh2HteltoNt1NoRjZJd41xm4ZkGK726sOk+AX9C2hDksr+FYym6QVA== X-Google-Smtp-Source: AGHT+IEGa5NigyiDsr4+7xhcZLwufuT9umjV4fQ0St5we6oE/UhdkZgI7PIWR7IgnqWDdrio0sSA X-Received: by 2002:a50:d784:0:b0:575:2ccb:8138 with SMTP id 4fb4d7f45d1cf-578519bdf01mr11391673a12.29.1716995848767; Wed, 29 May 2024 08:17:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716995848; cv=pass; d=google.com; s=arc-20160816; b=TNSRahsS+KzA70ksXX8MdjpUWRGUWhfYZq6SRt75CcVEh9qLP3gbc2/seCyTxmwOO6 zdHOVzZmH13zBXTMFsS/vdUVE0pRmPqKRsLuFYD7E+/wJkzXRHlaZ9KfbHdEOe2l0GGT w54n1tZYgp2+um3soLQQwBgKcqn5ooljBg0JN7bSl9SvhaARB+3XODHWA7PRJtnhbFXF Vor77g7lhdr8URRBptdlPR2I4L/5hjRi+Qdq5LOIdpuoRhiV8AOa1ruKpoUIgFRPehms ZydZP2v+/NLqNRUGVACD2ORggUWi474B4vEcKFv/siVPbMkbKuF4NnRFvD2AO6A9u86o cSsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oBt/XMiIne95fdEz1Q9rgH9VBzBwZXslHe3I3m5QYAU=; fh=UAP4UlyXBWrDm4LrfAIAOyvf1/igXhJG9TQNvL7VBYY=; b=CMzsz0HwLN60Bh4KxB9Yw6TtwCQ+W+tGLPOCH+sGb9F40fPVGZOhTJ3loUDM1nSKt4 +9UjKpfi9eSSlNM3syPj/gTOyirDhlvlXj7n83Wtp3hwERDemEBoEhxp4iE7vzGtn7FZ e/S322PWNRA+3DFUbOB5BcgqofFc+YeB3jAZXpZ8ck7WjvYuCqdQt59bPugOmcHBqERE wwwW5lV2scnZTnqMxRoBcEk9R5UgaPI97huJoCuynRYirreehPA7mPoyTS86lzrk6DGh BjDTN2htzXqVBuMsT2rSlosrOoLFb1uxywD1XbK86faFn5fZtOzLRF9YDzOUagUkCbv3 LnNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W0MlBfJ+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578524b04casi6463247a12.481.2024.05.29.08.17.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 08:17:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W0MlBfJ+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7E6E91F26626 for ; Wed, 29 May 2024 15:17:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B42417F390; Wed, 29 May 2024 15:17:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W0MlBfJ+" 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 626E317BB17; Wed, 29 May 2024 15:17:20 +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=1716995840; cv=none; b=jVpgdCrQiHL9Bw1UuA8JLg/O3GsOC/lttLIPlfsNScdq2sKeD5D/fbYcjUQR7AuDc7Tu8uhVVf1KWBfDFJba5JS9/TnetQfYzVFRBh61MioZfKw+tKn9hcINVVqdMmM+YxZqiARRwIPQn8yiKDyKo8gukMPUgMWXKnTi7ml8bnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716995840; c=relaxed/simple; bh=tRSPxp67b5/5Zs1BaKIcU7e76dVz6jxvEF0XMXgjsqE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q0SDAHTP/8DY1A35nZyDyLhX64vtD+kH/NNgCURbGQS508hX/N6rG9DiVckEm36mJg/3uYkHC8OIY9AuntCStWWM8if/JKiWB2Y2Umt/apaZvVI5Y1HgHhZ5sx6BNUPwEqdDKozaog76Vc5VpSkuXf0TQMBeqz3RItgjrSSdxrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W0MlBfJ+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3737CC113CC; Wed, 29 May 2024 15:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716995839; bh=tRSPxp67b5/5Zs1BaKIcU7e76dVz6jxvEF0XMXgjsqE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W0MlBfJ+wGg3UwyFMwWfZEgt0MLOAeK2hTSg8URUYtWhVL5zAyca4eQcljcTBE/Wm rALc2J3z9jeSoCaSKpP8TWCKnEaGhF9HjkOZm9GRFPSw6JV6Wcd4NPE7FxQLA7F+ZJ GY2XMYc7LpkiNQCmTfNnoduF8UJER1QV6/tEWWBAGeebh0oGBtrfgVq882C+PSTA/a idCgMvssZHIEAkunqTbN4PkGsxsQxsWC67dB0R3BP84nm0NVcKtxjtTXxo8KrhYa7r 9CEJC6D53/7AgtSIseJSnS44gyZZPAcwA9WMV7S41q8EDav25p6ct68ZcvU5P9S2Wk NyEbh9aLUFgKg== Date: Wed, 29 May 2024 16:17:16 +0100 From: Conor Dooley To: Marc Zyngier Cc: Anup Patel , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Saravana Kannan , Rob Herring Subject: Re: [PATCH] of: property: Fix fw_devlink handling of interrupt-map Message-ID: <20240529-rust-tile-a05517a6260f@spud> References: <20240528164132.2451685-1-maz@kernel.org> <86bk4pm8j1.wl-maz@kernel.org> <86a5k8nbh1.wl-maz@kernel.org> <868qzsn7zs.wl-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QuT3/USFLVPqyc21" Content-Disposition: inline In-Reply-To: <868qzsn7zs.wl-maz@kernel.org> --QuT3/USFLVPqyc21 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2024 at 01:00:07PM +0100, Marc Zyngier wrote: > > > > In the RISC-V world, there have been quite a few QEMU releases > > > > where the generated DT node of the interrupt controller does not > > > > have the "#address-cells" property. This patch breaks the kernel > > > > for all such QEMU releases. > > > > > > Congratulations, you've forked DT. News at 11. > >=20 > > Can you elaborate how ? >=20 > You've stated it yourself. You are relying on a behaviour that > deviates from the standard by having DTs with missing properties >=20 > And since we can't travel back it time to fix this, the only solution > I can see is to support both behaviours by quirking it. I'm not convinced that there is any actual production hardware that would get broken by your patch, just QEMU, so I think it should get fixed to output devicetrees that are spec compliant rather than add some riscv-specific hacks that we can't even gate on the "qemu,aplic" compatible because QEMU doesn't use the compatible created for it... Spec violations aside, the QEMU aplic nodes in the DT contain a bunch of other issues, including using properties that changed in the upstreaming process. Here's the issues with Alistair's current riscv tree for QEMU w/ -smp 4 -M virt,aia=3Daplic,dumpdtb=3D$(qemu_dtb) -cpu max = -m 1G -nographic qemu.dtb: aplic@d000000: $nodename:0: 'aplic@d000000' does not match '^inte= rrupt-controller(@[0-9a-f,]+)*$' from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@d000000: compatible:0: 'riscv,aplic' is not one of ['qemu,a= plic'] from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@d000000: compatible: ['riscv,aplic'] is too short from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@d000000: Unevaluated properties are not allowed ('compatibl= e' was unexpected) from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@c000000: $nodename:0: 'aplic@c000000' does not match '^inte= rrupt-controller(@[0-9a-f,]+)*$' from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@c000000: compatible:0: 'riscv,aplic' is not one of ['qemu,a= plic'] from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@c000000: compatible: ['riscv,aplic'] is too short from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# qemu.dtb: aplic@c000000: Unevaluated properties are not allowed ('compatibl= e', 'riscv,delegate' were unexpected) from schema $id: http://devicetree.org/schemas/interrupt-controller= /riscv,aplic.yaml# I guess noone updated QEMU to comply with the bindings that actually got upstreamed for the aplic? --QuT3/USFLVPqyc21 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZldG/AAKCRB4tDGHoIJi 0oYWAPoDsUoaVQGx27axveY1n1lIrXkUGHlGo31YRIruXNo+ngD/R9/DjC94q7t/ JpAE9JiPE1EcGTOVFoRzpEHCL0sh8wg= =qPe7 -----END PGP SIGNATURE----- --QuT3/USFLVPqyc21--