From patchwork Mon Aug 8 21:06:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12939140 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 D9104C00140 for ; Mon, 8 Aug 2022 21:17:06 +0000 (UTC) Received: from localhost ([::1]:42636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLA7V-0007VH-Su for qemu-devel@archiver.kernel.org; Mon, 08 Aug 2022 17:17:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL9z7-0008EQ-Ie for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:25 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL9z4-0006KW-Jx for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:25 -0400 Received: by mail-wr1-x42b.google.com with SMTP id z17so12214429wrq.4 for ; Mon, 08 Aug 2022 14:08:22 -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=XK4wHIwZI1VIgmfh4aS4nuMCqHus/q6qeAh93CvJuKLLBPDj+zCi/bsntDY3EFjQbh 3D/x/fnF40VpSYbtsW08BZUJLdIvsQXcDevW1TQudOYbRVKJjWiI9YlfMBGZGUg4FJcG e/Wr0FGwOTEFatMiN9f449TLEuz10NB13BQiW683VKgNryHQFgHEQhTNH9zlhq8I+Mtu LpOvp8Iu+/NRDrXZ7VPfKOc19TxmLoOSb6JOEQURjoconCTnQqRDZQnEfUPp9YcbruVl G3YrNnTG4i3uOzKpijtFdrZH5hnAMNW4Z2FPq4YExIWyKs6FLqDCzJx5dkKGJsXPIzGg RVPA== 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=ILXKDsiDULlW+rALlhc5fCJqAimhLsqR01poTqPFJFHr1/W48T1UBOC55teHhZXB0R jwDtiGaKTzTPQ0jJj8SEDx4AqgV02ZgfEe6BEgomaX1uXiOYEZmhd+octfWckLyif093 +Hs96Al+ixVErtgtsWuw1p8D/UjQ/jxbwtJKIZ+DxyBMyUxQXcgEuXhpv9FTStAtGxvq Pm42psR+L4fk79jh/xAWLfcKPANhXsu7GhVbwlc9r/5kHAPQMHlC7lVXNdQhLik4cfBz v1XN7trkPXiaXQJOedtABIAmx7jOOgKXFBO1cLZAkZPikoyz3gm4ABHsl9639kDNMDnb WvxQ== X-Gm-Message-State: ACgBeo2TBSVpE5z2NLz49gWmf4bOZZY/aOCrQGFcDKaF/GAyKtunUiaZ 258hOWlMSZioShh6teoJPgucoQ== X-Google-Smtp-Source: AA6agR7z6uM/3AoQrwZic1UwZS/GsB1rbuTP3rAL8ggDxUp68YD0jOskdhjlF6fIheITRBHxIzEp8w== X-Received: by 2002:a5d:6609:0:b0:21f:ff6:9090 with SMTP id n9-20020a5d6609000000b0021f0ff69090mr13240982wru.30.1659992901275; Mon, 08 Aug 2022 14:08:21 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i17-20020a05600c355100b003a2e92edeccsm19811955wmq.46.2022.08.08.14.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 14:08:20 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 1/4] hw/riscv: virt: fix uart node name Date: Mon, 8 Aug 2022 22:06:41 +0100 Message-Id: <20220808210643.2192602-2-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220808210643.2192602-1-mail@conchuod.ie> References: <20220808210643.2192602-1-mail@conchuod.ie> MIME-Version: 1.0 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Mon Aug 8 21:06:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12939137 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 68C42C00140 for ; Mon, 8 Aug 2022 21:14:55 +0000 (UTC) Received: from localhost ([::1]:40350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLA5O-0005wh-EL for qemu-devel@archiver.kernel.org; Mon, 08 Aug 2022 17:14:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL9z7-0008ET-Kk for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:25 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:37773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL9z5-0006Kj-PB for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:25 -0400 Received: by mail-wr1-x42c.google.com with SMTP id z17so12214477wrq.4 for ; Mon, 08 Aug 2022 14:08:23 -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=XaYbCDvok/GvxFa0f5R6nAc+lfRixiYd9G7yozDXN/kSc7eZH9qvkEGMaxHGlYAnyF Dkp8ApN+dMiEubPdhMLBOAH/sZZX/7kq1lqi6+4BVy0AsLt5H62S7NvF/s+inzuYAz48 uE+NTLBwmcDmvjPCNz+VqkzXreiVpewG1s1gbmJvp05B6Y2ZUBIFWeOcQO7irHyvh6Ui UniFy+OX97ziDqcSI0loms89zlnCRIMA4QdeVlcmh9tlXwrL1Qu4SEPA/Esu/5h8dany CzOBksHoYoIr5g4mygXSVF5FJ4ACFNWAcRLN2B3CaPGHiy/lm5nwnvq4y3mYIR3XBJ2a rdnw== 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=rL6v8NVFEohyRkAqln8U616HhtuISKlw1ZhGW4XtsZLvAgeOEJDpEl/lIH/4UG8YFl pP1l7RD8otayiaXGtzOd/hNtPitWU/mkCur/YwdGykVafae03v+d9h8GJgKMMhtDV3x6 wKDf76EVoIrlTDMA5WZykQLOKdq6WaUwxrmH8BVbj/3dVEqh6FEQgDpnj3Uryq8V8T3y m14yFdz212aFe78du6QPI0S2NpKIm/9Z28JDk6KMn1M56UYGR8VDOes72bBx2AR8KsKc abvvOc8oRQhmShozPWjWdLCbn1Zqh2ZQPD6oA2Q8W6y4ktz11MXOXuNa5C0SJI1WojQv p1Uw== X-Gm-Message-State: ACgBeo0dDyxiUFWmzCKjohv0nfPmVrWJ4Y/I/ocXywZ1SKEGMMVyGSuV ArU1mSrLeSzfwhUYALP8hGwVcw== X-Google-Smtp-Source: AA6agR7pnInZsNd3ZsPBnPPgDBz/r5knM7XTF8qQgzFc4K+jCnSOxE+F5iQ58xcJVE5RYKbsiUkpzw== X-Received: by 2002:a05:6000:156b:b0:222:c789:cb2d with SMTP id 11-20020a056000156b00b00222c789cb2dmr5262920wrz.197.1659992902355; Mon, 08 Aug 2022 14:08:22 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i17-20020a05600c355100b003a2e92edeccsm19811955wmq.46.2022.08.08.14.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 14:08:21 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 2/4] hw/riscv: virt: Fix the plic's address cells Date: Mon, 8 Aug 2022 22:06:42 +0100 Message-Id: <20220808210643.2192602-3-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220808210643.2192602-1-mail@conchuod.ie> References: <20220808210643.2192602-1-mail@conchuod.ie> MIME-Version: 1.0 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=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" 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 Mon Aug 8 21:06:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12939141 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 0B342C00140 for ; Mon, 8 Aug 2022 21:23:47 +0000 (UTC) Received: from localhost ([::1]:47186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLADs-0002jw-AC for qemu-devel@archiver.kernel.org; Mon, 08 Aug 2022 17:23:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL9z8-0008G5-JE for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:26 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL9z6-0006Kx-O8 for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:26 -0400 Received: by mail-wr1-x42e.google.com with SMTP id j15so12230194wrr.2 for ; Mon, 08 Aug 2022 14:08:24 -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=0ajOPxy/v/tTsJ/HZ3G4BXDWf2I29Kqy4qHffsnPMhs=; b=KqSVU6AK6ulgYPeBs31yngVlU2Ee9aa/rzGfsjILtNR8FqtWpA0dwzUZZ7/etxclxr 8WuNH+vABTf80sM1zLCdhfz+AQzco9TpRL6YrrGnlBoHit566hNJDvXPA6HgY4bkbv+k OaiiTvuG8c0M93RYeCzhye1Cx1Wds010vQiUwRBpOOQZ236PGWxn6N6BM3OoQMuwTMH7 EM/D9uhjquvXaTf4u3J+Hq7qIKn/IiB2bwpvA9j7/4wWX+ckBgJHvY5eAN+aFHJN1BCq Nv69EyF0Ukj8K95n8yhE4hK2uSe5Rh0wf5XL9UjgD869mWeMSPpn6TqDZpWgQOLlr7ZU PYUg== 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=0ajOPxy/v/tTsJ/HZ3G4BXDWf2I29Kqy4qHffsnPMhs=; b=WuwkN0NCH8R2kZHWcPrUp9OStjwmMRhVVsqJg3Ygr3bbTcsSQMdoUeUDHBi9+/VhPd aNHmY3rHgIw4cLyznNP38yMOy863NCiJ6VvHW6KvfN1wYyzInbJi6kdhcTIcRKlBIQIC Y1wP+hgQbFc2R4pv85ItL6vQ/AQpDmP4leAZuIflzkQRcBt04HcS4RzYyVXkgb1Km5P1 nXJCxfQfsUr++eZYr2DKaa0rZfthJ1t/JyuVy98o/QPC3eQ4lWd8S6052a7ygBrHm6Nj 94fGzj/orLNHudPoXBlSwimjuHeFkeP76vnGtQ9Ivp1IAf9WTi8zt+uQ6fCjl3I87KNR JVqg== X-Gm-Message-State: ACgBeo24vU8qGhVz9NktUalzMxHpSitt8uC3Rk/agIf/dCzKxWf8028y PdORWVCK/0UPNe648R3VJYN9sg== X-Google-Smtp-Source: AA6agR6LlfEnOfEbh1WK7NgwLMeQG/O7QUNUT88MyPL54Pg5NAkbxDOKuQugCAT9FIpECNXnBS2EsA== X-Received: by 2002:a05:6000:812:b0:220:5a66:ebd0 with SMTP id bt18-20020a056000081200b002205a66ebd0mr12753638wrb.519.1659992903425; Mon, 08 Aug 2022 14:08:23 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i17-20020a05600c355100b003a2e92edeccsm19811955wmq.46.2022.08.08.14.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 14:08:22 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 3/4] hw/riscv: virt: fix syscon subnode paths Date: Mon, 8 Aug 2022 22:06:43 +0100 Message-Id: <20220808210643.2192602-4-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220808210643.2192602-1-mail@conchuod.ie> References: <20220808210643.2192602-1-mail@conchuod.ie> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=mail@conchuod.ie; helo=mail-wr1-x42e.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" From: Conor Dooley The subnodes of the syscon have been added to the incorrect paths. Rather than add them as subnodes, they were originally added to "/foo" and a later patch moved them to "/soc/foo". Both are incorrect & they should have been added as "/soc/test@###/foo" as "/soc/test" is the syscon node. Fix both the reboot and poweroff subnodes to avoid errors such as: /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 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") Fixes: 0e404da007 ("riscv/virt: Add syscon reboot and poweroff DT nodes") Reviewed-by: Alistair Francis Signed-off-by: Conor Dooley --- hw/riscv/virt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 8b2978076e..a98b054545 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -896,7 +896,8 @@ 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("/soc/test@%lx/reboot", + (long)memmap[VIRT_TEST].base); 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 +905,8 @@ 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("/soc/test@%lx/poweroff", + (long)memmap[VIRT_TEST].base); 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 Mon Aug 8 21:06:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12939136 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 D99F0C00140 for ; Mon, 8 Aug 2022 21:13:31 +0000 (UTC) Received: from localhost ([::1]:37526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLA42-0003z2-MK for qemu-devel@archiver.kernel.org; Mon, 08 Aug 2022 17:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL9z9-0008I4-In for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:31 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:50715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL9z8-0006LR-0o for qemu-devel@nongnu.org; Mon, 08 Aug 2022 17:08:27 -0400 Received: by mail-wm1-x32f.google.com with SMTP id v5so5396552wmj.0 for ; Mon, 08 Aug 2022 14:08:25 -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=JddNGHWDeeejm2RIJHx/iBhnK4ZsV/U8akRmYUJecC0+M88okiM7FdxKpDerVLuNZc 1JG+i4WUzOgZrGF+yyP6S57mck6D9oX/fbsVbYaWJHNAkElO6FRIp4kQpmBbZb30XIfs hTwJeoc3LWLOAw35qTX/r5jXgXmDphAHNcPwDQXL+DF31qcn4eQOsrAVr7PVgB+bX0fV tR/ZuFBfr4iYtniDLQZA5ci6fscCF4+d1TOPdDrq57vlQ84qFeWpe/mJrPvFpsZf9guO zksAIlJB4tZu1PolizuifoqLskduaHL7MWM6UFMUw4tvoIXxcJMCGvwmdwJlPPhN7fNn 8nmw== 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=srnxozP0kVVgJqnSIpJMz97riliwyQ33qVt/UfU6nou3jq2JBbn+515VQUnIgTDRJz qip5Sm7KsKw5Nap1QGpB2Ie3eeS2MVNi8wXAaMNcxF4c1orZkXrrJuNL6Q0y0+5T8OrA SdviORgaBXtZUUHoHXyzHY10t9ZLDzQQ+vxofgMRo4qPrm14KxoEqy5Y2B0IGobUNxFk 71v1H0/bhgoTph8SayViiW4kAnFz/kj+egGEuKrq4NwNP4HxU45Y+uty1GfOkU1VMpZb koYnGsIjmrofg8bkafRffnShHyX/hXlCsVK7MjrRsBUb77wR6wgjDEiDA24USL2yLOID cnqw== X-Gm-Message-State: ACgBeo2pRSE3L0hBqpWJpV9X2xHvvxVxptI0mvH3ZqPFodLSJalvV9gd pbJijX90S0xwM1n9xb1WtOk4Iw== X-Google-Smtp-Source: AA6agR46x1AlO/jiQSG57WcvYDDMG3jH+AztYwAsHFqxHQo4Ry3vl3BYbmunOzGYbCe7dbvp/9A6JQ== X-Received: by 2002:a05:600c:21d4:b0:3a3:150a:7ed2 with SMTP id x20-20020a05600c21d400b003a3150a7ed2mr13800655wmj.166.1659992904355; Mon, 08 Aug 2022 14:08:24 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id i17-20020a05600c355100b003a2e92edeccsm19811955wmq.46.2022.08.08.14.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 14:08:23 -0700 (PDT) From: Conor Dooley To: Palmer Dabbelt , Alistair Francis , Bin Meng Cc: Rob Herring , Conor Dooley , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 4/4] hw/core: fix platform bus node name Date: Mon, 8 Aug 2022 22:06:44 +0100 Message-Id: <20220808210643.2192602-5-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220808210643.2192602-1-mail@conchuod.ie> References: <20220808210643.2192602-1-mail@conchuod.ie> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=mail@conchuod.ie; helo=mail-wm1-x32f.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" 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);