Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1639988imw; Tue, 5 Jul 2022 12:54:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uEDHFMstUy7zj+sSOMKUKr6+wCVBZZJHJezBhR3qdUsFps3exwt6jVOXzJ7TiRJ215jCpo X-Received: by 2002:a17:902:e5c6:b0:16a:8395:aa30 with SMTP id u6-20020a170902e5c600b0016a8395aa30mr43823343plf.123.1657050865344; Tue, 05 Jul 2022 12:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657050865; cv=none; d=google.com; s=arc-20160816; b=oKyoJwO6L7U78quost0C68sk63w9lyuvhQ3mpflmrAy5gWp7txM/LOTux1oHLPL3gv J/BfSLDPRiEbKSbi2DcT6RJmQHgmrbBmHoDtxvMPTVW/62Lkb/rwm+RfUahT56hh07A8 H7IepSlaWoImiy5b6UToGeOvLezFogLc+X+YrOy2U4mBuKcRbFOIAU5KD2aowrRwFcUs sMWbROw57dgb7/Jn8c2zHE9J5v/37M3HskDQLaVqbAsW+u2X4O9ZOf3Ht6Way2cf1GbC QbIy7rmHd2TeXPrgzxdMq0VxqvagG6D3b95mj3JL4Z6eOcj4XdgeI9M+txC2x/Unme8J bEIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BQOVUNXHvwHVcucqUlVv6BnH7JR1aGPeK9i5YAi0Y4c=; b=mYeK408543OSh56PQFrwuNGWpWmt7m3t38XddFMkR3HGPDYD79274Cf2aOSPr88Gsv xPiI2t/jGbvrfG8CEhqP6eOuL00XrTtYPjxgK34H0GI9EzYTNW80HILxehBCuD5iszpt T5SgNTo9ODUOvYgyy28QS6aKD7MxVw+F6vvKGpmtuKK6YyJmxxiZHqm1tXskWsM2cyB7 HICP6ZkCQ+fJ6bL81tomF3zvD/JvPtJ/5TVggQsk/7VNbApdvTVlE3hQK+WNNYgDEpkY 6mmSzp1ZO0kAGV4zfP7Faxyy3H23gLJY0Ti5IBb+arKENrygg+k6Nt4VzpJmfnFwCIcp z/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b=SMCwI1AU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a170903018c00b001635111a63csi24488530plg.432.2022.07.05.12.54.13; Tue, 05 Jul 2022 12:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b=SMCwI1AU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233250AbiGETE4 (ORCPT + 99 others); Tue, 5 Jul 2022 15:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231326AbiGETEx (ORCPT ); Tue, 5 Jul 2022 15:04:53 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D963E94 for ; Tue, 5 Jul 2022 12:04:51 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id c131-20020a1c3589000000b003a19b2bce36so4708974wma.4 for ; Tue, 05 Jul 2022 12:04:51 -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=pfp0q60P+f4/ZNcBjqsiiKalYwpu3ArKTdFC/0LPhk4svJa8bmGvTfeu6tolhfLnoH K/EjxtiJXoz93SGHHNGeMGsj5ciGN5Vx/5FEn+zgBA/ZtjPlbrvDTgZNkhuk3+xfQPCo 7zr54N7GnNGlT18yBVAarmVk9rVz6pFGdTUhVV/s7htiol3gulGPm9Kw1y0SyVi9lvFm +FwY2Z+YgTd1g09dihQLjDx6oj5bp12I5MKRqv/fAExyuxsl8NZbJ0JZRSYmPHPhodMG nqQNmLvHhlZrcYs9dOFolw3OUpjcPahl3l97AFE7cLWflzd4A9d8aWmwyqdi6A9TKUXI wvGw== X-Gm-Message-State: AJIora/y0NOBRXloTvDR5cKIA58as/oRfRGeXZJvfcoGwBGLtpP4jAHm zfnyV6l5y8XZuRA84/jrmjVhAw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 { -- 2.37.0