Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3219166pxb; Mon, 18 Apr 2022 19:35:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaKMmrGRJJpdSAbrsnRMUBnEpKsHCfu7a6t8UJrK/9Mw60y4eGbL+KPl+c6K1bTPYBRPaj X-Received: by 2002:a17:90b:1d84:b0:1d0:3c19:e1c9 with SMTP id pf4-20020a17090b1d8400b001d03c19e1c9mr21815261pjb.130.1650335738640; Mon, 18 Apr 2022 19:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650335738; cv=none; d=google.com; s=arc-20160816; b=QvhQu0ovLPRC3hWSJSlsm51Xc9xgfbK9LOvxOzs42P/UbHSu8RuBfglSFlbAWnZHSX 6UIlZ79uxYFDRbACboV89Br+XbObZY7TJYQfT1Vmmha7uk7db2c/1kepuJL0DK8BeyCg kD3V4Jhi/QYFUv6AgDSCdKl/LINA6iAeFl1dchoT66+aYThwuWvlKr64dOPz3g+SYLEs UZtyxx7K947m1PM+FSWfCewxhFHP70OJlBt7PL0GatOhFkSvhWK0vbpEHPcIG1HpVG+I PVP1h2Go7Z4z1HrPx57w0K48Uv3UJohA0z0+QSsXKBAkxgqWz2zaFcepDDZUDh5oDiBP gDVw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LqDoahUXc/6p4xh+p63SNzXaI0fQ9ySmYNAK+Z7PbJ0=; b=SGXyh50VNzFZP63h1+rbZQeX78ELL89vnVK5u3qJo7U/GMLE1085Ddq0/rGqG/3Oc4 ur61UOHFoOm9W7pcxPu5oiJlu8IvEp+esLhog2+NOue7R1geZE+978dH6YZkO3T77Cwi c9hi8+jd/ZLA9qlGOZ6ZmplkoAu/YmXdEKUjoROMDUXLgQfLx/n/Hzj55r73ztq8o0y6 D8Mu1yRoHD7BbCPDYh2++OhhRWvjc6gPT4turDMtiOctKc0Fj87LuKYU6aER4JOeK0Up 4mOB79OM6h6nkFtQMMKRKiJsCATwUG7h5/z1VUk0A23x5oQ87L9HbsGjLKAXbgpng8Kl ANgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r8+9Wxnu; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm7-20020a17090b3ec700b001cabc409081si1043049pjb.67.2022.04.18.19.35.23; Mon, 18 Apr 2022 19:35:38 -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=@linuxfoundation.org header.s=korg header.b=r8+9Wxnu; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344022AbiDROUV (ORCPT + 99 others); Mon, 18 Apr 2022 10:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245061AbiDROCC (ORCPT ); Mon, 18 Apr 2022 10:02:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13148344D9; Mon, 18 Apr 2022 06:09:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 714BA60FD2; Mon, 18 Apr 2022 13:09:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6650EC385A8; Mon, 18 Apr 2022 13:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650287359; bh=yn1hkL3BE7IQP3XQ6XQsGCgxQjHxbrxQVwxQttzJO/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r8+9Wxnu/+bbS6G2YRW0xNWhugZOKbgZZ1TRjVcyaMDmffv3gdxPVZuZkbqLgx8xd VzBnjGNP7czVbnpKM0Kt4UmAoEjDF6ZjkM33b3+u+xJWhGWnRpAYWDuXTY138RRgSV cerPsYsD5s7BON36GB7nKKuUssV8NAVtMyMxCZzI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Richard Schleich , Stefan Wahren , Florian Fainelli , Sasha Levin Subject: [PATCH 4.9 138/218] ARM: dts: bcm2837: Add the missing L1/L2 cache information Date: Mon, 18 Apr 2022 14:13:24 +0200 Message-Id: <20220418121203.537555479@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121158.636999985@linuxfoundation.org> References: <20220418121158.636999985@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: Richard Schleich [ Upstream commit bdf8762da268d2a34abf517c36528413906e9cd5 ] This patch fixes the kernel warning "cacheinfo: Unable to detect cache hierarchy for CPU 0" for the bcm2837 on newer kernel versions. Signed-off-by: Richard Schleich Tested-by: Stefan Wahren [florian: Align and remove comments matching property values] Signed-off-by: Florian Fainelli Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi index c1f719b7097a..95e3cb38474f 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi @@ -31,12 +31,26 @@ #address-cells = <1>; #size-cells = <0>; + /* Source for d/i-cache-line-size and d/i-cache-sets + * https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system + * /about-the-l1-memory-system?lang=en + * + * Source for d/i-cache-size + * https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks + */ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; reg = <0>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000d8>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu1: cpu@1 { @@ -45,6 +59,13 @@ reg = <1>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000e0>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu2: cpu@2 { @@ -53,6 +74,13 @@ reg = <2>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000e8>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; }; cpu3: cpu@3 { @@ -61,6 +89,27 @@ reg = <3>; enable-method = "spin-table"; cpu-release-addr = <0x0 0x000000f0>; + d-cache-size = <0x8000>; + d-cache-line-size = <64>; + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set + i-cache-size = <0x8000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set + next-level-cache = <&l2>; + }; + + /* Source for cache-line-size + cache-sets + * https://developer.arm.com/documentation/ddi0500 + * /e/level-2-memory-system/about-the-l2-memory-system?lang=en + * Source for cache-size + * https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf + */ + l2: l2-cache0 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <64>; + cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set + cache-level = <2>; }; }; }; -- 2.34.1