From patchwork Tue Jul 5 19:04:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12906965 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 A5B23C433EF for ; Tue, 5 Jul 2022 19:05:13 +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=NaMcakLOQaItZNQ9e8FwaHpbU0ywgvRgCRWqB3NKNIY=; b=lTUiJs+UxDAsVG 6KHeLp06AuEf/nlzi8OOOK5oBICl3WMwvGBgvR1DdnE3ggqjPVovtVQmU0A10kX/C6+H3CESloFy5 e4qTMsYaOgxuQCZ5GOzBP3OlKrgct4UXS44pLVmt62Epry0fdBIo/qkKU9WyXFK9SxWXztuaMSaZ6 ybbboCGznEKJYCebQ4e9TupmfW4K/o0VPcv0C9+pJ5Tx6GEhMtE+biZMbsTezLXmVB1kAEmI5lJOF 2fFxxZAJW6QL292L+xNtuOZTNE81Ox0KgKPlrxhGA/46Kq4N9ut4d5nMukQMCzSWYy0BrtYIkMb5J KtU8b8wykm/kxe6VNoIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqx-002EOm-Tm; Tue, 05 Jul 2022 19:04:55 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqt-002EL7-EZ for linux-riscv@lists.infradead.org; Tue, 05 Jul 2022 19:04:52 +0000 Received: by mail-wm1-x330.google.com with SMTP id f190so7580904wma.5 for ; Tue, 05 Jul 2022 12:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BQOVUNXHvwHVcucqUlVv6BnH7JR1aGPeK9i5YAi0Y4c=; b=SMCwI1AUdC5Z5umwrRWknLPNvbobCNRXr5gkynO1gpaKoWOB7NbxsldL+1F5GgT+GR DjGz9/P4VOH+zT0ApBC3nAj9SaYA8bl9PwDwpKYtJSvHPyBJ3rxIlwColLPEhHA6htoG BshgcauwhGltFavxv3m2/BquB79DYVejyEytpDb2+tww9WA7j3jyELnuVx0KxT5+xpm8 q7n7J/XoBnMIEM5pjCg4ox5jYZ23uFdpqxeBwmOjjLvJQOm93XsRCkECL5jg+z9FG6Hh KqleVJwWfSle8KFpr53AMLL8i7toF5OjUZapP8KmI1oRvdPgl9ReB1pPTTl1uWh9Ag73 0KqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BQOVUNXHvwHVcucqUlVv6BnH7JR1aGPeK9i5YAi0Y4c=; b=ckvHznZl/l/eCeEyzL2oujKld/CplaEk2Kp0b12zCK9A4E2FHlAqsnMjGUOV3iPToa owHdUCZRDkFtoPhrpC2abIjE1Er75AFyjYi32DTfzVDgoW5y24DK4pY3MOw485O+q9tJ UEgsg8KtgXHur4eo6w7UNrR4jOq6gGKtF+f6aJ8lUxj1exQQ6eyLuz4UtVRb03cPEniC rkXIbhRJqvVM1tpywL4FzeXtVOIPwiRFj2S8Q0N6WehbzED4xd1DKUMvLWlkN+uevVsd KFBSfjuWQysV9bJMnFkHyMQb1pXI/AvAZBurdWxVSkFn1XiOCephFJTB7ZZ3uM8DC/r4 5QTg== X-Gm-Message-State: AJIora+z2RjpI6KpdHPtrgphYFxoSekiyMTbCMEkW0qmo19uckrFab4Q RJU9zvMmgKv7RLrsGDrS1oQmSA== X-Google-Smtp-Source: AGRyM1tZGLDMdvlgykupbCQXP9nd5v6//7GI6YZxCZExzQZtITUr0XqM8RF7qHZYbKpMoVi8K3BeLw== X-Received: by 2002:a05:600c:a08:b0:3a1:9319:ab78 with SMTP id z8-20020a05600c0a0800b003a19319ab78mr21659837wmp.158.1657047889777; Tue, 05 Jul 2022 12:04:49 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id d7-20020a5d5387000000b0021d5c52f4b4sm9912961wrv.34.2022.07.05.12.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:04:49 -0700 (PDT) From: Conor Dooley To: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Brice Goglin Subject: [PATCH 1/5] riscv: dts: starfive: Add JH7100 CPU topology Date: Tue, 5 Jul 2022 20:04:32 +0100 Message-Id: <20220705190435.1790466-2-mail@conchuod.ie> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705190435.1790466-1-mail@conchuod.ie> References: <20220705190435.1790466-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_120451_528995_546B1EE8 X-CRM114-Status: GOOD ( 11.23 ) 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: Jonas Hahnfeld Add cpu-map binding to inform the kernel about the hardware topology of the CPU cores. Before this change, lstopo would report 1 core with 2 threads: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) + Core L#0 L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1) After this change, it correctly identifies two cores: Machine (7231MB total) Package L#0 NUMANode L#0 (P#0 7231MB) L2 L#0 (2048KB) L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0) L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1) Signed-off-by: Jonas Hahnfeld Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley --- arch/riscv/boot/dts/starfive/jh7100.dtsi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/starfive/jh7100.dtsi b/arch/riscv/boot/dts/starfive/jh7100.dtsi index 69f22f9aad9d..c617a61e26e2 100644 --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi @@ -17,7 +17,7 @@ cpus { #address-cells = <1>; #size-cells = <0>; - cpu@0 { + U74_0: cpu@0 { compatible = "sifive,u74-mc", "riscv"; reg = <0>; d-cache-block-size = <64>; @@ -42,7 +42,7 @@ cpu0_intc: interrupt-controller { }; }; - cpu@1 { + U74_1: cpu@1 { compatible = "sifive,u74-mc", "riscv"; reg = <1>; d-cache-block-size = <64>; @@ -66,6 +66,18 @@ cpu1_intc: interrupt-controller { #interrupt-cells = <1>; }; }; + + cpu-map { + cluster0 { + core0 { + cpu = <&U74_0>; + }; + + core1 { + cpu = <&U74_1>; + }; + }; + }; }; osc_sys: osc_sys { From patchwork Tue Jul 5 19:04:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12906962 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 A51D0CCA47B for ; Tue, 5 Jul 2022 19:05:10 +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=9OnResv9FoC+Y+K1Ax4XNgrJZ8UvX7d7q8NTHPyxL1I=; b=4eROtOSV+kIEWj CiUVtWCpYA9JUyCXWMkJzFoF+FEMy+3kRnV9ME75EYb7TKO8ecTTXtcBjfEoIsmWpppKDxKJFhkZG vC5mUvGVnRgOXNNByGPsW0rDXSYX/bYlGUe/tHpguRGYcMzF+eFueOuqxxPodfUNyClIl1GnsUu3r qjI0Y6xRx1I5Mj6ElGmMIcQAWz6MLLJXPOz64SopTehBxmQngVBvZSoHDO7W7OpHxNh7HIAcWpF3q eNf6LnMOR0p7SG+7VpqJEhXbMYvaorXNXZ5wQmlj8x2RmSrig+iBGhZGybtj3Pt5QXu1/ueaHBior 8kafWwsBHvLWXytWmi7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqz-002EPp-Im; Tue, 05 Jul 2022 19:04:57 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqu-002ELa-KJ for linux-riscv@lists.infradead.org; Tue, 05 Jul 2022 19:04:54 +0000 Received: by mail-wr1-x432.google.com with SMTP id d16so12553300wrv.10 for ; Tue, 05 Jul 2022 12:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gNuyaztG7WG0XECyfRAu1NlFkLmq6WFnwK6RpenhzSk=; b=Npg6A1E1a10kmmFESMxKy1SqF84MP3WhpDB4JM9gAU7qd4MB9Z69GK51SXZQlRU/MY SqJUW7jJa/PhNKQUYxyGteJLYUQSdq306+RMob512BiSvFZ+AH5mge2FwXNwTkv2zQA/ f9e/djtjCOhGwoZuoXcG/bT7/p4BnkgWVXmfwN2z26XoQvYoFXr2SKB72DgjcQ+7j2O7 JZStLlzfaBTWs0X8Os5HHab5COQZBOUnoXALUWu70rLfSPBQksy1/7z9arApMPObnSdZ qvAqOHE8VzLUb+t3X0Y3tO7w4jVaC67k5ySYZTr1ZUMwozxNjK4cVf0QaVtKIliP5n1q xwqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gNuyaztG7WG0XECyfRAu1NlFkLmq6WFnwK6RpenhzSk=; b=rTqnTf/z0E3pJFHf/wabHtIQYlsuMbHN2rhhlaonUI7OZcYvZDLHJeDA4g3gEgXbga OuisnsPtQ/hYeNH9X+qZ1Vmc8Sy0suUTjh5zgSuYGwXks9W+vmHNNxWcm4jVXz/K7xCO Tiy760zJXLSqnt9se+psR7VXs25SE/u/lPYwXX726wbhup4aWxZRO+R/DwMHPCCtV5pv kkUh4cBDx1JK1PCFE3tYpRDzwXQnLu0cH55aXtt3mdwRno6KQkd5FDbXSig3rRkDegW+ 2cocM+aPAtuK3PH2J4HKGrK03hOd3woRLu7qanxzthDI3THElh1xBhISHXOEHKJZqY+3 uKzw== X-Gm-Message-State: AJIora+qtI2nGsVJTCDXJWJrrQNgew/Kca7TeolFySzKUcKyGfWZpwxS Bs917Cjm9N6AkGQqxDSQGTOLyw== X-Google-Smtp-Source: AGRyM1sZnlUg7cRbAbZwdDLmnM+md2H39+NMEEpyyL3usCmFG/KO5nQimCQLm9NLNI9LS9XggnvjhA== X-Received: by 2002:a5d:4b87:0:b0:21d:7019:80c6 with SMTP id b7-20020a5d4b87000000b0021d701980c6mr6132428wrt.234.1657047890925; Tue, 05 Jul 2022 12:04:50 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id d7-20020a5d5387000000b0021d5c52f4b4sm9912961wrv.34.2022.07.05.12.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:04:50 -0700 (PDT) From: Conor Dooley To: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Brice Goglin Subject: [PATCH 2/5] riscv: dts: sifive: Add fu540 topology information Date: Tue, 5 Jul 2022 20:04:33 +0100 Message-Id: <20220705190435.1790466-3-mail@conchuod.ie> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705190435.1790466-1-mail@conchuod.ie> References: <20220705190435.1790466-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_120452_704989_DA05A0F5 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. 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 fu540 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index e3172d0ffac4..24bba83bec77 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -133,6 +133,30 @@ cpu4_intc: interrupt-controller { interrupt-controller; }; }; + + cpu-map { + cluster0 { + core0 { + cpu = <&cpu0>; + }; + + core1 { + cpu = <&cpu1>; + }; + + core2 { + cpu = <&cpu2>; + }; + + core3 { + cpu = <&cpu3>; + }; + + core4 { + cpu = <&cpu4>; + }; + }; + }; }; soc { #address-cells = <2>; From patchwork Tue Jul 5 19:04:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12906961 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 57EB4C43334 for ; Tue, 5 Jul 2022 19:05:09 +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=SkCW/yKmaE58ncU6Gox9DbwocKMSUjt13Ti8pRqBxTc=; b=kRczbBz+Kw1HbU 0PHUIGXBbHbyRjvryI3zeOQkb5SW2KNNEdhUjBrKyTuDfmuG+N/0l0jGvKuu7QEfzseX+ICsD/Wd+ 8KQKCIw3ltE/XlLD4DEVLqoNNLoprs2pIx281DJqmdsDRXTiWrpQhwo/hpzo9OXvsO0HoMu2Ws0vS 1rQA7VUn725MLHrIJBIb1uAtuGTkgXJ/B05L4eocIryXTY/S0n1MSQl7l96+iMnRqIJWFmhVuK4gU ZB2cYEsSHvubwLxQJBT7F5XoNJu9w+t6v/ZekV69RUGWUEsJak1i+Qr9IPYA9kfRFUEnQbOUpHkCM GmMnO7xNtXltC6dRhIew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nr1-002ERD-8r; Tue, 05 Jul 2022 19:04:59 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqv-002EMY-Gv for linux-riscv@lists.infradead.org; Tue, 05 Jul 2022 19:04:54 +0000 Received: by mail-wr1-x42f.google.com with SMTP id h17so5719998wrx.0 for ; Tue, 05 Jul 2022 12:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ia61xjYZRZJlY+9xb00BGdCtYvU+CPGhICs6f5ZBvAY=; b=LgY3wj15rZfyPkNFwy/Q/05dDlJOgaYzX0JTd0xz7r/ylNZFU6sm8GCVNQ2urRAVdm CkscfoU23VZ+NxtXrj6d1CYcK5/gqnhrW6BraIrqUGrymi2gro2CDc5rPQmr7D8x5S1q IIXzb7QwpcDzFyyqHAC/hmNBNEpXIxhuEKa9OVvi9S8siKSrSTl5DySskUngGK4T0/wt CL4huuFlUJFA68LQHfh6XwxZs7l1MXp/kXCnzlX1lck+s3fQ7DCQ2Jak74KKrnW52WsY okuchUG6xc3pPxY4ap5GCU8TcXHvCy3l58VQQ4CbAdEsCLNecF1COBWun3N17gYEaooA D5MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ia61xjYZRZJlY+9xb00BGdCtYvU+CPGhICs6f5ZBvAY=; b=jKf8omKeGiYvhXPuARBuzTIHUCVNVwZ6Zjv8nn+9i84CLcCAQ4NiRFZioj4Bq812dg KfkERvrBe5F1TfE34TUU2Lqe6QX85EaXM5FKOVwDE+82uIUNCsiNMaSgkaP3nxb5psUx 5GKbeRyGsoVrSV9LIWyQ7sAfCQTngJPq3UJ/3B31XgEoOD7x0wvXK9C/Nvm/DpEPeR8C OISdfhxWjPi3cIiybGYuyLlBrUu+RZO9OQAPaqwlTKzscwvCM1anh54vy6XJfjfZIchb 6j2Uo5Kprfl+bRXKVy5It70tEvJncLMO06QuzTxY/4app1HL5UqWy+oemuZ/QWE7D9Dn 5cnQ== X-Gm-Message-State: AJIora8pCnSGAsr/aM9c6fLbeHaGvfTieUa/fKxB9Ye/xC/QTNJZYPQO +Hrg5BWXnUbmA9hheihcy9DyHA== X-Google-Smtp-Source: AGRyM1tfUrutzCcev1jR0MNPW4nQzPfSNDQNeYJBmdJ1xJzSas6+URz89sHyVueorcnGMkr2xdlaUw== X-Received: by 2002:adf:fb46:0:b0:210:2316:dd02 with SMTP id c6-20020adffb46000000b002102316dd02mr34750910wrs.557.1657047892078; Tue, 05 Jul 2022 12:04:52 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id d7-20020a5d5387000000b0021d5c52f4b4sm9912961wrv.34.2022.07.05.12.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:04:51 -0700 (PDT) From: Conor Dooley To: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Brice Goglin Subject: [PATCH 3/5] riscv: dts: sifive: Add fu740 topology information Date: Tue, 5 Jul 2022 20:04:34 +0100 Message-Id: <20220705190435.1790466-4-mail@conchuod.ie> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705190435.1790466-1-mail@conchuod.ie> References: <20220705190435.1790466-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_120453_599404_8F6F006A X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. 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 fu740 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley --- arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi index 7b77c13496d8..43bed6c0a84f 100644 --- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi @@ -134,6 +134,30 @@ cpu4_intc: interrupt-controller { interrupt-controller; }; }; + + cpu-map { + cluster0 { + core0 { + cpu = <&cpu0>; + }; + + core1 { + cpu = <&cpu1>; + }; + + core2 { + cpu = <&cpu2>; + }; + + core3 { + cpu = <&cpu3>; + }; + + core4 { + cpu = <&cpu4>; + }; + }; + }; }; soc { #address-cells = <2>; From patchwork Tue Jul 5 19:04:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12906963 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 276AEC43334 for ; Tue, 5 Jul 2022 19:05:12 +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=y3QEgEA2gT9ybVvxm8Ikaa2tzrYPHbqkHFz65LVFe0A=; b=p4whDld4kbclOv Sgcbe6YygYyM0TWlxv9L3HH10qlLIS9E6USSlgLkamU3WGeuxXO1b/QQD84mJ5YNEJb57/3SyQdsZ c/vcXmbcWgYqcMLyxIvJcmA5aRBd+hhlE8x14aYxO4Pa09VEbVVi4faWJTT3E0CHsovx26IAkchuR NGJtIrQtLdOeC1DaWWchFyfHPeNO9ap6gz7P8C+Yq9dXVdj4/Euh8mRTI29rEE3fmff7GJIEjjRcK myYTn9Qp8xK3iBREm++eGUh28zQQo4DaGMuTcjXZXfxI0DlUcOrh6VFHp6Pjl/abzJKJAEUZBb0Cz C3klIcavXvu75Ktj4ycw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nr3-002ESl-JQ; Tue, 05 Jul 2022 19:05:01 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqx-002ENW-1C for linux-riscv@lists.infradead.org; Tue, 05 Jul 2022 19:04:58 +0000 Received: by mail-wm1-x32a.google.com with SMTP id be14-20020a05600c1e8e00b003a04a458c54so7775948wmb.3 for ; Tue, 05 Jul 2022 12:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ofJfdtzmNhmvEWJSidzM2l5f2gdgrg4wmjMzsjAB6EY=; b=KPRE2MqxrWAyJ5KFiyW7W2wK/Qp+4RPmBjBPEqd1Ad/RcYiR5eQ4b0SjLC8+sW6c5P qCe+z2nKJvGF2GFscoJorSvxk3sNLrfiQ670bUOmB+jACJp9lOakMIuOoOquUdd1Qxyv 4EDm71nI0XdHb50X7lVmgkNNA8h+QeAqqFaZRYx0mt4T9wPF4HSxuJSZVFf6rY0oqkVT u6puW3UWxcyi0rIhc0wj0mC6W6JuMvcvCDBN9Ol1AIcLjv5JSGeLkYTCy1WUs9jLAU6j QEfjz7TawPKt6zY2D5YLcdcoWm1Upk/knSsY46BnHYsWbDiw7/Xji7ElmxcyNbFD2ayK sg4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ofJfdtzmNhmvEWJSidzM2l5f2gdgrg4wmjMzsjAB6EY=; b=ZOujSQ3DTeeJdKS4awZ0bnNuuRsecM3zFnHOUjAcC5QRiPhYEYbsP/AUV0AuYBUJsP dh2DMVNV7uq8dSWt7lv9s04grVaQhYrLTNEbnhEU3NcsyRjXrFRIzcgvTvnI76F0qAVG j0nBOjQn4usuvCOkA0b0uJEeagYDHlrhlvDaUXuZUPQMVlSq+PCPvk3fX7qlU6enOhET hDv5RZY+9AoaDVeIQRtYVoq+XssjhGxeUwpa11zcKDYcs8/N8ij+AZ+YmdbfjzigZK5S 7KwgZCizJxvte5RepooI10j5LSkfcRo4PBsSk9cy9LdlhdlWf2Vg5mFR9UA8TBE7aEVH x0pw== X-Gm-Message-State: AJIora+Hu5+dlLuI4dH6j1ivqxFHjR4lu8HlnIWony9J7zgHyJ+jNHfd EHpPoSkcJrMCBhVOD96UQdAPqw== X-Google-Smtp-Source: AGRyM1tI18mclpFxyL39qQ5/YsPKhSiZSy4A+5WH0urBxCix8CHueAjToJskt0yqz1LTAmw3L7LhJg== X-Received: by 2002:a7b:c381:0:b0:3a2:aef9:8df4 with SMTP id s1-20020a7bc381000000b003a2aef98df4mr11492100wmj.7.1657047893260; Tue, 05 Jul 2022 12:04:53 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id d7-20020a5d5387000000b0021d5c52f4b4sm9912961wrv.34.2022.07.05.12.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:04:52 -0700 (PDT) From: Conor Dooley To: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Brice Goglin Subject: [PATCH 4/5] riscv: dts: microchip: Add mpfs' topology information Date: Tue, 5 Jul 2022 20:04:35 +0100 Message-Id: <20220705190435.1790466-5-mail@conchuod.ie> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705190435.1790466-1-mail@conchuod.ie> References: <20220705190435.1790466-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_120455_118427_199F5C52 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. 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 mpfs has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley --- arch/riscv/boot/dts/microchip/mpfs.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/riscv/boot/dts/microchip/mpfs.dtsi b/arch/riscv/boot/dts/microchip/mpfs.dtsi index 45efd35d50c5..0a17d30bb3f2 100644 --- a/arch/riscv/boot/dts/microchip/mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/mpfs.dtsi @@ -138,6 +138,30 @@ cpu4_intc: interrupt-controller { interrupt-controller; }; }; + + cpu-map { + cluster0 { + core0 { + cpu = <&cpu0>; + }; + + core1 { + cpu = <&cpu1>; + }; + + core2 { + cpu = <&cpu2>; + }; + + core3 { + cpu = <&cpu3>; + }; + + core4 { + cpu = <&cpu4>; + }; + }; + }; }; refclk: mssrefclk { From patchwork Tue Jul 5 19:04:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12906964 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 408C1CCA47B for ; Tue, 5 Jul 2022 19:05:13 +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=1Ll7Hd4+GdqPESZQRzzQ8evND7zL5ZdHbm0IvcSEjYE=; b=GtkWjW8ZZm9zaM mlkUzNdZ4D78gSkmFo+Tb66WE/czQJR/c6DAJ+Lbbsw8/XNEEhRTroi2FnmcTZUcRhm1C6n8yIP9G EEzznF9GKNg3Pug1y8vYjmUmdXpQ9dbY2ZOB0zJQP0Z4MJxfbS7kUyxnZi4wJEXJUM+TUR/yuHIhc upatn+H4fThUCKvsUiCFp+x+n/4pOjR4AWjdA5TFyq2CevDYl0znzRC8l2eXGA7dAhgpkKAXuonVL ql14SLq8WXux8dDnIp6GVrpdDGV1prxhyEtehSg1z9JPD+UMGY/q+RSQKD4ubXVD9UYREKsZVidRx co1kDWFA+hc2x7Lw3Kuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nr6-002EVX-Cc; Tue, 05 Jul 2022 19:05:04 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nqx-002EO8-OZ for linux-riscv@lists.infradead.org; Tue, 05 Jul 2022 19:04:58 +0000 Received: by mail-wm1-x330.google.com with SMTP id bi22-20020a05600c3d9600b003a04de22ab6so7798150wmb.1 for ; Tue, 05 Jul 2022 12:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EAejLaRmDI7ahw+8pWedR3a7Dpv7oYIzED6NiiTc7a0=; b=gH8Eh0uSyp1pd8lYOTghOMpllbsaSKtH0LZfoePu+NLFoGUnlrt/bMlxOQW8M9nYhm 2RcpqIr/5SHSJXL1yLCB6PqDhUDzggWiwdYDbx5v3OTdAqaVLNZekmK5HwJU8AM+QJrV /T44OnuWF5AME4PsrRs8vhQbGU4Onl26sSNn1wqmfQ2bn6F3OggSTLoCL33SK/nWdIaP 7Z5v0Aza1Kf+VxyRjvGNLOltssWMr9PoSSvETyshYXAkAsZuPzMlFI9rZ7+27fy75akx 9uMzCdfvFIU+oAjoE3bdvC7hculNfq448yw1hlj7Rc0xgBHMq3tap751KKBP09thts6R rdcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EAejLaRmDI7ahw+8pWedR3a7Dpv7oYIzED6NiiTc7a0=; b=q+aIdBExHlhBiPBcbe15FNMc6OSXRpYdbE0SmhAu2mCpIKO2ee/G9JJD2GkAeTZkqU Y93RWsg1yaOKvsRIP7YQXhuM/1Apn3EL5a+tjzt4WGjtKxvRR+um3hiKiBtWg+SsSjNk Q/8687RZ7IKy5V1WtTSThtoZrmhpI3yM8NAUoZUmgAgkdE0Q3lT+oIRHAjith+whgFUM bHFgVG428MEkiYGWOjlwo/Y1ufnTf4Y+0h1qihAtdEeHRDHf+GbaTLcDuNpff6ydPcXj apO5+9Gjgy95RMc8ofCdXQc80O2DosDdUNitEZxtRdnftYGmzXEXbahm/xHXfph+Oq45 Fpjw== X-Gm-Message-State: AJIora/cTt6Q3ZFj15a2glGQRRRtC+UfbPbNjHdxgxciI9wJcMhdyQvh 2Ln8prYrlgHbyh5th012CIrGjA== X-Google-Smtp-Source: AGRyM1v5EycBOklnarxa0uQO3GFtyp55frrKZpEg99ryhZLuRXj9VDMx0b33n8f0spv/5bGvXvOHyQ== X-Received: by 2002:a05:600c:2284:b0:3a2:b7d6:609b with SMTP id 4-20020a05600c228400b003a2b7d6609bmr5625866wmf.83.1657047894458; Tue, 05 Jul 2022 12:04:54 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id d7-20020a5d5387000000b0021d5c52f4b4sm9912961wrv.34.2022.07.05.12.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:04:54 -0700 (PDT) From: Conor Dooley To: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Brice Goglin Subject: [PATCH 5/5] riscv: dts: canaan: Add k210 topology information Date: Tue, 5 Jul 2022 20:04:36 +0100 Message-Id: <20220705190435.1790466-6-mail@conchuod.ie> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705190435.1790466-1-mail@conchuod.ie> References: <20220705190435.1790466-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_120455_829597_C2BF1503 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. 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 k210 has no cpu-map node, so tools like hwloc cannot correctly parse the topology. Add the node using the existing node labels. Reported-by: Brice Goglin Link: https://github.com/open-mpi/hwloc/issues/536 Signed-off-by: Conor Dooley Reviewed-by: Damien Le Moal --- arch/riscv/boot/dts/canaan/k210.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi index 44d338514761..ec944d1537dc 100644 --- a/arch/riscv/boot/dts/canaan/k210.dtsi +++ b/arch/riscv/boot/dts/canaan/k210.dtsi @@ -65,6 +65,18 @@ cpu1_intc: interrupt-controller { compatible = "riscv,cpu-intc"; }; }; + + cpu-map { + cluster0 { + core0 { + cpu = <&cpu0>; + }; + + core1 { + cpu = <&cpu1>; + }; + }; + }; }; sram: memory@80000000 {