Received: by 2002:a05:6a10:3150:0:0:0:0 with SMTP id m16csp2134861pxc; Wed, 30 Mar 2022 20:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3DaySkApEM6QMfjba9dMjy2/Jhz3tX5L8c9nUY2FDlU2ZfpffO+YXy5L0wBW/0USQ8YEM X-Received: by 2002:a63:4919:0:b0:382:6f3d:e48 with SMTP id w25-20020a634919000000b003826f3d0e48mr8822456pga.613.1648697155346; Wed, 30 Mar 2022 20:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648697155; cv=none; d=google.com; s=arc-20160816; b=c8OQW+qSkJWHW+0RCheu3lfmno1fTo2pDT2TeFMUAZlqLRHxvCAhk7c2xnSmOUEBi5 9ugcNPmTk5asPSOwv8bxq2UznAPwSdmunXOyU1MQVDOYd0DNp2qwHZLLGbTG6nyx2Zb+ utjLiENwIFuX1UEzxdDe0PZMgL1it4xC9mRNpurMjJGTM4cFTqxT8Kl7mMO4dXRlrhgA Hb83wai4zOxtDZmUv4RcMeAiZDUiDo/tfHpuwCJlkqoEIcJ7ZFTIY91x957WLwMv2vD3 1/eyqUagoymoaEq/bZ+GT2fjDBec25bf7nl1/n/OKND6pX8zbrBCYH64KhGo/7htpEZX auIQ== 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=EmTjG+EkhbitDGEVwaWSAY+x1kTKnGXxEzwyhl6bV4A=; b=Kztw6rpFBgRobwOMyQ/7aO179Zpn+zwqDFkxKjE2SoS9gTG42OYdEVButxc0jqt12Q SqxTER5+91f1u4cHnrP+5zfTIGaQX3BRaVUiDGJJrkOdDLrDl+YdwIoRXIacmaIjxlo/ 9qcu8dYr0+o7fQK35L/PdtdX836ibtsOpQfIjqWIMCfFMhqcqwa7h2dXwituAnX+Q64d 76sfCiavWhBQGqCoT/ujttk2NwaEg2NNXSSyrQ0+GSEkCNCn2Fy6226rjAH/fwa5zFnb SgEl5mOn02At8P101BH9dhVtSNHGeGWfZBNw+aOTKNPewDnQnwMB5NIEukWuQDK2odUS t4PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kB1eSgMz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ob2-20020a17090b390200b001c638bda95bsi2368528pjb.6.2022.03.30.20.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:25:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kB1eSgMz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 190D21162B3; Wed, 30 Mar 2022 19:53:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344427AbiC3L7I (ORCPT + 99 others); Wed, 30 Mar 2022 07:59:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344571AbiC3LxR (ORCPT ); Wed, 30 Mar 2022 07:53:17 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7FA26482F; Wed, 30 Mar 2022 04:49:12 -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 sin.source.kernel.org (Postfix) with ESMTPS id 6A98ACE1C71; Wed, 30 Mar 2022 11:49:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E7F1C3410F; Wed, 30 Mar 2022 11:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648640943; bh=Qb/oTH/UWrZXJOhd5uOtZEXXGxt5HFJZw3S+Cihmmxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kB1eSgMzedC3qCEA/NSDFrLvL2yPKPZ9I1pJK/CeABt4v7crBThUpAn0PC6SXoJ+X aEcrxGLmQSn6B2yIOaHDZ18cN9aUxUmZln3WQNlOopJ44vb08fOEMPtT8WUKpuwOr+ tsunZDd7NVU0EhPQJP1b3t1AM+H7uEoGCXhNi7Hy5BlXqVk4RwqXiPGRxFEdwIK5bT EVWyHIjAtkjnRgXVRqcJjF7FxkPOLPfBrWE2+5CQTbPFpLrhsOijFReAGWaXX11xsD fKyWIFOd63Drh6PyGowQWlvta61Z1SD//OouCZxz+E3iBLomRAoLRQHrU9wbjXDdda z2+iOj4IjDl9g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Richard Schleich , Stefan Wahren , Florian Fainelli , Sasha Levin , robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.16 19/59] ARM: dts: bcm2837: Add the missing L1/L2 cache information Date: Wed, 30 Mar 2022 07:47:51 -0400 Message-Id: <20220330114831.1670235-19-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330114831.1670235-1-sashal@kernel.org> References: <20220330114831.1670235-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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/arm/boot/dts/bcm2837.dtsi | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi index 0199ec98cd61..5dbdebc46259 100644 --- a/arch/arm/boot/dts/bcm2837.dtsi +++ b/arch/arm/boot/dts/bcm2837.dtsi @@ -40,12 +40,26 @@ #size-cells = <0>; enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit + /* 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 { @@ -54,6 +68,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 { @@ -62,6 +83,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 { @@ -70,6 +98,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