From nobody Tue Apr 30 04:16:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=conchuod.ie ARC-Seal: i=1; a=rsa-sha256; t=1660158864; cv=none; d=zohomail.com; s=zohoarc; b=ELx4yqbCQ0uTbnOgW/GV0cX6nGGZ51zXSKFISxH8jz2AQgKPSyGtlJEhFDuPG4M/KTBPlQlYvNXFjS84G82GMbbWgQw5DXB/FSZlABdM7/kfYU+QEdlHe683a81xflzNY49z+zAtCmwV4131UnJivqle4WrESQ8ANr0QH6xRWM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660158864; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=maIqyDhug0EL/mXAyR5nYeGttmLcfb6O/BjdQzpTa5E=; b=BzFHCPpJjlzE7HYbnvXVB4ZT/xNYY2UIpQD3ZyksAeAQwvjzisneh3jwCPycSmsriQ1hAFcgYSwmoeAQEIefyJpWbWAbztF5kHDeOZMPvdjJXrL5nBB0GGwC9KYFzYqHLZF0M/I/GWZ4dODLVgOCkSY0v1yCgU7ltiswCS6GUs8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660158864333570.8040109298485; Wed, 10 Aug 2022 12:14:24 -0700 (PDT) Received: from localhost ([::1]:60490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLr9r-0000Bo-B4 for importer@patchew.org; Wed, 10 Aug 2022 15:14:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLqii-0005qv-TX for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:20 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:35455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLqig-0007GH-53 for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:20 -0400 Received: by mail-wr1-x430.google.com with SMTP id bs25so287654wrb.2 for ; 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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 11:46:16 -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=4VMHQuAgWueOOW/2vq5O+yFUyQgD2E8gHZxnXsC4j6CliLzBucQCZGrEna4jBWmfQR DBodyM4cHZV0LEwfCYztWAyY2VKDZf72xs3FLxpYjNB3542BRyjtuk7R2B2KnrI6Pk+W RtwebN1EnaJexDed32JPt9g5fCxUEpuLhF70xLeSKuIjKviiIkAv4TACJPZkvQht/3D1 bvRzQN7Obue0qEli6QtKodb7ouOGq9DNK01NPrHaPOb3gw/oxyEHOCmXZu6T/cVrhLhK /7/mu9v1K6klgj9P+PyIxY0i912ZaeoXfGG2QSQCu0O0HSZUtqtMROeoWsACwcnE7pFd JKxQ== X-Gm-Message-State: ACgBeo0vDna+TbhxWPEvc0ahWdV6TbWJLxvjTJMGaLHrMaoyGbJiwApv 5vJpubG1aRE3xTXeApxK4mPvVJNayuQjNTcD 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=mail@conchuod.ie; helo=mail-wr1-x430.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @conchuod.ie) X-ZM-MESSAGEID: 1660158865695100001 Content-Type: text/plain; charset="utf-8" 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@ker= nel.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 Me= mMapEntry *memmap, char *name; MachineState *mc =3D MACHINE(s); =20 - name =3D g_strdup_printf("/soc/uart@%lx", (long)memmap[VIRT_UART0].bas= e); + name =3D g_strdup_printf("/soc/serial@%lx", (long)memmap[VIRT_UART0].b= ase); qemu_fdt_add_subnode(mc->fdt, name); qemu_fdt_setprop_string(mc->fdt, name, "compatible", "ns16550a"); qemu_fdt_setprop_cells(mc->fdt, name, "reg", --=20 2.37.1 From nobody Tue Apr 30 04:16:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=conchuod.ie ARC-Seal: i=1; a=rsa-sha256; t=1660158536; cv=none; d=zohomail.com; s=zohoarc; b=jziFC0FCz9v0kApVAB27g+cKqA1J6UVk0ezCyIiyLM+CEj8ZHeRPDTVFQl5Z2v5KjM+moeGAQOrHSDM9fB+T1LgP24iHsOboXSMnx1hL/vGWT+i1HcBMC0tqpQhrU4df/9SIsILn/DPrmgd7FW9/YY+JLaxwbvk/GGNSKms0YyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660158536; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dLryJLbtmt3A1NXYGrZiCtyybRqEmFe4aX4c5ZR/V+k=; b=B5poDBniGpaKL0fIK0G1dMzDAB1Ci6M/MgYw11FVDjldb0HU+UFDHqAznTfwzoxIYZirqVeJSOPhgi+YTTfcYBnkKDIXudh1PkgD/c6ld4tSqlrSuHHXiA4H//ALKWb59bvpEQNGGiqF75KmmXmvx2eiVvaSw92FJJHm+Xf4GLI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660158536595368.5638459857224; Wed, 10 Aug 2022 12:08:56 -0700 (PDT) Received: from localhost ([::1]:49394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLr4Z-0008Cr-CR for importer@patchew.org; Wed, 10 Aug 2022 15:08:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLqik-0005uC-8e for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:22 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:38556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLqih-0007GV-17 for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:21 -0400 Received: by mail-wr1-x42c.google.com with SMTP id bv3so18718254wrb.5 for ; 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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); 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=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=CPziatJD8nXIwWFuffdmtKrnPnnU8NjGCPn7ZBU7v7fqCF0pKu6GYXscEjqgCl2I2b ZP9qZd90MzW/GFaVH3GbT9FZI+NbFZY1z/Rhfv2E5a+iFhGucqsk+gR8OQR4p0WKK2Ry R2kAFFH9Bt8O0tJmNPkwx9vBEKr6YxVshx5ky5m7/XzYqrOD/WCvIUIel4CIyx/Y6dOJ H9iJRdGZeVJE7Z8X3VdqatpZwliq9a9vyVS2w7qqcu/Ai5WCZMOcdYumAyU41Gd0224m 932tdTg5Ar/XpJ9nxs1S9DfUsJCtpBzoStcFcuOclosEkg1Csd8XWZSb2InIX2CWG74g U+tQ== X-Gm-Message-State: ACgBeo1H5dEszSn7PLHeytrmogOXlhL86kRlXZ72rHCAiYPYrL6h9TbB soe33SCcvEcBTyvUZ9Q+wlgjvQ== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=mail@conchuod.ie; helo=mail-wr1-x42c.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @conchuod.ie) X-ZM-MESSAGEID: 1660158537759100001 Content-Type: text/plain; charset="utf-8" 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/interru= pt-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@ker= nel.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 { =20 #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 --=20 2.37.1 From nobody Tue Apr 30 04:16:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=conchuod.ie ARC-Seal: i=1; a=rsa-sha256; t=1660158573; cv=none; d=zohomail.com; s=zohoarc; b=hstgVefYxAOu2eT44K0caN91qTJGAYcJ+UaB9dhWeDT199EYKf73mcTG9L7mb0kzbtzBOYfe/ACKtSnml85rtgQXvnou6WB4pKHYheDDx3JH4+7pPRIRAqiXvVCdzNxNyKAjI6vx0XzLeS7xtf5dJEsANHUGjoy12P0muCeD9eQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660158573; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ojga+9p3SQfxSYMJSQhI2VTXIlpadm2PoIsQ+roVjwc=; b=iWYK2lF3beeIR9HT4Bz+PkTJZTC1nO1dBgZUyDQX/8LRwTkv1ex0KcI53GE96BGNoFoxXJr0ilK39mrRIGFaRkpTKamtJAYKzhLS0Up+caAZ4FNWJKfaZrRbVs21uOxjo5Dd+W3Tf+15NRX+ccMOGsAOyfpdYmEpo1QAMOr3+yo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660158573061693.6219455489132; Wed, 10 Aug 2022 12:09:33 -0700 (PDT) Received: from localhost ([::1]:50770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLr58-0000jf-Sq for importer@patchew.org; Wed, 10 Aug 2022 15:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLqik-0005uy-Ho for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:22 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLqih-0007Gy-O8 for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:22 -0400 Received: by mail-wr1-x42b.google.com with SMTP id p10so18712413wru.8 for ; 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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); 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=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=y+3tSmlADyn8Bi+rCIj2xxl/Zamt6r3khLSblNtTlt7WFX5nZePn6LnOpeNjHhJysG IACsiHILlw47YT9NlZE+2zKGz0RPR85L5alagUKRQErBMwGUbHPYk1uGsppcwyVdS1Dk lFi8eInwN5F0p+5qK/HDfhNtFt5abS5i3mhMc1FxvlN3JZpDHVElaySD/TAzC3kwSnW/ BeURVvhnn6W0JmGPjq1iyrFHxso/wiItkdzLfw0Yyunj6DQPKFkrJEBXS60VBoG9YWLo E1N2vGsLm1J+VwRd0mIirS/czTOUWg72U+o8UpE4bLe64TFjyJwqVNAxhqsD9qzp9pEY pw+w== X-Gm-Message-State: ACgBeo33v7jiNOGcuUmQVgeweJ29AqHoZEC/K2E25CnSk7hFVJqbTI/Q EthazCvTCdLFCqc4o4T/kdZWug== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=mail@conchuod.ie; 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=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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @conchuod.ie) X-ZM-MESSAGEID: 1660158573889100001 Content-Type: text/plain; charset="utf-8" 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 und= er {'type': 'object'} From schema: /home/conor/.local/lib/python3.9/site-packages/dtschem= a/schemas/simple-bus.yaml /stuff/qemu/qemu.dtb: soc: reboot: {'value': [[30583]], 'offset': [[0]], 'r= egmap': [[4]], 'compatible': ['syscon-reboot']} should not be valid under {= 'type': 'object'} From schema: /home/conor/.local/lib/python3.9/site-packages/dtschem= a/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@ker= nel.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 power= off with driver syscon-poweroff [ 0.502397] bus: 'platform': really_probe: probing driver syscon-powerof= f with device poweroff [ 0.502423] syscon-poweroff poweroff: no pinctrl handle [ 0.502681] syscon-poweroff poweroff: pm_power_off already claimed for s= bi_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 reboo= t 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 'rebo= ot' [ 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 M= emMapEntry *memmap, test_phandle =3D qemu_fdt_get_phandle(mc->fdt, name); g_free(name); =20 - name =3D g_strdup_printf("/soc/reboot"); + name =3D 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 M= emMapEntry *memmap, qemu_fdt_setprop_cell(mc->fdt, name, "value", FINISHER_RESET); g_free(name); =20 - name =3D g_strdup_printf("/soc/poweroff"); + name =3D 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); --=20 2.37.1 From nobody Tue Apr 30 04:16:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=conchuod.ie ARC-Seal: i=1; a=rsa-sha256; t=1660158441; cv=none; d=zohomail.com; s=zohoarc; b=oHmsPv+2RLYkaYbYTwKHB9pqcj6LC16XA9tznfboDEtD19OGRB4RRVEr9s5Z6bOTl68HVkZCZys5puZLEljbRhmg8R4IpMlmyottmPya1VZ6n/ainrPk7d7egY+AeYfu5LLU/9NNQt/KLYtPfpFU8rjspJ50djA9Wh/3dEfJuTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660158441; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VJdQR/zkeKenpTuqia/TTJ9m1dTc7j3X6f24wA4YnSA=; b=Y6DuwA1wC4CyMsqDjGp5KoUcwy1+n9wzsi2ldQE5pFzjsqExZU5wNEQqcSvZjXYlkp5FtmXaTojZ+g7KaHWTQNygtIPgx5oaqcYucatT6dLU8uMtesfhs+Y5mxTiInfsEgQuqs9TpJKlfQVGHK5CFQaZ6wv2guHGvBf8U4ywl1M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1660158441027792.916471874046; Wed, 10 Aug 2022 12:07:21 -0700 (PDT) Received: from localhost ([::1]:47300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLr31-0006mm-Fk for importer@patchew.org; Wed, 10 Aug 2022 15:07:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLqik-0005ul-Em for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:22 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:36370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLqii-0007HT-Oz for qemu-devel@nongnu.org; Wed, 10 Aug 2022 14:46:22 -0400 Received: by mail-wr1-x42b.google.com with SMTP id j7so18769934wrh.3 for ; Wed, 10 Aug 2022 11:46:20 -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) 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=Rbu9GxyhjLYDmpMxN3DJxQQQrhycCIN7GMLs4rmE7+JIPO9p1bYL0jnTI6fjZJU56U /Uy/BO/VB5ZHsPas1Nu8ujwirFjuAlCyaCwdRAJijd/hB086lXGp9u5CbvCL2Cliu3Pz xB756NQt6grTQY5Ehs5uf22rdm2ekTeakBb2bMK1+ji6s9o1x3Z612dPYYIX/F3577+F 4G9moKwDwZUScCgb72qJWp0pisen0+XAe9k9mhLf3s/D57orAuv+foeyMUdYREuc9onn 5LMLDzCQiwI2lGKSas4WdWCF1eDs4/GkCKYLerFhkPCYjPWFsRvE0TNcbsTRtFIsAm5W f1jg== X-Gm-Message-State: ACgBeo1/Wh3zSZVedoN6V5e25rrzMQdzJDlDtXKurzgIQE922vLILCN2 9qQ6wsCG8t3ByXZH5xwBXz4Juw== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=mail@conchuod.ie; 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @conchuod.ie) X-ZM-MESSAGEID: 1660158443354100001 Content-Type: text/plain; charset="utf-8" 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' doe= s 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/dtschem= a/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 addit= ion") 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 ch= ar *intc, hwaddr addr, =20 assert(fdt); =20 - node =3D g_strdup_printf("/platform@%"PRIx64, addr); + node =3D g_strdup_printf("/platform-bus@%"PRIx64, addr); =20 /* Create a /platform node that we can put all devices into */ qemu_fdt_add_subnode(fdt, node); --=20 2.37.1