From patchwork Wed Aug 24 15:51:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A3F2C00140 for ; Wed, 24 Aug 2022 15:56:44 +0000 (UTC) Received: from localhost ([::1]:58858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQskF-0002dj-8j for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:56:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf6-00027w-8K for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:24 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:34556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf2-0002ET-I7 for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:23 -0400 Received: by mail-wr1-x431.google.com with SMTP id a4so21324222wrq.1 for ; Wed, 24 Aug 2022 08:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=HR8iBeFG8r8rfNyNxc67KbDEH5iNA4eSJjr7tgdBtu4=; b=n2/D44lxhsABR8dmGzAoQrmEfOPUeBujtraAHfAxcqIFbmCsmtlJA/YFyf3irH9gMf +/oRcppu4syzAt0aMSCiKnOYxXQEyIcdurx9mNz+7XNw1MStHX7FxkyJI5eXr6264NNQ LBCJ9j4igPDnorzzQTKda4+NRvowLb5eIo2SRRzsGXWXUe3Lypdq8ILt5M7h1YDU6fqy 1OS5aQZ8LHYCeB74PexkHGJRmvHNsM5SVapb2PzNeo8SOY3jL6MGCdoRLc158BotRuZ/ /EaufYNkruScy6Sm+S2bE6dn3ePsGOy8VGTaZIl1vmc370MPYkg9Lp0Y8jlbZC6Dn5En WgzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=HR8iBeFG8r8rfNyNxc67KbDEH5iNA4eSJjr7tgdBtu4=; b=GzbxtMPj/7tdKFLSz4u0IRhNlacR0M3agM63gbyyHdDwXdsRIWU57tcxPscoxN5hhO OFDLSCffcANNHHcC7Rw2YVVqAaCdssotr52Ma4GULXTl80nHzlzdNQ7IU/nNRAKNBMZI DubV+WEr7Jm8m2Sni1c3f6HAENZ97niDdzYqFiNdkzzrGTzwxduPVp6Bd7Q71jlkqUsh cPJBEHAkKGEf72V1OSGXMBtXrXopg3BCfj8eb96zZ8uFQLrZkwHtiohXGZCTsZuhXDJH xKl6YS6td0Gxii/s03YIUejKzPSDuxQE/9flnsPHvgYTM53gMujbWdXnPcndr/x4w4TS IBIQ== X-Gm-Message-State: ACgBeo3m7HLvPB2yIAHGJ2w6mV8ketNFaYSOYZ3xqRsbZ6KyxYFT04vJ vOFjSY0qbAYWRZZ676jKpskd5A== X-Google-Smtp-Source: AA6agR40JvseUdIc6TQ/7HZBx5/QhWW4nxvawf2jA6i+6vXuMr4V8h/kIKPKXFAmEbbhCAHRswHRtw== X-Received: by 2002:a5d:6dad:0:b0:225:6dc8:e453 with SMTP id u13-20020a5d6dad000000b002256dc8e453mr3245325wrs.64.1661356278859; Wed, 24 Aug 2022 08:51:18 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:18 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 01/10] hw/arm/virt: Fix devicetree warning about the root node Date: Wed, 24 Aug 2022 16:51:05 +0100 Message-Id: <20220824155113.286730-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" dt-validate warns that the 'model' property is missing from the devicetree: /: 'model' is a required property From schema: dtschema/schemas/root-node.yaml Use the same name for model as for compatible. The devicetree specification recommends that 'compatible' follows the format 'manufacturer,model' and 'model' follows the format 'manufacturer,model-number'. Since our 'compatible' doesn't observe this, 'model' doesn't really need to either. Signed-off-by: Jean-Philippe Brucker --- This could be an opportunity to improve the machine print by Linux, for example make it display "qemu,virt-7.2". I was concerned about breaking some automated testing that may use the stable virt-x.y machines, so I kept the same as compatible. --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9633f822f3..abcf2716bc 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -252,6 +252,7 @@ static void create_fdt(VirtMachineState *vms) qemu_fdt_setprop_string(fdt, "/", "compatible", "linux,dummy-virt"); qemu_fdt_setprop_cell(fdt, "/", "#address-cells", 0x2); qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2); + qemu_fdt_setprop_string(fdt, "/", "model", "linux,dummy-virt"); /* /chosen must exist for load_dtb to fill in necessary properties later */ qemu_fdt_add_subnode(fdt, "/chosen"); From patchwork Wed Aug 24 15:51:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4E82C32796 for ; Wed, 24 Aug 2022 15:53:33 +0000 (UTC) Received: from localhost ([::1]:47070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQshA-0004wA-MD for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:53:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf6-00027t-5O for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:24 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf3-0002Eh-Ot for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:23 -0400 Received: by mail-wr1-x42d.google.com with SMTP id bs25so21307978wrb.2 for ; Wed, 24 Aug 2022 08:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=/MVk+AlNPESRV7EYaPRLcDW6Y3EIh0quCranMNr0U+k=; b=SISAXUmDEEha4rf3ux+5+6Aj7LWGpWdc7eTG9yXHLEAycCrVN344SK4HXyw10Da1L+ nB+DurBeZF6AN900e3pW5Iu2XMkL4Yx8HZHyR5QICYpZYjTjeRMHH8xSX1pgGSv5Wq17 epTNxZgt+1pxLt/5//dlocfCJKPv6ELe4kKizibwVntaOuWGFdW8szx4uiHJpy50MULx FN6COSQOvEpH5ePzdAW92rUt+3zy458VX66T+y5qHZghrqGlI9xALHDK/yz4DOxRhoxt 8LN0oPNiiBMSganwFlZJDPyC/EHDFDydYINNh+erZuckjlhf2bk51yJRKXDd9tRS8tq/ uXIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=/MVk+AlNPESRV7EYaPRLcDW6Y3EIh0quCranMNr0U+k=; b=kVbWZKErrLFGhx9Mdak8uPTvfX5bVWqc8eT6nuwDMAGZMJT939ui+PlykOZGH6Q0q9 utKvTmNUsoHK6c74a2cVE/ApjcIN/khD5gcgvJ6qzKgliwox9FsugQi9u0pwagBFROMZ 9yce4uSzcWto6r76LtZInD2qEG5x13tSCDMpLsQzpYrHQI9rVHRB/07A9otjMJoqzLjd VBECTeLAygG+wTJ38ZcDdcRI5aLDASQy3NGDw/BzgTyA9NLNvBTScPTDOZSoHlyxa2YN Df+SLUUXXa7mZB8cWE0/WHwvJhT/p7CEl5sHFgGi8DhVSBUGJyxnDTcpczNm3ng9MT0j XtlQ== X-Gm-Message-State: ACgBeo0ra7fnEWw1dAq/4zrCsF50fG1g5WupyPvAO0ziOVE+UrdL+SMZ P7wg1FnHyEsB63pDIdHcyGja8A== X-Google-Smtp-Source: AA6agR7zDHYkhPVnvU176TVqmCTvgU6c/GyEGwZtaXjMS1fPxfYxVloSFOOp5pAZIqu6GzhjeQUNKg== X-Received: by 2002:a5d:6f11:0:b0:225:735f:e9b0 with SMTP id ay17-20020a5d6f11000000b00225735fe9b0mr1609169wrb.709.1661356279563; Wed, 24 Aug 2022 08:51:19 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:19 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 02/10] hw/arm/boot: Fix devicetree warning about the PSCI node Date: Wed, 24 Aug 2022 16:51:06 +0100 Message-Id: <20220824155113.286730-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" dt-validate warns that an implementation compatible with arm,psci-1.0 shouldn't have arm,psci in their compatible string. psci: compatible: 'oneOf' conditional failed, one must be fixed: ['arm,psci-1.0', 'arm,psci-0.2', 'arm,psci'] is too long From schema: linux/Documentation/devicetree/bindings/arm/psci.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index ada2717f76..527918227e 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -493,7 +493,7 @@ static void fdt_add_psci_node(void *fdt) const char comp[] = "arm,psci-0.2\0arm,psci"; qemu_fdt_setprop(fdt, "/psci", "compatible", comp, sizeof(comp)); } else { - const char comp[] = "arm,psci-1.0\0arm,psci-0.2\0arm,psci"; + const char comp[] = "arm,psci-1.0\0arm,psci-0.2"; qemu_fdt_setprop(fdt, "/psci", "compatible", comp, sizeof(comp)); } From patchwork Wed Aug 24 15:51:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953773 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C55A2C00140 for ; Wed, 24 Aug 2022 15:58:48 +0000 (UTC) Received: from localhost ([::1]:52910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQsmF-0006ei-Vd for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:58:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf8-00029R-AE for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:37759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf3-0002Es-Ph for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:24 -0400 Received: by mail-wm1-x335.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso1169870wma.2 for ; Wed, 24 Aug 2022 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=/BcQ7dSBdHiwkCbitP1xng11btp+1w28KnhMykfx8qg=; b=D5OzUPpE6+MWQr8XOufZwnuPbRmcnUTudV/M7oni2t1R4Kd60J5fxAyaZZMTJ1mDP5 55/V9NhLpID4vp/fPtuNd+W83eS1fklEorZ+NMzrCHv8OoMiD295nX6zOcteqtDbp9Fo P3MHeJwU6XVrGAhLUTwbPrvQlj3IKnwar9yQDnnqUnQtdatT9fRP4QFRaicTw6qoibMl iu/NRKP+UjWPWjczcBPSar64So4BpwihfQg3ZIstiETIDrX1VNJYdBZiS6X5d7I5vryT Lf3TGCIhaF6uemCjEl9eOV1s6cL1sq9MqJp4r2Qoq91CVC42+6SphzKkpDYlNypApgV7 6sTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=/BcQ7dSBdHiwkCbitP1xng11btp+1w28KnhMykfx8qg=; b=SR6tCfSlys3OZQ80IItvfJIQKTpTycxo+Gorz2b2pQ/yTYeFbn3018hLwm+taufANc ICGMvU0O7ygM2vRNLy1n28OUfRpttmK4lxfPTEyiNirNxGOPJP0hsXh574GBo9P30NzI hIIYRLRVVKF6G7bgjoMxx3CgcQBYAMZvtjKBrizxminKkDsImSvGtfJvFZbnfHJoEXZR SZTQi2ooWIzHULYLdAtH45ai4QhlFNHjqxgHiDCYyV3huGsLmU5cH9X3skjkLnsQZJvn xQx7cr/p3viL3IdXtkpGFpOrBu2AW+XVC9usZtJTX5dX6tJTihtwK9znn2Tog+UAH5Sl xPeg== X-Gm-Message-State: ACgBeo31/JAlYLUPHiL9Ii2TpGbthjG1mm/PnUct+5rfEPmzIuwLRl69 FiYi6VgWqdD4EEz6DXr1/91x7w== X-Google-Smtp-Source: AA6agR49bbIfu3Txq2hEgOKaL7sId7C/fnGQOJSr7W1i9p2oRv0sIJMYaSbcsKWUFYhULrnnt3xzsQ== X-Received: by 2002:a05:600c:1551:b0:3a6:2f4d:aeca with SMTP id f17-20020a05600c155100b003a62f4daecamr5549190wmg.100.1661356280200; Wed, 24 Aug 2022 08:51:20 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:19 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 03/10] hw/arm/virt: Fix devicetree warnings about the GIC node Date: Wed, 24 Aug 2022 16:51:07 +0100 Message-Id: <20220824155113.286730-4-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix three dt-validate warnings about the GIC node due to invalid names and missing property: intc@8000000: $nodename:0: 'intc@8000000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' intc@8000000: 'its@8080000' does not match any of the regexes: '^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$', '^gic-its@', '^interrupt-controller@[0-9a-f]+$', 'pinctrl-[0-9]+' interrupt-controller@8000000: msi-controller@8080000: '#msi-cells' is a required property From schema: linux/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index abcf2716bc..b6aa311d8c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -481,12 +481,13 @@ static void fdt_add_its_gic_node(VirtMachineState *vms) MachineState *ms = MACHINE(vms); vms->msi_phandle = qemu_fdt_alloc_phandle(ms->fdt); - nodename = g_strdup_printf("/intc/its@%" PRIx64, + nodename = g_strdup_printf("/interrupt-controller/msi-controller@%" PRIx64, vms->memmap[VIRT_GIC_ITS].base); qemu_fdt_add_subnode(ms->fdt, nodename); qemu_fdt_setprop_string(ms->fdt, nodename, "compatible", "arm,gic-v3-its"); qemu_fdt_setprop(ms->fdt, nodename, "msi-controller", NULL, 0); + qemu_fdt_setprop_cell(ms->fdt, nodename, "#msi-cells", 1); qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", 2, vms->memmap[VIRT_GIC_ITS].base, 2, vms->memmap[VIRT_GIC_ITS].size); @@ -499,7 +500,7 @@ static void fdt_add_v2m_gic_node(VirtMachineState *vms) MachineState *ms = MACHINE(vms); char *nodename; - nodename = g_strdup_printf("/intc/v2m@%" PRIx64, + nodename = g_strdup_printf("/interrupt-controller/v2m@%" PRIx64, vms->memmap[VIRT_GIC_V2M].base); vms->msi_phandle = qemu_fdt_alloc_phandle(ms->fdt); qemu_fdt_add_subnode(ms->fdt, nodename); @@ -521,7 +522,7 @@ static void fdt_add_gic_node(VirtMachineState *vms) vms->gic_phandle = qemu_fdt_alloc_phandle(ms->fdt); qemu_fdt_setprop_cell(ms->fdt, "/", "interrupt-parent", vms->gic_phandle); - nodename = g_strdup_printf("/intc@%" PRIx64, + nodename = g_strdup_printf("/interrupt-controller@%" PRIx64, vms->memmap[VIRT_GIC_DIST].base); qemu_fdt_add_subnode(ms->fdt, nodename); qemu_fdt_setprop_cell(ms->fdt, nodename, "#interrupt-cells", 3); @@ -1651,7 +1652,7 @@ void virt_machine_done(Notifier *notifier, void *data) * while qemu takes charge of the qom stuff. */ if (info->dtb_filename == NULL) { - platform_bus_add_all_fdt_nodes(ms->fdt, "/intc", + platform_bus_add_all_fdt_nodes(ms->fdt, "/interrupt-controller", vms->memmap[VIRT_PLATFORM_BUS].base, vms->memmap[VIRT_PLATFORM_BUS].size, vms->irqmap[VIRT_PLATFORM_BUS]); From patchwork Wed Aug 24 15:51:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FA8DC00140 for ; Wed, 24 Aug 2022 16:06:50 +0000 (UTC) Received: from localhost ([::1]:54276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQsu0-0004z3-UL for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 12:06:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf8-00029O-AA for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf4-0002F3-58 for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:24 -0400 Received: by mail-wr1-x434.google.com with SMTP id bs25so21308065wrb.2 for ; Wed, 24 Aug 2022 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=t5fD4FpVwJ6lGJRoKb62Zn7TZwvFcPtyT/lOy3RUWs4=; b=J/aHVmrxk8eAm69nBlOxz/V3aaQXBU8p9yI/cyXpdcHaeRWuaCbu+lYMj5ezY54qsY nDk67kRe5XTKMeIoT8gG6T6yclI/rCoWCGorrWixmCFWOYS1YHzkzGE01woFQv7xgGAA adlFxsKC/7u/2fqGLvw7hqH2ibh6PajKKixRtkGrJz56FvGlmHcYhf+UgzsSbzv3muBi npKLoJUXqgHiaKBcouxE2euCMYxafmR79CXX8cVN4ezKbaAOh3be7MywRhzKB7PG7o1H hXpfHy0xpMzcVhBl0XLTgfsvle898wPn7a/AoYJQ0yiFeo2jYqKssJHipN3ZeIqH19eK iU/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=t5fD4FpVwJ6lGJRoKb62Zn7TZwvFcPtyT/lOy3RUWs4=; b=m5j4SDwJWrKWVhME6JR0fes5DDM7xm15r+4AWmJ/uJslYfh5zsG+L5qPZWGBPZLuU8 ybdZ5325UX5tKWGXnuUlq5fXZeRgTSl+XZenXLEVOB21zok26RGBiWkx+a1q8rQFmuqr 76foN6udCD2mCTgoybqZYf9wF7BZRO7jFeB2yU+hyJkAfRECBXX1Pe7keDpff0JJidok 48KyLIYhd1vU2tc/Qcv62OhAAkyWsRiMamwewUUDn04Ha2LfpKwMaN2KSAek7JrGqEse ZFRDjtT/WjXXhbUFg7Ozw3acWeH7fzYmu7xMDglxciIjaV0rfp2iAaKBI2Ahd+3XjKfU 7JzQ== X-Gm-Message-State: ACgBeo00buPEC8tH4bmMvMbqa81gkRjRyPlJMDmnt9lNkLGpCaDPMbri 7UvNHkBu84eABDzJjj8+N63NCA== X-Google-Smtp-Source: AA6agR7skeNK9t0jI8iVPPWw53qXjnvg4iZ8LZgoMBm0I8XISBdsGhrR3XA1cLBF7kVaDLDTumzHXw== X-Received: by 2002:a5d:4882:0:b0:225:3148:9f85 with SMTP id g2-20020a5d4882000000b0022531489f85mr15612999wrq.224.1661356280850; Wed, 24 Aug 2022 08:51:20 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:20 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 04/10] hw/arm/virt: Use "msi-map" devicetree property for PCI Date: Wed, 24 Aug 2022 16:51:08 +0100 Message-Id: <20220824155113.286730-5-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The "msi-parent" property can be used on the PCI node when MSIs do not contain sideband data (a device ID) [1]. In QEMU, MSI transactions contain the requester ID, so the PCI node should use the "msi-map" property instead of "msi-parent". In our case the property describes an identity map between requester ID and sideband data. This fixes a warning when passing the DTB generated by QEMU to dtc, following a recent change to the GICv3 node: Warning (msi_parent_property): /pcie@10000000:msi-parent: property size (4) too small for cell size 1 [1] linux/Documentation/devicetree/bindings/pci/pci-msi.txt Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index b6aa311d8c..ca5d213895 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1489,8 +1489,8 @@ static void create_pcie(VirtMachineState *vms) qemu_fdt_setprop(ms->fdt, nodename, "dma-coherent", NULL, 0); if (vms->msi_phandle) { - qemu_fdt_setprop_cells(ms->fdt, nodename, "msi-parent", - vms->msi_phandle); + qemu_fdt_setprop_cells(ms->fdt, nodename, "msi-map", + 0, vms->msi_phandle, 0, 0x10000); } qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", From patchwork Wed Aug 24 15:51:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CEC9CC32792 for ; Wed, 24 Aug 2022 16:11:07 +0000 (UTC) Received: from localhost ([::1]:48876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQsy9-0002Zo-JT for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 12:11:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf8-00029Q-Ap for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:42598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf5-0002FP-RI for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:25 -0400 Received: by mail-wm1-x32c.google.com with SMTP id l33-20020a05600c1d2100b003a645240a95so1092664wms.1 for ; Wed, 24 Aug 2022 08:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Wxzqdi+mz10a5dL9bQmvPnzJspb9HKfQG9mi/kFyPd0=; b=oNfi3TFFRFzGLF0iMJJtspA0T8SSoBaGniumg6fYQcC5nU/NPFOY7ijCUNhsnADBuZ Fb62+FD/VrErLPfrU0/+Kl0v0BId2jvvFcud74GvRkCZ7UoudTCw/HXGPDUjACG03mP/ 2Vny4Rjfszh+P0OhWZoirjEFeyAbSH5nnKUV2oobiO6zZHKNNmoAwSycbeij70tp3Shl Ukb29zbWZG3gwK5qRdDDkQbID5kINZT20yVX+jG1TyfOxwEjst1YMpS2wyF13wAzgI3d pOvIjTDJ1TzoveGs13cZRNSzzW1rIfrdGmFsLA/FOUoeN+FrezqcgN4mCd6vShG/Zw5s o3CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Wxzqdi+mz10a5dL9bQmvPnzJspb9HKfQG9mi/kFyPd0=; b=Qr/BskwEJJmXoPTgDun5nqTcRF2DvMJmU5yY8B9VqlZM41P/gMKNi+xhDZAynpXYhx +HsTNdnLjo8PqB8O4QP7S/W6cbGG660FNBM/2ThtASR3sCEWp14rOCd03CbgMTTjFMXR grzg5/aU3DPRF/nzFyyFjWi5CE1YX+U4t9fpQo/cQ0o3hKyUxYNbbfuEMEK9twph2/wc RGiGPIN7ZU//+o3YaRQr4Ioz2ZP6fIKfNPLhnDvWqgSQUG9BFsgPxqwz1SLwgwC2NzEd XQn41WvpF32CtbVc2M0f9yxQBi1E6Hd0CimcX3OpL/TbGLnThnk9QTZUOsmK5TUeuKW5 ALkQ== X-Gm-Message-State: ACgBeo0uwAS5BkHH7Gp6TDaEeRifvrO/JuGFEiWYa44mi2SBhHhrgkRo F5/MlgGxMCWXSWdf5YXlU0iDRw== X-Google-Smtp-Source: AA6agR7qyy1VCrkBiWQyfRudsyHH2xYi5gV80sAcSuper+PrUrh72otBUs0Qy55FscFc/zg9kCzbrA== X-Received: by 2002:a05:600c:5010:b0:3a6:804:5b08 with SMTP id n16-20020a05600c501000b003a608045b08mr5581717wmr.10.1661356281578; Wed, 24 Aug 2022 08:51:21 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:21 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 05/10] hw/arm/virt: Fix devicetree warning about the timer node Date: Wed, 24 Aug 2022 16:51:09 +0100 Message-Id: <20220824155113.286730-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The compatible property of the Arm timer should contain either "arm,armv7-timer" or "arm,armv8-timer", not both. timer: compatible: 'oneOf' conditional failed, one must be fixed: ['arm,armv8-timer', 'arm,armv7-timer'] is too long From schema: linux/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index ca5d213895..5935f32a44 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -344,7 +344,7 @@ static void fdt_add_timer_nodes(const VirtMachineState *vms) armcpu = ARM_CPU(qemu_get_cpu(0)); if (arm_feature(&armcpu->env, ARM_FEATURE_V8)) { - const char compat[] = "arm,armv8-timer\0arm,armv7-timer"; + const char compat[] = "arm,armv8-timer"; qemu_fdt_setprop(ms->fdt, "/timer", "compatible", compat, sizeof(compat)); } else { From patchwork Wed Aug 24 15:51:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13753C32796 for ; Wed, 24 Aug 2022 15:54:03 +0000 (UTC) Received: from localhost ([::1]:57986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQshd-0006XO-VQ for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:54:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf8-00029P-8w for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:36786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf5-0002FY-Rt for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:25 -0400 Received: by mail-wr1-x433.google.com with SMTP id d16so16004925wrr.3 for ; Wed, 24 Aug 2022 08:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=eSq6FUdISef71pKleYGNA95iIGprMsybKKFsYohX1lI=; b=lmqkf0rn4nHErTSCI4YuPBvNdMr6YKs91zgxvTt5gnhpL2kwhvVy0W4oKaYv55QTfR dnik3gcHMEdcR3gPAeSfoz9migNIJvhqebSTXeV5NqTPZTZ+LRnm/IKT3B8u2Bu7t0FB 0P/MHNsickJx1IrTsAInqRlZC8QB+MGc+hJten6A3Wd9qyM1QeZnLJrssEojJsYsmOEv IvUpT2CvOHy8QpifpFb7UgNBMCur8lsBJxwMC6HeUv/SZUoCI+N+V/L2kAOBmVm3oodX Eh/IY7kC1wbj+GYXlCCqRJHYKessRci0Vk0e8+1WvwGkZsEFB41+ukMT6Fy6SDzzlnhF NY6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=eSq6FUdISef71pKleYGNA95iIGprMsybKKFsYohX1lI=; b=IJmHZbW6mRqR/RVS44+Ks0HSwxbdP1YIbEAe0FReam6R8GF43meHlQmF1D7e/eGwH3 8s2dG41Cd1mWlPrYnb9zFt87FrNtURL2DO+BYoEt4sKa1NRqFTTGeiBQ1zKp9MiCE4W4 9TbCZMHq7rX4+CnCiASEQyVOytjPCYDNMUGm5qZJqCHGl+Qe+x3OWrIQT4UH//lqcqW7 St3nY2sjl4UT/uJ3+Bg1yLBa1pnyASNo+Eom/mUB/rqwhIHGoaHVBsr47lmfOjOLKznd ookAAmcfRNKnbhiM3hNUB6tqv/a0YVEZfhhS6EiB3pWSow4yzWcYBE/DOy10HtkN1R/e n3ig== X-Gm-Message-State: ACgBeo12zGUmgDYarrGlbAIir2ZxuhsYLNwqsfl7+qRyhUESnNBtwwhx lEqHHDaIfNpqAncqp+ukESGhGg== X-Google-Smtp-Source: AA6agR7RFS7Euh7gY6WrHxyo/B7uTWndlgwiswVjJD142bvHuoF3VPNsINBkd0HZeh2IqyXl9G1JWw== X-Received: by 2002:a5d:59a8:0:b0:225:61a0:e603 with SMTP id p8-20020a5d59a8000000b0022561a0e603mr6810303wrr.469.1661356282308; Wed, 24 Aug 2022 08:51:22 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:22 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 06/10] hw/arm/virt: Fix devicetree warning about the gpio-key node Date: Wed, 24 Aug 2022 16:51:10 +0100 Message-Id: <20220824155113.286730-7-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The node name of the gpio-key devicetree node should be "key-poweroff": gpio-keys: 'poweroff' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$', 'pinctrl-[0-9]+' From schema: linux/Documentation/devicetree/bindings/input/gpio-keys.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5935f32a44..3d460f3686 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -932,12 +932,12 @@ static void create_gpio_keys(char *fdt, DeviceState *pl061_dev, qemu_fdt_add_subnode(fdt, "/gpio-keys"); qemu_fdt_setprop_string(fdt, "/gpio-keys", "compatible", "gpio-keys"); - qemu_fdt_add_subnode(fdt, "/gpio-keys/poweroff"); - qemu_fdt_setprop_string(fdt, "/gpio-keys/poweroff", + qemu_fdt_add_subnode(fdt, "/gpio-keys/key-poweroff"); + qemu_fdt_setprop_string(fdt, "/gpio-keys/key-poweroff", "label", "GPIO Key Poweroff"); - qemu_fdt_setprop_cell(fdt, "/gpio-keys/poweroff", "linux,code", + qemu_fdt_setprop_cell(fdt, "/gpio-keys/key-poweroff", "linux,code", KEY_POWER); - qemu_fdt_setprop_cells(fdt, "/gpio-keys/poweroff", + qemu_fdt_setprop_cells(fdt, "/gpio-keys/key-poweroff", "gpios", phandle, 3, 0); } From patchwork Wed Aug 24 15:51:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953770 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E3D0C00140 for ; Wed, 24 Aug 2022 15:56:34 +0000 (UTC) Received: from localhost ([::1]:48718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQsk5-00028p-NJ for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:56:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsf8-00029S-B4 for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:37757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf5-0002EO-RQ for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:25 -0400 Received: by mail-wm1-x333.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso1169969wma.2 for ; Wed, 24 Aug 2022 08:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=JPnL1u8Q7Rp6zS6QxX1+K19gfMEh8ge2+QRHygxZ1TY=; b=Gungl2OHa1IbzzrlRsdSVhv1zdYnP+aY9VeRN3RcEf6TgFar5IVM310JwB18UhjKOn uEza8rTQv1f/eH6t9be+26vFVEogEShWlh1AykvYjwHwQ1yXB+7zm6QF1Nr1w9ptO+QU 0W3k/91YomvNSZAmCgwH/XEKiLpKad/OClTQAugkKC1Nu6IusG7Atqmr0BDNnXiDaIdf eHeVj2lCyM51zU+fUiQWOMsrBiHNJMDptb1eZuAo4AuHdkRjmGcZZ/tngPewrf6eaBE9 Rb7CRi/OnkF70G4IPOngLtVrD+Gb+sQxNRrrS76Ojdf0nU+Tkh4cAuQs3DQKmd9XJCxO MDHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=JPnL1u8Q7Rp6zS6QxX1+K19gfMEh8ge2+QRHygxZ1TY=; b=3nMIiGUcZ6A6H/2qwljLjPWprx2PCmWGsjypSfyXRcrRmdKbYnDzEkP5uWQIilmsTv Kvvr+CagOOyHgFQfY2Wil892WAzKtMcb2DD8Ura4z1DiMkjZskdSsXLyVjSfg88vYE4R NMMboDW7sLlgq/0fo3ottGIPijHK7y/MV5BGZ+3GmFHOsU1CDE4Nybndpaa48tJ3yYrr P4ziFYOJagijB2lm5XGM8RHLokxBEjTozQNe2QXRsCiisfyr0zENpEB4gld/kq2KUzui ax85sSP3PH1N5yd0iHvOR8+dM2lBsFqq5e2KBMu2SUl/1OrKurQSuNV1YniHb9RrMcBy ExxA== X-Gm-Message-State: ACgBeo2fxdMXurTZZ0TTUNV77Unuuk+Ssw5pcJqdWpPxQPSyCOoRoKXL H9U95szZU0tEtsrYGYlshUlmSw== X-Google-Smtp-Source: AA6agR4x6MBizweDuHbwaIabeKGoyaLVU/qYUEg3v4qSEz2E/y2Vh2ZuCdKn7KR+6SPaId04ln9/+g== X-Received: by 2002:a05:600c:3d91:b0:3a5:4132:b6a0 with SMTP id bi17-20020a05600c3d9100b003a54132b6a0mr5377180wmb.126.1661356282982; Wed, 24 Aug 2022 08:51:22 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:22 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 07/10] hw/arm/virt: Fix devicetree warnings about node names Date: Wed, 24 Aug 2022 16:51:11 +0100 Message-Id: <20220824155113.286730-8-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" dt-validate reports that several nodes have non-compliant names: pl061@9030000: $nodename:0: 'pl061@9030000' does not match '^gpio@[0-9a-f]+$' From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml pl031@9010000: $nodename:0: 'pl031@9010000' does not match '^rtc(@.*|-[0-9a-f])*$' From schema: linux/Documentation/devicetree/bindings/rtc/arm,pl031.yaml pl011@9000000: $nodename:0: 'pl011@9000000' does not match '^serial(@.*)?$' From schema: linux/Documentation/devicetree/bindings/serial/pl011.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3d460f3686..952af37935 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -857,7 +857,7 @@ static void create_uart(const VirtMachineState *vms, int uart, sysbus_mmio_get_region(s, 0)); sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq)); - nodename = g_strdup_printf("/pl011@%" PRIx64, base); + nodename = g_strdup_printf("/serial@%" PRIx64, base); qemu_fdt_add_subnode(ms->fdt, nodename); /* Note that we can't use setprop_string because of the embedded NUL */ qemu_fdt_setprop(ms->fdt, nodename, "compatible", @@ -897,7 +897,7 @@ static void create_rtc(const VirtMachineState *vms) sysbus_create_simple("pl031", base, qdev_get_gpio_in(vms->gic, irq)); - nodename = g_strdup_printf("/pl031@%" PRIx64, base); + nodename = g_strdup_printf("/rtc@%" PRIx64, base); qemu_fdt_add_subnode(ms->fdt, nodename); qemu_fdt_setprop(ms->fdt, nodename, "compatible", compat, sizeof(compat)); qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", @@ -999,7 +999,7 @@ static void create_gpio_devices(const VirtMachineState *vms, int gpio, sysbus_connect_irq(s, 0, qdev_get_gpio_in(vms->gic, irq)); uint32_t phandle = qemu_fdt_alloc_phandle(ms->fdt); - nodename = g_strdup_printf("/pl061@%" PRIx64, base); + nodename = g_strdup_printf("/gpio@%" PRIx64, base); qemu_fdt_add_subnode(ms->fdt, nodename); qemu_fdt_setprop_sized_cells(ms->fdt, nodename, "reg", 2, base, 2, size); From patchwork Wed Aug 24 15:51:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953768 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7048C00140 for ; Wed, 24 Aug 2022 15:53:55 +0000 (UTC) Received: from localhost ([::1]:38458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQshW-0006Lp-U2 for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:53:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsfN-0002KT-TV for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:41 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf7-0002GH-Ry for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:28 -0400 Received: by mail-wr1-x42b.google.com with SMTP id h24so21287895wrb.8 for ; Wed, 24 Aug 2022 08:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Ohy3bUJKZGFkjSeZY9AWoC2jPWdXu0ag6d5K6Qn5vz0=; b=JM5uTKHzHWO6C4wlZpHJYwKCnAzZHA3+IZVXBchD6yHxEi/Gq+9DTpUnwXxSwLPg8D mVWRfk3TaBDAO2vCfFfQLJR5hW+ybGgxBmDjvnyRsyXeIVqCtNYyOcm35ZKfpur0peJY yFg45aMADf2A5u+mMSS9Duli9lrutVvfnTji6dGr8gEL1gQmfbMbiU30ZjLQLPqCi7wp rzvMl6DW33Q6cLdR+jvHN6Nkoyv3z24u6Ys+PqNKi18WYEV8zjn9DQNqT36ZfJW5cipo +KZ0qmH7VXE2d47pH4q+KuzC0bX+ENQWGWdWh1YARLBrKErO6VHGApudIzodIVCPQaeL u9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Ohy3bUJKZGFkjSeZY9AWoC2jPWdXu0ag6d5K6Qn5vz0=; b=qw1kkXbZJT7QpIzXi5kVxEs1ihH1y3jDyQw1WCzbvTD0rdMqwb3Mq/QNjuXU8HGkDV STExstnVs1DrXAm9mjwbbNCIWsMf2kjOdd0s1Ug4JHS5di+6JzuKufVH9T/4cwnBRUk3 b6Fof0PZ5Mfpn7DFSVUERfcc65xG+lEthUmRYbKqomkQzC1WYdd/hieMf+Mo2PDypOuL 5qDNtkczYj3q9hBXaMouOZ9ogMN4vIlPXPv5pb5rZTn7M5joM8i2VWHMsn/FrFMZY3B3 h26slgQCPK9KiCqMP8xkPT7H5VWMAuEXs0BbL5vnYMMJbdphmNieC/S3UD2uaBLJDakL cVZQ== X-Gm-Message-State: ACgBeo3eDpKsk3YzOW/sDFlJa1fS1gHPqhWFIaiHnw+NGmhpUD3l4y/H vPriUlax85zE8fr0j6X75xQWxQ== X-Google-Smtp-Source: AA6agR7x6tEqRwVuAKdG6oQmgtlURAp4nUvI0mdQWob03MqQWrXweKqF6+BFzDguqxwjTqDqrIADjA== X-Received: by 2002:adf:fc8b:0:b0:225:5a71:be1a with SMTP id g11-20020adffc8b000000b002255a71be1amr8173178wrr.651.1661356283710; Wed, 24 Aug 2022 08:51:23 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:23 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 08/10] hw/arm/virt: Fix devicetree warnings about the GPIO node Date: Wed, 24 Aug 2022 16:51:12 +0100 Message-Id: <20220824155113.286730-9-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The GPIO devicetree node is missing "interrupt-controller" and "#interrupt-cells" properties: pl061@9030000: 'interrupt-controller' is a required property From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml pl061@9030000: '#interrupt-cells' is a required property From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 952af37935..779eb5ea31 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1012,6 +1012,8 @@ static void create_gpio_devices(const VirtMachineState *vms, int gpio, qemu_fdt_setprop_cell(ms->fdt, nodename, "clocks", vms->clock_phandle); qemu_fdt_setprop_string(ms->fdt, nodename, "clock-names", "apb_pclk"); qemu_fdt_setprop_cell(ms->fdt, nodename, "phandle", phandle); + qemu_fdt_setprop_cell(ms->fdt, nodename, "#interrupt-cells", 2); + qemu_fdt_setprop(ms->fdt, nodename, "interrupt-controller", NULL, 0); if (gpio != VIRT_GPIO) { /* Mark as not usable by the normal world */ From patchwork Wed Aug 24 15:51:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DAF7C00140 for ; Wed, 24 Aug 2022 16:14:22 +0000 (UTC) Received: from localhost ([::1]:38108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQt1I-0007FE-NU for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 12:14:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsfA-0002BD-1B for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:28 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:38679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf7-0002Eg-5s for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:27 -0400 Received: by mail-wr1-x42f.google.com with SMTP id b5so17006950wrr.5 for ; Wed, 24 Aug 2022 08:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=/y1zm97n6IGKhSBa6qGqkTluIHtkqiOpSJE6ybC/cmQ=; b=XwlW40h1EREpZkq6bDzc17N3GOMsYtv0OAPbS70wPH/7excd57FtyJRddtkf1pDhu8 phIoFoGUmX75T8ofO/nMriJKx8K1YgW0F70ec5EM1ixE5PoC7+r03CkEv6AMFSQ0pq+N bOZQAatftnREL+sp6QjSfb51wbYJa2kCPb4qI1JTGF/58357c/JFAWFNGSLOGGRu+1Af q9VCzXLigWE6aqNp0sP23osm4Po9n9rtqC3szzkkuQgJ6A/Tb873QaPDDDSwTSDgiYvM VfPippxj9mE1sQ5FKI3wRST2nejAh054NJDoS1oy/qVdz0pfVu0DDp4CvruJw4NvRN2n BwGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=/y1zm97n6IGKhSBa6qGqkTluIHtkqiOpSJE6ybC/cmQ=; b=SgMmj8nsG6SX82cgnVbeoVEUgrIgtjNYV+1qhP4PV0c6GkrZUXI16JTdfJx0jJu26i HaO6nA4NTzRgAXzs+0nDEJW0vkDS/HnHt7zoh6X+1uouhgwA8LcSGLKPGtzuGYbr24oL m3WKLq/zOrrke6U8DsDjRqSS9+FVKDTyan1yIDH1c4mAO8D3Sxccl9SNZGsVQzVi75fD sMLeMK/GHcQjZvv3JdnJDFx8b6a7ffg+SHuJiGoptlG77ZzO9HwWyvhEGwFrpvEiEKSr QuG60mIwuN5u10fHkR7sQOz1YC5I9CmQH+yRGPQBYWvFZfuUUryX9qShys7GopiJlpnZ B17w== X-Gm-Message-State: ACgBeo3LRd6M0RtA9sqMRx7dZ12GQm73QMBtbTxDXY7CEOOMzVQi/DwI PKTSigrpMIWVDphYvepCUDGXRBMOvu551QrX X-Google-Smtp-Source: AA6agR5DDsjT6YIa36WJCSMsUHy5mjhSCmL6/qDsYn0662SwQr1ZXxPLiJ4J2er79f/1Xc2tmA7ZDg== X-Received: by 2002:a05:6000:1812:b0:225:7383:d739 with SMTP id m18-20020a056000181200b002257383d739mr1654652wrh.333.1661356284426; Wed, 24 Aug 2022 08:51:24 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:24 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 09/10] hw/arm/virt: Fix devicetree warnings about the SMMU node Date: Wed, 24 Aug 2022 16:51:13 +0100 Message-Id: <20220824155113.286730-10-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" dt-validate reports three issues in the SMMU device-tree node: smmuv3@9050000: $nodename:0: 'smmuv3@9050000' does not match '^iommu@[0-9a-f]*' smmuv3@9050000: interrupt-names: 'oneOf' conditional failed, one must be fixed: ['eventq', 'priq', 'cmdq-sync', 'gerror'] is too long 'combined' was expected 'gerror' was expected 'gerror' is not one of ['cmdq-sync', 'priq'] smmuv3@9050000: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: linux/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml Fix them by: * changing the node name * reordering the IRQs * removing the clock properties which are not expected for the SMMU node Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 779eb5ea31..de508d5329 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1329,7 +1329,9 @@ static void create_smmu(const VirtMachineState *vms, int i; hwaddr base = vms->memmap[VIRT_SMMU].base; hwaddr size = vms->memmap[VIRT_SMMU].size; - const char irq_names[] = "eventq\0priq\0cmdq-sync\0gerror"; + uint32_t irq_type = GIC_FDT_IRQ_TYPE_SPI; + uint32_t irq_trigger = GIC_FDT_IRQ_FLAGS_EDGE_LO_HI; + const char irq_names[] = "eventq\0gerror\0priq\0cmdq-sync"; DeviceState *dev; MachineState *ms = MACHINE(vms); @@ -1348,22 +1350,20 @@ static void create_smmu(const VirtMachineState *vms, qdev_get_gpio_in(vms->gic, irq + i)); } - node = g_strdup_printf("/smmuv3@%" PRIx64, base); + node = g_strdup_printf("/iommu@%" PRIx64, base); qemu_fdt_add_subnode(ms->fdt, node); qemu_fdt_setprop(ms->fdt, node, "compatible", compat, sizeof(compat)); qemu_fdt_setprop_sized_cells(ms->fdt, node, "reg", 2, base, 2, size); qemu_fdt_setprop_cells(ms->fdt, node, "interrupts", - GIC_FDT_IRQ_TYPE_SPI, irq , GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 1, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 2, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI, - GIC_FDT_IRQ_TYPE_SPI, irq + 3, GIC_FDT_IRQ_FLAGS_EDGE_LO_HI); + irq_type, irq + SMMU_IRQ_EVTQ, irq_trigger, + irq_type, irq + SMMU_IRQ_GERROR, irq_trigger, + irq_type, irq + SMMU_IRQ_PRIQ, irq_trigger, + irq_type, irq + SMMU_IRQ_CMD_SYNC, irq_trigger); qemu_fdt_setprop(ms->fdt, node, "interrupt-names", irq_names, sizeof(irq_names)); - qemu_fdt_setprop_cell(ms->fdt, node, "clocks", vms->clock_phandle); - qemu_fdt_setprop_string(ms->fdt, node, "clock-names", "apb_pclk"); qemu_fdt_setprop(ms->fdt, node, "dma-coherent", NULL, 0); qemu_fdt_setprop_cell(ms->fdt, node, "#iommu-cells", 1); From patchwork Wed Aug 24 15:51:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12953772 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D64CBC00140 for ; Wed, 24 Aug 2022 15:57:13 +0000 (UTC) Received: from localhost ([::1]:57396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQski-000473-W8 for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 11:57:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsfN-0002KQ-RN for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:41 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsf7-0002Eh-RF for qemu-devel@nongnu.org; Wed, 24 Aug 2022 11:51:28 -0400 Received: by mail-wr1-x42d.google.com with SMTP id bs25so21308324wrb.2 for ; Wed, 24 Aug 2022 08:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=LhPaHmCfzH5shp5YW3SkLpdM/SN0fbAn5PuvfUG/UcA=; b=I00XCp7YFTtBahSzec2jxL03lRNw3TocDi+xJL7O3MoTnAFNtoC5PsrGQTQYRyT+Em Nc6olmD28Q+vISLeBRUPCGu5UDzttAaSUX0knNx+CKHvHKMbE81b7EIVlakEToErDWXd U9JU70lYqzfNj/OE71DrT3d/jKUE0P3xEMK0zvCy0zMUHpmGVHqmbh5tK6M2dMDwZCjn l+xmQNeAK/UDqi21jKXNNT3WtgVoOcwHlvjSgOX7DT6PKbzkg3xET5oWzqqWqRsGPgq6 39bx93EhJaN9C0cAHzQo8X6sMENp1IqXiqfYspLVu8slnAaK3OifXyVCkx7ZfccLXt0y N4bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=LhPaHmCfzH5shp5YW3SkLpdM/SN0fbAn5PuvfUG/UcA=; b=5Wo5PNgiD2bhis5QnUFgE/ga7qTFsTnDWWRFcS60wd/16UU/g51FnxbUAVUM3xeMTv pBLRS9j87Asq+SLKHM+zAKgxLvAZg2T8+Y/au4XdAvms2plNYPA0QSFNChDyGGfuqa1P NmXVX1Msa3xCuyxH71DeAoCcA+E1RRH5eEVDEakIzGZzjXm+KPcAmStU8SwNmMjBGuI5 CihFXe2gcVTUBxISHM1JXPGkLEndVhSNZ45ID3iH+mpK7+TjafRAK0Jhi/Uf/hXP4Wor 8wAZm2RzzTwI13yUYQmqh2ZVfgKvHU6DyevPBO4Lk+kBfGhujwyv8hneYbalSsjkN+g4 0Qzw== X-Gm-Message-State: ACgBeo3zpc+Q+PMIk7/BhA9C/QP6UHsJHJW6OKhLouqMfTcQ31D1so9P x65Es4QcSBiu03/ExPftJ7YN2A== X-Google-Smtp-Source: AA6agR6evIG/zYWG7/d8DHpeV78+XYxN8Kubkd2+46e9EkmXCWDMUczbnoeTYGfUSTdnc4FoDCncBQ== X-Received: by 2002:adf:d1ea:0:b0:225:46e1:4fa0 with SMTP id g10-20020adfd1ea000000b0022546e14fa0mr11303465wrd.362.1661356285050; Wed, 24 Aug 2022 08:51:25 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id q11-20020a5d61cb000000b00223b8168b15sm17236411wrv.66.2022.08.24.08.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 08:51:24 -0700 (PDT) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, robh+dt@kernel.org, eauger@redhat.com, Jean-Philippe Brucker Subject: [PATCH 10/10] hw/arm/virt: Fix devicetree warnings about the virtio-iommu node Date: Wed, 24 Aug 2022 16:51:14 +0100 Message-Id: <20220824155113.286730-11-jean-philippe@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220824155113.286730-1-jean-philippe@linaro.org> References: <20220824155113.286730-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" dt-validate and dtc throw a few warnings when parsing the virtio-iommu node: pcie@10000000: virtio_iommu@16:compatible: ['virtio,pci-iommu'] does not contain items matching the given schema pcie@10000000: Unevaluated properties are not allowed (... 'virtio_iommu@16' were unexpected) From schema: linux/Documentation/devicetree/bindings/pci/host-generic-pci.yaml pcie@10000000: virtio_iommu@16:compatible: ['virtio,pci-iommu'] does not contain items matching the given schema From schema: dtschema/schemas/pci/pci-bus.yaml Warning (pci_device_reg): /pcie@10000000/virtio_iommu@16: PCI unit address format error, expected "2,0" The compatible property for a PCI child node should follow the rules from "PCI Bus Binding to: IEEE Std 1275-1994". It should contain the Vendor ID and Device ID (or class code). The unit-name should be "device,function". Signed-off-by: Jean-Philippe Brucker --- Note that this doesn't follow linux/Documentation/devicetree/bindings/virtio/iommu.txt, I'll update that document when converting it to yaml, hopefully this Linux cycle. The "virtio,pci-iommu" compatible string is not actually used by any driver and only QEMU implements it, so we can get rid of it. --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index de508d5329..08b79592eb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1374,14 +1374,15 @@ static void create_smmu(const VirtMachineState *vms, static void create_virtio_iommu_dt_bindings(VirtMachineState *vms) { - const char compat[] = "virtio,pci-iommu"; + const char compat[] = "pci1af4,1057"; uint16_t bdf = vms->virtio_iommu_bdf; MachineState *ms = MACHINE(vms); char *node; vms->iommu_phandle = qemu_fdt_alloc_phandle(ms->fdt); - node = g_strdup_printf("%s/virtio_iommu@%d", vms->pciehb_nodename, bdf); + node = g_strdup_printf("%s/virtio_iommu@%x,%x", vms->pciehb_nodename, + PCI_SLOT(bdf), PCI_FUNC(bdf)); qemu_fdt_add_subnode(ms->fdt, node); qemu_fdt_setprop(ms->fdt, node, "compatible", compat, sizeof(compat)); qemu_fdt_setprop_sized_cells(ms->fdt, node, "reg",