Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp760232lqb; Wed, 29 May 2024 09:41:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUsL63Our3LMElNF+2g59SEFfHqZo8qmXfO2aqM7mag35yDAWGFaXdHWoQ42VYrf4RMOXKyPNKctj7Pr8Jiq6m3UrHs9PgAYsJ2h8yYQ== X-Google-Smtp-Source: AGHT+IELGHgKWypUN+iRlyk2JjWZbOlU9n4gusW20n2aANHsX6dUxmHoGeCpUVCnGulb2rn1Cs4G X-Received: by 2002:a17:903:8c3:b0:1eb:6527:707f with SMTP id d9443c01a7336-1f448c2471dmr174682385ad.39.1717000872940; Wed, 29 May 2024 09:41:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717000872; cv=pass; d=google.com; s=arc-20160816; b=e/8D2itgDlgQ10Bm74heMnGjNbwu0kx6wFp8K4ybtuANsZbP2x5eNo4Cs9e8a82LVr 2i3/tBVZaSfD3zGt3tay3JNN3+2G35fZ76+IYfybS+g00e5kbIWy8iqqC3Q5u/9qt0dT HgdD3uR1eWLTf70JGq4M2+WrnyzHU476uTUzTvKG6+53ptqsPNKCWUFYPINInAF3ift4 6ZUjrH8ycihtaeZSq/gpbgbMmdSmcc5t9cftmgcCwzFaj7JgMXERYfXMuXijYijaWFzl C32gAxATA+T/7u/dnxiDxDmNew8LT3Hah/r2xGSehOmFG0dVYQEMb9sD4WL0whiH/KuA FqPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Vhg3PSDLD+pC/Tu5xX3Yt9O/jtF+LQuu+I4tEFxm4GE=; fh=LdpRdkD6KZCfhrOXb4+CPkk8Cktryq0JqJuloHoS6vU=; b=NpwMsQH1NUcDN1jKxvCDb1KTH2MKErWgEbjSJ97PNNf8Td3vZzndMMJ04sDx6LDQSt ynq05ozySX9OXQyMSHAcle7RulOwkOEKjaSFLD+SvtQTSRvLe6Et2W2gi0ATR2qwRt1h KZmyDAkrSCHzYyGrDYl7zeTOLiphyZZ1YFWETMMWboZe4LN8hN0AWRUskhalkpS2e+WB UWpZjwUHXfzFHg8G8M+jBVOB+KcCE5cnxOUHIC/cadtpunIA2AgZ9A//3s2vl3fRWqsX 2X+DXE9lLGxU0R8gh2GOYLpvdRyhln6sw/UoJy8NFr9o9HcbkaHW2BZ9w7bIO5ujAIWw 79SA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=PgOBpqIl; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-194484-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194484-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9abc27si102026675ad.432.2024.05.29.09.41.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194484-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=PgOBpqIl; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-194484-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194484-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A03C128942B for ; Wed, 29 May 2024 16:40:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BA5D1A38CE; Wed, 29 May 2024 16:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="PgOBpqIl" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF0A1194C87 for ; Wed, 29 May 2024 16:37:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000668; cv=none; b=ow3dTIYMfFvIJgG16sBqobMnYe9I+fa+AL276nNSkUQYrSqtSZI1IP+xkkJXazP0GF7xxJD8brsuYeUfnNnEP90lexAqB610EseKXNmPW40XOnyoOP5+3dJdy/KHpbMzz/Na0DRcOB5dlMLieGNWseC7hG547l/OjhXBV2xDaOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000668; c=relaxed/simple; bh=D5hQleF4je2re4WTabKnBIrdc70AGoD50APXI1WJ4SA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G7W7mINlreauamVJn9SRTcfOMBZJz0ZBwFlYV8U+sgcE95qx8kJICQaW3mxjJ2Lxw6hE4sbvhZm57pDn2zqV+vkfNB1rcnE4Ry+Z4Y7vvKtHyu6IecJSPQrB9ESGZu3MUCM0jofi706VRMafl6m9vZcbpprcwBdDM3fJ8JSz1WM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=PgOBpqIl; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5295dada905so167128e87.1 for ; Wed, 29 May 2024 09:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1717000665; x=1717605465; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Vhg3PSDLD+pC/Tu5xX3Yt9O/jtF+LQuu+I4tEFxm4GE=; b=PgOBpqIlEgm7O6j5hrl2SrvqM/DRmO8rsrFXF9bQ8Oxk+uEEL0DN3NxXcadUTU8R6W Zy2s+WvYy1Sqw5KRUMUY1MRd3/dduwglqQkKtfr2CIaF2PtY1/szEdJS3Mirr+3q3/x6 8whEJzLTvg7qkN7ktuYaBq4GMFfB4TQd1NMTUoVqq2J2l9cgRrXaI9bdIxkBi2n0r4QE bRAxISFuFr9WtHF6TNKt/dqw0p4919TRc7Kc/x7Img0asS2fVGEReEwkkbi9KO0mIL/z 61HqoNsuLJ05OhSgVM4n4qdpIU8xiUSB5qwD29Ku70/7kzEFe3e8H6pT7Vg73HgV3jfX dR4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717000665; x=1717605465; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vhg3PSDLD+pC/Tu5xX3Yt9O/jtF+LQuu+I4tEFxm4GE=; b=nIZUb76dyNAL0nlZeKXlKpCCfw/Ofnws4O2z92mTywQQhorYuonHRy8WrYNAt5wZl8 l3ticQYuXVMYavH2m1PxO/IvGU/JOMGYCuINIWojkFHVbHbvWf/ISpDs2aL/FRliCaQW C04JPHb1lIxqG/myAWTLmpPQ1AG6h/0SfbPtAIxi731HS1+62hQveIDG6ZEI7WH5MPAP bXReCyEJVlXR1MWRtPGKAljBTSKyy3RRNrN1F8E2uD2U5oMwdJ6yMsoxxSS3+hfLzRPe Nkwzw/VAYt33bHq5cR/wJ1+whKfHj3ROw6/5NbSP12Rim/wunLOdpXeqBfk+TbvfeGNO KWeA== X-Forwarded-Encrypted: i=1; AJvYcCXA735zhPulQxxgbGAzlVZeZ9toH8YfyvxiqcDg9M2jvL7gDuLKfEfiLnySSzZsR2MC78pbdTsDB6bIya/6H/SlyKI2X5bz2Rb3ylvZ X-Gm-Message-State: AOJu0Yxv1DeEDG27Hw2vuTFEVxBtS3Fcq51NDSqPVfSn0NJAXz7or70W C341V3f59N3Fn1+waUU/a09vsVm1Oo0xt5jVubRxFcXNqstaQIz/4/KJn+UiIDI9bbPvmJQxmU1 JvKG9yQlia1J3SXRsdTEYotZzGcNpo7Cw3kPW+Q== X-Received: by 2002:a05:6512:3ed:b0:529:b6d1:572c with SMTP id 2adb3069b0e04-52a848cf73bmr728684e87.32.1717000664855; Wed, 29 May 2024 09:37:44 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240528164132.2451685-1-maz@kernel.org> <86bk4pm8j1.wl-maz@kernel.org> <86a5k8nbh1.wl-maz@kernel.org> <868qzsn7zs.wl-maz@kernel.org> <20240529-rust-tile-a05517a6260f@spud> In-Reply-To: <20240529-rust-tile-a05517a6260f@spud> From: Anup Patel Date: Wed, 29 May 2024 22:07:33 +0530 Message-ID: Subject: Re: [PATCH] of: property: Fix fw_devlink handling of interrupt-map To: Conor Dooley Cc: Marc Zyngier , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Saravana Kannan , Rob Herring Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2024 at 8:47=E2=80=AFPM Conor Dooley wro= te: > > 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. > > > > > > Can you elaborate how ? > > > > You've stated it yourself. You are relying on a behaviour that > > deviates from the standard by having DTs with missing properties > > > > 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... I also did further digging and it turns out the "#address-cells" is missing only for APLIC DT nodes and this issue only impacts APLIC DT node creation in QEMU RISC-V virt machine. We should just go ahead and fix QEMU. > > 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 ma= x -m 1G -nographic > > qemu.dtb: aplic@d000000: $nodename:0: 'aplic@d000000' does not match '^in= terrupt-controller(@[0-9a-f,]+)*$' > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@d000000: compatible:0: 'riscv,aplic' is not one of ['qemu= ,aplic'] > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@d000000: compatible: ['riscv,aplic'] is too short > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@d000000: Unevaluated properties are not allowed ('compati= ble' was unexpected) > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@c000000: $nodename:0: 'aplic@c000000' does not match '^in= terrupt-controller(@[0-9a-f,]+)*$' > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@c000000: compatible:0: 'riscv,aplic' is not one of ['qemu= ,aplic'] > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@c000000: compatible: ['riscv,aplic'] is too short > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > qemu.dtb: aplic@c000000: Unevaluated properties are not allowed ('compati= ble', 'riscv,delegate' were unexpected) > from schema $id: http://devicetree.org/schemas/interrupt-controll= er/riscv,aplic.yaml# > > I guess noone updated QEMU to comply with the bindings that actually got > upstreamed for the aplic? Yes, we never bothered to update the QEMU DT generation after AIA DT bindings were accepted. Thanks for catching. Regards, Anup