From patchwork Wed Aug 10 18:46:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12940887 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 882ACC25B0C for ; Wed, 10 Aug 2022 18:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jEL2bW5buEecU9hVntVw1AeVP/7eSwAu2dZmoCaoTTE=; b=lcCSW2CmUlU74u Lolb9qqFG/p5kB12m1RF+vcEBSNE5L/OJXd3b38sgn/tEkN84K00B4Yd0kTpuypTHmmzYI9P4X9ay 9fYTMNDrS0Jaa1ZJ2y6QlOFOySbGEVf+yD1Jjwo7BIdLmHcEt6JIi2i/XzI1MQ2O8NSPdvPp88RPf wR3poNLvKV5TYb/n1/0Ag7HetKIlpo1w1WTyk6ccJFHgH51qxzlu1f4WvTtHFK+0oC2XP44/ZMQuu XoLiCOInGIBWoTMbxwwuI4m/PwaSFnUEXAJ5I1lnwUDgX0r+zIecyY6MeFLE5qRkETiXcR25vIQVg GbWvLJgEEtHqyi3VvGqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqil-00Dr8P-4P; Wed, 10 Aug 2022 18:46:23 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqih-00Dr5j-2V for linux-riscv@lists.infradead.org; Wed, 10 Aug 2022 18:46:20 +0000 Received: by mail-wr1-x435.google.com with SMTP id z12so18728172wrs.9 for ; Wed, 10 Aug 2022 11:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=maIqyDhug0EL/mXAyR5nYeGttmLcfb6O/BjdQzpTa5E=; b=LxSeMItdX80JUjkCqXJgBhLVTwmp50MmNGKVChYDIkyimBCZggvVswojH2xaylxdrl GqF64fQ3rYkS8TgZapgQSQ1ChYk+cpE5OMLLYfHahXpuypIqzE5Ozrj51yCqRstntxCR XBwYtD/FhG+6iAAP4Gp12XgbPvkBiblJXb3IQf+Zpb2WcllJxn6cxa5likf6q9upV1Hh bbMFgMLxfjkk4lvnviYPyDt1chW4aK6QfinXZYmYrbSWwLmznOVfWMcUFc6LttE+8P9I VqHauCCK7uKPdbhguExtlE9NNoH6ReIcZ6+EN33AG/9K0zSdzrvwCgmMmUqOlHl5Gqz5 CUew== 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=maIqyDhug0EL/mXAyR5nYeGttmLcfb6O/BjdQzpTa5E=; b=T1px9SEGT6uQ31gtIbSqFzI5J1qD+bmCeH2NMwWe895L0gd4w1oSPO85c+ZAowJvgA igXL2A1jbw82cmUX//V/MJH6d20zcRmt7fzQGE2NZWAsnoVTBZnWWGg3kqVA52R2ChAv LBUBj3u8tWLREJj5lgKcwxHuV/9uklZvSUAe1DcM/Z6Kp0zBtc4HORspo3ReL+faZ023 82wczBCbNGucQuoE2d2ugWYeLj5WU4AKtrqGYpp97uGqJ+jp1994lbZAzgUCRgCzF/Z0 gwnSV5iL8O+8UnusDTI5I1TqOnW/0GVvzXIx7llmkBp+/26gUX8Cl2wBONKvSAaxcWPf SSSg== X-Gm-Message-State: ACgBeo2O7pE4MuGxPBlb7Z22PF7j6KtsA6uGs82g3USN2/q8cjbWo5y1 JbmMwkWFjmhmGzTRVnaesxY5eA== X-Google-Smtp-Source: AA6agR5cEsZTkeIM60/maHEsT+mjTmhiJMFDBRHpKpDsKgto5han/ZWpbkiQUCdEYeIR/fPfWekWiA== X-Received: by 2002:a5d:5887:0:b0:220:81c9:8ab7 with SMTP id n7-20020a5d5887000000b0022081c98ab7mr17748783wrf.702.1660157176721; Wed, 10 Aug 2022 11:46:16 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id y13-20020adfdf0d000000b0021f0ff1bc6csm16944743wrl.41.2022.08.10.11.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 11:46:16 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , Jessica Clarke , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 1/4] hw/riscv: virt: fix uart node name Date: Wed, 10 Aug 2022 19:46:09 +0100 Message-Id: <20220810184612.157317-2-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810184612.157317-1-mail@conchuod.ie> References: <20220810184612.157317-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_114619_165935_FE0484CD X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley "uart" is not a node name that complies with the dt-schema. Change the node name to "serial" to ix warnings seen during dt-validate on a dtbdump of the virt machine such as: /stuff/qemu/qemu.dtb: uart@10000000: $nodename:0: 'uart@10000000' does not match '^serial(@.*)?$' From schema: /stuff/linux/Documentation/devicetree/bindings/serial/8250.yaml Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@kernel.org/ Fixes: 04331d0b56 ("RISC-V VirtIO Machine") Reviewed-by: Alistair Francis Signed-off-by: Conor Dooley --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index bc424dd2f5..6c61a406c4 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -917,7 +917,7 @@ static void create_fdt_uart(RISCVVirtState *s, const MemMapEntry *memmap, char *name; MachineState *mc = MACHINE(s); - name = g_strdup_printf("/soc/uart@%lx", (long)memmap[VIRT_UART0].base); + name = g_strdup_printf("/soc/serial@%lx", (long)memmap[VIRT_UART0].base); qemu_fdt_add_subnode(mc->fdt, name); qemu_fdt_setprop_string(mc->fdt, name, "compatible", "ns16550a"); qemu_fdt_setprop_cells(mc->fdt, name, "reg", From patchwork Wed Aug 10 18:46:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12940889 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0588BC00140 for ; Wed, 10 Aug 2022 18:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sYlOxuiq54aUTrjpowyrQZMPIQ8Qkaov3COmKkEMnp8=; b=stsNO+bNiGRYkp 1cw92fsqPdmy6IaX5dVkqFK+8W4qcj38av/zXQ+mjAqkWFdBJEAFqI3TaU2yLOOFrXRGRFGnw+YBb cc61jqOs28mSmemQOXZf2zhF0o9QGNct5c8JziMak5kADFkPAUpY69GP4qsO4I1lnFSNTikc6Q5Vi 4HjWqRvlnBGd9sIhmq5dsTSaC2b5PRVZ/YlpSB+YYti0/sZDOrn8CG96flwb9iG/DCl3MQHmu3II8 dRGJ9QYPzsYxwsnHWl+9kr879i+cI9XxA+pOucrJOkPfZZcb1DTn1P9MmxXB4LwIz1RjL1t0N5ozS OseCza8WEAiu23nrOROQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqin-00Dr9b-Gq; Wed, 10 Aug 2022 18:46:25 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqih-00Dr5r-Su for linux-riscv@lists.infradead.org; Wed, 10 Aug 2022 18:46:21 +0000 Received: by mail-wr1-x42a.google.com with SMTP id j7so18769851wrh.3 for ; Wed, 10 Aug 2022 11:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=dLryJLbtmt3A1NXYGrZiCtyybRqEmFe4aX4c5ZR/V+k=; b=LwclNXS3OtdfnUYY7/XEqH3QMGEwOBmCk6j07Dg0+DMwWWbXp3sKMPR2hwRy+2uMBN uTTmpntQzMQvdLbNKmKIGUhGzMKKLvTciuz5i9GRmyrrz6Vcxgk+PrPUwhYbwBr6v2i4 Z9UE6iAP1d0HtWb/LiFRv7mnOpYo6yd2u02vGeI0swrc2govs7Y58h++JzA8Lpn8F9No ZwAzk726aO8mqASESvtVlzc/vtZFV1Nbt6ZH137UcEIHGKQVVypCUy0LNsbvyf+vyjAv LCtoobHRROjjEeecGveyUy0DB9218HTinfL9EXrzmrjJzfqmCF9KC0TciZSoeO0hOaNU LZlw== 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=dLryJLbtmt3A1NXYGrZiCtyybRqEmFe4aX4c5ZR/V+k=; b=H2fSn+F7MOFqrGz/ATRf4vjqKtQXjY0qAE3qo4XJa+qKWP0stfJac3tYxmzYJts2FB G61nJPoJbm59FuJmXmW/bx0iAVcF7byRFdVleRifV6NYqttSJdCKSw3j1/zp5xoM+Nd1 clbA1CU5dAFDp8Kn62MTbMxEZtVI2lS2hxnJbC7akbi54iSZU6/J7kPmuiR8qv7BmKi4 4zl++ycrTh7XynYUI8bR1tyxLmKnyFa/q8nCZ1ufHudlQp2uLrsFRHFGRR/6ZToR87Oj of/F4MqhVzq4u83g0oNC7yrhdxn9XM5Z7GKYEUVB3YKLh35VfQI7QnYwDAMZqnnkmIkx Lbtw== X-Gm-Message-State: ACgBeo1v0/6TOKINt0v/kEjhRIMr3JN+tHLNf+nTn5efheT8z+lx1tk9 2RjXefW8YCYY4nEqVS1TfGks9Q== X-Google-Smtp-Source: AA6agR5tVzHoU3HEslnVDxq5DUWCV6UhWq3gNelSTKqOZL7bDA0FNbQdn61C9alcviGq+b7WvPOknw== X-Received: by 2002:a5d:4852:0:b0:21f:17e:bffd with SMTP id n18-20020a5d4852000000b0021f017ebffdmr17581187wrs.542.1660157177597; Wed, 10 Aug 2022 11:46:17 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id y13-20020adfdf0d000000b0021f0ff1bc6csm16944743wrl.41.2022.08.10.11.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 11:46:17 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , Jessica Clarke , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 2/4] hw/riscv: virt: fix the plic's address cells Date: Wed, 10 Aug 2022 19:46:10 +0100 Message-Id: <20220810184612.157317-3-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810184612.157317-1-mail@conchuod.ie> References: <20220810184612.157317-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_114619_956152_5F5A8AA9 X-CRM114-Status: GOOD ( 10.25 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley When optional AIA PLIC support was added the to the virt machine, the address cells property was removed leading the issues with dt-validate on a dump from the virt machine: /stuff/qemu/qemu.dtb: plic@c000000: '#address-cells' is a required property From schema: /stuff/linux/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml Add back the property to suppress the warning. Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@kernel.org/ Fixes: e6faee6585 ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Reviewed-by: Alistair Francis Signed-off-by: Conor Dooley --- hw/riscv/virt.c | 2 ++ include/hw/riscv/virt.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 6c61a406c4..8b2978076e 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -465,6 +465,8 @@ static void create_fdt_socket_plic(RISCVVirtState *s, qemu_fdt_add_subnode(mc->fdt, plic_name); qemu_fdt_setprop_cell(mc->fdt, plic_name, "#interrupt-cells", FDT_PLIC_INT_CELLS); + qemu_fdt_setprop_cell(mc->fdt, plic_name, + "#address-cells", FDT_PLIC_ADDR_CELLS); qemu_fdt_setprop_string_array(mc->fdt, plic_name, "compatible", (char **)&plic_compat, ARRAY_SIZE(plic_compat)); diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 984e55c77f..be4ab8fe7f 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -111,6 +111,7 @@ enum { #define FDT_PCI_ADDR_CELLS 3 #define FDT_PCI_INT_CELLS 1 +#define FDT_PLIC_ADDR_CELLS 0 #define FDT_PLIC_INT_CELLS 1 #define FDT_APLIC_INT_CELLS 2 #define FDT_IMSIC_INT_CELLS 0 From patchwork Wed Aug 10 18:46:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12940890 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4F2F1C00140 for ; Wed, 10 Aug 2022 18:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xQrHXhNTX4nqmXtTTs3f6MmCpFk+n2KwlceNqSJaFs8=; b=wckXa+JmBE6NM8 6wSLfsl9OzTezV0zqdlLaXboYJngIKIjzSfyh9Uj06Ku8cuee8yV1yo4jnn2VjVMWv1Ys/yEyAYu6 yPfGRkHXUIGXfJMQ5jwrnsC/bNHkP31OhG1voSMYkCQP3k15sq0rQQn2XqUBb+0cSeeKgfRsj8Qxf RqSeHg63GCawE3AUogFh4NgfpUWLpTy4y1NSjsU3hIN60ymgoolrj3JF2749makXZd4ZfEmqdnsS+ 9E0xHbP7XZOp4qUMKafbGmYNxhuZUynR3ZR8t2wyY5vfMg7+9bcM0T0tqWz6lBJBBI6w4nAn7PhVr OfEYQpCh7man1OLvtTJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqiq-00DrBb-F3; Wed, 10 Aug 2022 18:46:28 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqii-00Dr6B-OF for linux-riscv@lists.infradead.org; Wed, 10 Aug 2022 18:46:22 +0000 Received: by mail-wr1-x42b.google.com with SMTP id z12so18728256wrs.9 for ; Wed, 10 Aug 2022 11:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Ojga+9p3SQfxSYMJSQhI2VTXIlpadm2PoIsQ+roVjwc=; b=MSfjm0YokPiaDmHPuaROaUDsZ8/pUXA831Er++GvzGGxnCIqEJOn6huU50l20IVB7y KDdDZEYvddfyEURgxkW13YIlSBRLXztdKfkHj2rM2ei9HuD82EDKcbaKcfwTsR3/Msce +sLfW4SRSgi+Ys0qanx+nQB/mb7kSQI22B9oG9bWhwJriwGv7rwO4M2QkF/uAKkeKFl4 2OqWSv3yOBdvgIl5pP7I4Fq9eH+nUrtU5lOAdkivbG0P7di/+SXRojEOLrF4SIg6OHOx WnPPPK30FKq0rmP87iqw2i7Hk9+yptClFFzVMG7NWSeHIAVutG1aSYQ6yE8isfrzYB2W TIVQ== 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=Ojga+9p3SQfxSYMJSQhI2VTXIlpadm2PoIsQ+roVjwc=; b=wZkZybQQAq5beatP21KXyqTjbUmEpIL8XB3PWCYltefWZVit3vxxzLaa8pB7gr9W3S KoOcx4O/l5C+/HmoWrPlKjnlTMafKzzBHwDtdevIZallDZKjNhKXCfBv3hfDfMD9mHPt Crxz9/PPgvwcyPp/Cxdqo4kkxrjkZdk52FhKIxh0H69Kpgia7itbdgq0TfxgXOIs/Bc2 /yA5/t4JbDSgxgFX8WcHqitCVqcmPFxSdDKcDr0aVZbgVhnFLDZHG/pPE3kRExUQlZ4l Y597zil5XQ6EbuYWdNbSXGdewb5hZzxQ3WL109H+shZ+WOok0KHOtc0ym0+fhxuaIimN leUA== X-Gm-Message-State: ACgBeo2aqt3lRt/V8pFQ9Z3K11V5t1B7jitlenv6MgfNWWfwk2w+tI7W eyZ6xmYTQwY7YK/KnjyPU5WUMg== X-Google-Smtp-Source: AA6agR71WL7BgpoL3L1/xyAz8IdT4PwLSy4E4iNNtOayTtRuJyqphjx/a+4BmrBYBtsJ6UBt+HxBOg== X-Received: by 2002:a5d:61c4:0:b0:21e:e00c:f8b4 with SMTP id q4-20020a5d61c4000000b0021ee00cf8b4mr17221628wrv.145.1660157178461; Wed, 10 Aug 2022 11:46:18 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id y13-20020adfdf0d000000b0021f0ff1bc6csm16944743wrl.41.2022.08.10.11.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 11:46:18 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , Jessica Clarke , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 3/4] hw/riscv: virt: fix syscon subnode paths Date: Wed, 10 Aug 2022 19:46:11 +0100 Message-Id: <20220810184612.157317-4-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810184612.157317-1-mail@conchuod.ie> References: <20220810184612.157317-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_114620_819048_B417F621 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley The reset and poweroff features of the syscon were originally added to top level, which is a valid path for a syscon subnode. Subsequently a reorganisation was carried out while implementing NUMA in which the subnodes were moved into the /soc node. As /soc is a "simple-bus", this path is invalid, and so dt-validate produces the following warnings: /stuff/qemu/qemu.dtb: soc: poweroff: {'value': [[21845]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-poweroff']} should not be valid under {'type': 'object'} From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml /stuff/qemu/qemu.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'regmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {'type': 'object'} From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml Move the syscon subnodes back to the top level and silence the warnings. Reported-by: Rob Herring Link: https://lore.kernel.org/linux-riscv/20220803170552.GA2250266-robh@kernel.org/ Fixes: 18df0b4695 ("hw/riscv: virt: Allow creating multiple NUMA sockets") Signed-off-by: Conor Dooley Reviewed-by: Alistair Francis --- I dropped your R-b Alistair intentionally. Tested both Linux and FreeBSD: [ 0.073406] device: 'poweroff': device_add [ 0.073441] bus: 'platform': add device poweroff [ 0.502347] bus: 'platform': add driver syscon-poweroff [ 0.502379] bus: 'platform': __driver_probe_device: matched device poweroff with driver syscon-poweroff [ 0.502397] bus: 'platform': really_probe: probing driver syscon-poweroff with device poweroff [ 0.502423] syscon-poweroff poweroff: no pinctrl handle [ 0.502681] syscon-poweroff poweroff: pm_power_off already claimed for sbi_srst_power_off [ 0.503333] syscon-poweroff: probe of poweroff failed with error -16 [ 0.073629] device: 'reboot': device_add [ 0.073664] bus: 'platform': add device reboot [ 0.500640] bus: 'platform': add driver syscon-reboot [ 0.500673] bus: 'platform': __driver_probe_device: matched device reboot with driver syscon-reboot [ 0.500694] bus: 'platform': really_probe: probing driver syscon-reboot with device reboot [ 0.500725] syscon-reboot reboot: no pinctrl handle [ 0.502168] driver: 'syscon-reboot': driver_bound: bound to device 'reboot' [ 0.502242] bus: 'platform': really_probe: bound device reboot to driver syscon-reboot syscon_power0: on ofwbus0 syscon_power1: on ofwbus0 --- hw/riscv/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 8b2978076e..6f0fd1541b 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -896,7 +896,7 @@ static void create_fdt_reset(RISCVVirtState *s, const MemMapEntry *memmap, test_phandle = qemu_fdt_get_phandle(mc->fdt, name); g_free(name); - name = g_strdup_printf("/soc/reboot"); + name = g_strdup_printf("/reboot"); qemu_fdt_add_subnode(mc->fdt, name); qemu_fdt_setprop_string(mc->fdt, name, "compatible", "syscon-reboot"); qemu_fdt_setprop_cell(mc->fdt, name, "regmap", test_phandle); @@ -904,7 +904,7 @@ static void create_fdt_reset(RISCVVirtState *s, const MemMapEntry *memmap, qemu_fdt_setprop_cell(mc->fdt, name, "value", FINISHER_RESET); g_free(name); - name = g_strdup_printf("/soc/poweroff"); + name = g_strdup_printf("/poweroff"); qemu_fdt_add_subnode(mc->fdt, name); qemu_fdt_setprop_string(mc->fdt, name, "compatible", "syscon-poweroff"); qemu_fdt_setprop_cell(mc->fdt, name, "regmap", test_phandle); From patchwork Wed Aug 10 18:46:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12940891 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9E19AC25B07 for ; Wed, 10 Aug 2022 18:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OSSx7MqWfitwOutLNHK0H8FnmUxEw2TIkAWVz5yP39o=; b=X0zJQf5ppwd7VR T12bhwOgn4QBhMW9tiPtDqpHT73eRhFNADaJl0zk5rjOaQVTAiB2U2QQ8CbWSUiB/vfAUlLOEowkg BCc9RwCXeNOqDztUHIcSb+0yCpDyGwnwjCOKvLz2bKLuudvQTcS0XA6g/GjHXLLQk60PMECBPClB4 SwMWgB4mfrl2cT2X0tuTOGGtsPAkgTSrwIWL5tEQbtrnTep7Fb66G18olnrsGTKdU5kxbxqGIsxNf Nj3aceEllUP/qrB48HyNEfjJvfPn9OAYIr4p+Xdz8y0Pb4q7D/fE3yl4mfIJU/1jkxt0h2aO31uyY 3iox8s6gPAKiVz8qxhqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqis-00DrD7-QY; Wed, 10 Aug 2022 18:46:30 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLqij-00Dr6b-NU for linux-riscv@lists.infradead.org; Wed, 10 Aug 2022 18:46:23 +0000 Received: by mail-wr1-x431.google.com with SMTP id z17so18724970wrq.4 for ; Wed, 10 Aug 2022 11:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=VJdQR/zkeKenpTuqia/TTJ9m1dTc7j3X6f24wA4YnSA=; b=JCziDnpU8rCiA8ClzY/qKpkzwNSWGcUrRt8hBWMXdKyFhGK2L0StNyBrEujci74qL2 0nW44P7962pD7aiCmXLxKgF0Y17J/doJaV1eFIlWyufOIdrqEGGVl94W9BbZO0kwQXRY LjdXlJKRmQZat78f15w4ni+6mcdd7NGoByc4ij86QBARZPGaG4N3Tou3Y1nBCaR3/Ejw sWmFKisjiPAP4SFIJvlFkZeIXzbCFCh/13miY5D6s611Asz41glRIYYAZf3yjNqm1QwV 5sS1wIvdTJAVr6T8NaA053f76PwfV9gj6sMc1GhOsCLQdMZrkLn2Wwb1YodCLL1zB+re R5BA== 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=VJdQR/zkeKenpTuqia/TTJ9m1dTc7j3X6f24wA4YnSA=; b=JBsPrq3VdHP96YMExksCzpSNVJciGg5nF7i+MyweCfR+jie1QOPFnh39NCI9+CBswq 8tKCV/wqwf+CZ5JRhcXKTeNbvvt7RDW9UbU4oE1utSFOWjvebtMl9DYPw3N9WVmIZlHS tMBvaot73QqEu3nX8kCDyDmkd1Nr9EK4vKP4Md2A7Mlr7gjT4twf2dIFTPLngBLmFLrO Em02zcrqY2nLCWdHCoAq5AHxnEzJPKxkLUjgKyACAhI07wkgDQJM3HEZTquhBm3Bw7sl 29hm2yJSkkymLWZ09geV+T/dgLCLrBZ5Oe9dm3qCJiTYpDT+mXSVNi+FuB3kZXuYXygr eJjg== X-Gm-Message-State: ACgBeo36UmNGS44JgMaHfpo+9koAHH/nuw+m++09SvQM2E4oUEmVjxLW VDOGfnUixN417SpbRFFuX6+bSw== X-Google-Smtp-Source: AA6agR7TAaQQe6nfKejnLpfRfrSOf3iJHZk7un51nw1xco6YVF1eMQV4AjOpJBkFg0N8+VJaIdPvNQ== X-Received: by 2002:a5d:504b:0:b0:220:7ae9:d7df with SMTP id h11-20020a5d504b000000b002207ae9d7dfmr17470381wrt.465.1660157179375; Wed, 10 Aug 2022 11:46:19 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id y13-20020adfdf0d000000b0021f0ff1bc6csm16944743wrl.41.2022.08.10.11.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 11:46:19 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , Jessica Clarke , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 4/4] hw/core: fix platform bus node name Date: Wed, 10 Aug 2022 19:46:12 +0100 Message-Id: <20220810184612.157317-5-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810184612.157317-1-mail@conchuod.ie> References: <20220810184612.157317-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_114621_789205_D449EE34 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley "platform" is not a valid name for a bus node in dt-schema, so warnings can be see in dt-validate on a dump of the riscv virt dtb: /stuff/qemu/qemu.dtb: platform@4000000: $nodename:0: 'platform@4000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' From schema: /home/conor/.local/lib/python3.9/site-packages/dtschema/schemas/simple-bus.yaml "platform-bus" is a valid name, so use that instead. CC: Rob Herring Fixes: 11d306b9df ("hw/arm/sysbus-fdt: helpers for platform bus nodes addition") Reviewed-by: Alistair Francis Signed-off-by: Conor Dooley --- hw/core/sysbus-fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/sysbus-fdt.c b/hw/core/sysbus-fdt.c index 19d22cbe73..edb0c49b19 100644 --- a/hw/core/sysbus-fdt.c +++ b/hw/core/sysbus-fdt.c @@ -539,7 +539,7 @@ void platform_bus_add_all_fdt_nodes(void *fdt, const char *intc, hwaddr addr, assert(fdt); - node = g_strdup_printf("/platform@%"PRIx64, addr); + node = g_strdup_printf("/platform-bus@%"PRIx64, addr); /* Create a /platform node that we can put all devices into */ qemu_fdt_add_subnode(fdt, node);